Direct Tokenization for PCI Merchants

If your commerce is PCI-compliant, this functionality allows you to create the tokens for the cards used in your Web through API, so you don’t need to invoke the Checkout Form.

Request URL

Regardless of the token you want to create, You must invoke a POST request to the following URLs according to your needs.

  • Production: https://directtoken.bamboopayment.com/api/Token?commerceKey={{Merchant Private Key}}
  • Stage: https://directtoken.stage.bamboopayment.com/api/Token?commerceKey={{Merchant Private Key}}

Where {{Merchant Private Key}} is your merchant identifier.

Setting the language of the response codes

You can receive the error description by relying on localization features. You must send the lang header in your integration using any of the following languages in ISO 639-1 format to do this.

CodeLanguage
enEnglish.
This is the default language. If you don’t send this header or set a non-existent language, you will receive errors in this language.
esSpanish.
ptPortuguese.

Request parameters

ParameterTypeMandatory?Description
EmailstringYesEmail address of the cardholder.
PanstringYesCard number.
CVVstringYesThe security code of the card.
ExpirationstringYesExpiration date printed on the card.
TitularstringYesName of the cardholder.
CrossBorderDataTargetCountryISOstringNoIndicates the country of the cardholder. For CrossBorder tokenization, this parameter is mandatory.
You can find the list of countries available here.
CustomerIdstringNoIdentifier of the customer. If sent, the API generates a payment within the customer with a Commerce Token (CT) for future use.
Refer to create a customer for more information.

Create a One Time Token (OTT)

This token allows you to store the card data for unique usage and is valid for 10 minutes.

Request example

{
    "Email": "rserrano@mail.com",
    "Pan": "5275412766556942",
    "CVV": "172",
    "Expiration": "07/26",
    "Titular": "Rodrigo Serrano",
    "CrossBorderData": {
        "TargetCountryISO": "AR"
    }
}

Create a Commerce Token (CT)

This token allows you to store the card data, which can be processed in any account.

Request example

{
    "Email": "rserrano@mail.com",
    "Pan": "5275412766556942",
    "CVV": "172",
    "Expiration": "07/26",
    "Titular": "Rodrigo Serrano",
    "CrossBorderData": {
        "TargetCountryISO": "AR"
    },
    "CustomerId":251179
}

Response parameters

Regardless of the token you create, you receive the following parameters in the response.

PropertyTypeDescription
TokenIdstringRepresents the registered payment method without exposing its sensitive data.
Use this data to carry out payment transactions through the registered card.
IdCommerceTokenintId of the token created. For OT, the id is 0 as we store it for 10 minutes at maximum.
CreateddateDate and time of the card tokenization.
TypestringToken type created. It can be OneTime for OT or Commerce for CT.
BrandstringName associated with the brand of the payment card, for example, VISA.
OwnerstringName of the cardholder.
Last4stringThe last four digits of the card.
BinstringThe first six digits of the card number. This number identifies the issuing bank.
CardExpMonthintMonth of the expiration date.
CardExpYearintYear of the expiration date.
IssuerBankstringName of the Issuing Bank.
CardTypestringType of the card.
PaymentMediaIdintIdentifier of the payment method.
AffinityGroupstringAffinity program of the card.
ErrorobjectError that the system can launch during the tokenization process.

Response example

For One Time Token

{
    "TokenId": "OT__OnZr7uB0WcBIxTZDYgelObTuqbROpSxJ4jiYpVJ8SzQ_",
    "IdCommerceToken": 0,
    "Created": "2023-09-04T12:29:56.0351102",
    "Type": "OneTime",
    "Brand": "MasterCard",
    "Owner": "Rodrigo Serrano",
    "Last4": "0015",
    "Bin": null,
    "CardExpMonth": 8,
    "CardExpYear": 30,
    "Error": null,
    "IssuerBank": null,
    "CommerceAction": null,
    "CardType": "CreditCard",
    "Installments": null,
    "PaymentMediaId": 2,
    "AffinityGroup": null,
    "CardId": null
}

For Commerce Token

{
    "TokenId": "CT__i10IcFjy3amyaNLK0D4isUI5PXmTO5ytnM5Xdz7VMRE_",
    "IdCommerceToken": 42909,
    "Created": "2023-09-04T12:29:10.4160761",
    "Type": "Commerce",
    "Brand": "MasterCard",
    "Owner": null,
    "Last4": "0015",
    "Bin": "529991",
    "CardExpMonth": 8,
    "CardExpYear": 30,
    "Error": null,
    "IssuerBank": null,
    "CommerceAction": null,
    "CardType": null,
    "Installments": null,
    "PaymentMediaId": 2,
    "AffinityGroup": null,
    "CardId": null
}
footer
Last modified December 20, 2024

© Bamboo | All rights reserved 2024