Get cryptogram

Its function is to generate a (unique) cryptogram through a brand token that will be used to carry out a payment process. Before consuming this API, a merchant registered with the brand and a given previous token must exist on the platform.


POST/api/tokens/cryptogram

Checkout

Request

  • Name
    auth
    Type
    Authentication
    is Required
    REQUIRED
    Description

    Authentication object. See more at Autentication. Structure containing site authentication information generated according to WSSE UsernameToken Profile 1.1.

  • Name
    siteId
    Type
    string
    is Required
    REQUIRED
    Description

    Unique identifier of the site

    Example:1d6b1456-5fae-4932-92f1-5c46fe6c83e3
    Format:uuid V4
  • Name
    requestId
    Type
    string
    is Required
    REQUIRED
    Description

    Request identifier sent by the client for error traceability.

    Example:8a83df8b-f704-4761-a6a1-14a7fd3635b1
    Format:uuid V4
  • Name
    instrument
    Type
    object
    is Required
    REQUIRED
    Description

    Structure containing information about the payment method to be used in a transaction.

  • Name
    isRecurring
    Type
    boolean
    is Required
    REQUIRED
    Description

    Indicates whether the cryptogram will be used for recurring payments

  • Name
    payment
    Type
    object
    is optional
    Description

    Payment information for which the cryptogram is generated.

  • Name
    metadata
    Type
    object
    is optional
    Description

    Additional request information.


Request

POST
/api/tokens/cryptogram
curl -X "POST" https://token-requestor.placetopay.ws/api/tokens/cryptogram \
-H "Content-Type: application/json" \
-d '{
    "auth": {
        "login":"aabbccdd1234567890aabbccdd123456",
        "tranKey":"ABC123example456trankey+789abc012def3456ABC=",
        "nonce":"enQ4dXh3YWhkMWM=",
        "seed":"2023-06-21T09:56:06-05:00"
    },
    "siteId": "2e988305-40bb-4e77-a992-c0dce3303db9",
    "requestId": "8s992305-50cc-6io0-2903-c233osad0339",
    "instrument": {
        "brandToken": {
            "token": "5455950000007522"
        },
        "threeDS": {
            "cavv": "AAABCSIIAAAAAAABBBBBBBBBBB=",
            "eci": "05"
        }
    },
    "isRecurring": false,
    "payment": {
        "amount": {
            "total": 10000,
            "currency": "COP"
        }
    },
    "metadata": {
        "threeDSAcquirerMerchantId": "123",
        "initiatorIndicator": "MERCHANT_COF"
    }
}'

Response

Successful response.

  • Name
    status
    Type
    Status
    is Required
    REQUIRED
    Description

    Structure containing information about a request, indicating its current status.

  • Name
    data
    Type
    object
    is optional
    Description

    Result data


Response

    {
        "status": {
            "status": "OK",
            "reason": "00",
            "description": "The request has been successfully processed",
        },
        "data": {
            "cryptogram": "ahsdjhasdhjaskdABHasdjkas==",
            "eci": "06"
        }
    }