Skip to main content

Create


  • Description: Tokenize credit card that can later used to make a payment without store the card data by yourself
  • Path: /tokenization/add-token
  • Method: POST
  • Request Header: Content-Type: application/json

Request Parameters#

ParameterTypeRequiredDefaultDescription
merchantIdstringYMerchant identifier
userIdstringYMerchant's user identifier
reasonstringOReason to create token
callbackUrlobjectO 
callbackUrl.successstringOFor redirect to merchant website, after successful tokenize
callbackUrl.failstringOFor redirect to merchant website, after fail tokenize
callbackUrl.notifystringOMerchant backend listening endpoint, to receive notification
langstringODefault language ("zh-HK" or "en"), browser detected if not provide
showLangbooleanO1Display language options 1:Show 0:Hide

Example:

{
"request": "{\"merchantId\":\"3000001\",\"userId\":\"User01\",\"reason\":\"Forwallet\",\"callbackUrl\":{\"fail\":\"https://www.bbmsl.com/fail\",\"success\":\"https://www.bbmsl.com/success\",\"notify\":\"https://www.bbmsl.com/notify\"}}",
"signature":"c1hTR2RBNHRSNEIwd25GNk5yOFNocGZOTXRISVNXdXpMcGRLb05Xc2tJZ0Njc3BNVkZGemdrZXo0QnJtdFlYa01xWmgxdHl6LzhzTk5VM0YyVlR1MGZPeCtaUDRDbm1Wak51OGJjaXU0aFR0bnl0QTNZMUdaL3lYQVVEK21WWUdYZXlETzNmSHJxRGRJN2szeFYvUThGQ09kMGN1bFRzTjZSUk14TVpxK29xUjJ4K0VqT1hWb2ZwN0JaSndoUUU4VXM0QWw1NzNGUXo1RUhEdkNMeDM1bHEyaG9NaFhMQ1ZMVkRCSGNwQ2dvdHVZNG1nOTFNWGgvcXFjRkdZL2hRS2hHZFdBYlo5dGNwMlE1czJFU2gzN3JxeG5Pd1pycmVwSzhOQzZ2TUJQVWlTUHhRZWZwZXYybkcwSnpBSE9qUlBiQlhZdzFYQlM2UkJZS0FtdWZaWmlRPT0="
}

Response Parameters#

ParameterTypeRequiredDescription
responseCodestringYPayment Gateway response code
messagestringYPayment Gateway response message
datastringYURL to hosted tokenize page

Example:

{
"responseCode": "0000",
"message": "SUCCESS",
"data": "https://checkout.dev.bbmsl.com/token?sid=ss787sxsxssressxs4234212",
}

After getting the response data, you need to guide your user by redirecting to the URL to complete the tokenization of credit card, Apple pay or Google pay.