Enroll card

This API registers a card and converts it into a token so the consumer can use the token for subsequent payments.

Its function is to register a card and convert it into a brand token so that the consumer can use the token for subsequent payments at various providers. Before consuming this API, a merchant registered with the brand must be on the platform.


Use of the Request Identifier - requestId

If the user loses connection or is unable to retrieve the generated token, they can call the token generation service again. This service uses the request identifier to recover the existing token without the need to generate a new one from the brand.

However, if the endpoint is called again with the same identifier after 5 minutes of generating the token, it will return an error indicating that the identifier already exists.


POST/api/tokens/enroll

Enroll Card

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
    requestId
    Type
    string
    is Required
    REQUIRED
    Description

    Request identifier sent by the client for error traceability. See more at Use of the request identifier

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

    Unique identifier of the site

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

    Structure containing information about the payment method to be used in a transaction; this structure varies according to the request generated; each service requires the use of certain data.

  • Name
    payer
    Type
    object
    is optional
    Description

    Structure reflecting the information of a person involved in a transaction.

  • Name
    locale
    Type
    string
    is optional
    Description

    This parameter is composed of the language code according to the ISO 639-1 standard, followed by an underscore _ and two letters corresponding to the country according to the ISO 3166-1 alpha-2 standard.

    Example:es_WR

Solicitud

POST
/api/tokens/enroll
{
    "auth": {
        "login":"aabbccdd1234567890aabbccdd123456",
        "tranKey":"ABC123example456trankey+789abc012def3456ABC=",
        "nonce":"enQ4dXh3YWhkMWM=",
        "seed":"2023-06-21T09:56:06-05:00"
    },
    "siteId": "de394911-4219-4f1f-ae21-abf340e6e605",
    "requestId": "972293d1-5954-46e3-b00f-153f5aea03cf",
    "instrument": {
        "card": {
            "number": "4111111111111111",
            "expiration": "12/23",
            "cvv": "758"
        },
    }
}

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


Respuesta

{
    "status": {
        "status": "OK",
        "reason": "00",
        "description": "The request has been successfully processed",
    },
    "data": {
        "brandToken": {
            "id": "a2e09e1d-e4a5-4b59-9e2f-cb9953c0acc7",
            "token": "5455950000007522",
            "expiration": "12/28",
            "requestId": "972293d1-5954-46e3-b00f-153f5aea03cf",
            "additional": {
                "tokenRequestorID": "50160269427",
                "artURL": "https://token-requestor.placetopay.dev/images/card-art/master.png",
                "issuerName": "Test Issuer",
                "lastDigits": "1234"
            }
        }
    }
}