POST/api/transaction

Create transaction

Create a new transaction for a pinpad

Request

  • Name
    pinLength
    Type
    integer
    is Required
    REQUIRED
    Description

    The pin length must be min 4 and max 12

Solicitud

POST
/api/transaction
    curl --request POST \
        --url https://pinpad-dev.placetopay.ws/api/transaction \
        --header 'Accept: application/json' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --header 'Content-Type: application/json' \
        --data '{
            "pinLength": 4
        }'

Response

The API returns a 200 status response with the generated transaction id and positions

  • Name
    status
    Type
    object
    is optional
    Description
  • Name
    data
    Type
    object
    is optional
    Description

Respuesta

{
    "data": {
        "positions": "6871245903",
        "transactionId": "fdcd769e-c799-494d-a240-1ec80fe6ae06"
    },
    "status": {
        "status": 1000,
        "message": "The token has been successfully validated. PinPad SDK will be loaded"
    }
}

POST/api/pinblock-generator/{transaction}

Generate Pinblock

Generate a pinblock for a transaction

Params

  • Name
    transaction
    Type
    transaction
    is Required
    REQUIRED
    Description

    uuid of transaction created


Request

Json

  • Name
    pin
    Type
    string
    is Required
    REQUIRED
    Description

    number digits by the cardholder PIN, string type and 4-12 length

    Example:0123
    Max length:12
    Min length:4
  • Name
    pan
    Type
    string
    is Required
    REQUIRED
    Description

    12-19 digits of the card number PAN

    Example:41111111111111
    Max length:19
    Min length:12
  • Name
    format
    Type
    number
    is Required
    REQUIRED
    Description

    format to apply to the pin, can be 0, 1, 2 or 3 more info ISO 9564

    Allowed values:0123

Solicitud

POST
/api/pinblock-generator/{transaction}
    curl --request POST \
        --url https://pinpad-dev.placetopay.ws/api/pinblock-generator/transaction \
        --header 'Accept: application/json' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --header 'Content-Type: application/json' \
        --data '{
            "pan": "123456789123",
            "pin": "5456",
            "format": 0
        }'

Response

The API returns a 200 status response with the generated Pin Block

  • Name
    status
    Type
    object
    is Required
    REQUIRED
    Description

    json status

  • Name
    data
    Type
    object
    is Required
    REQUIRED
    Description

    data


Respuesta

{
    "data": {
        "pinblock": "13434DFJFGRRG54"
    },
    "status": {
        "status": 1000,
        "message": "The PinBlock has been successfully generated."
    }
}