Payment Token API

Available upon request


Token API - Generate Token / Provisioning

For merchants to generate the payment token without payment authorization.PCI-DSS Attestation of Compliance (AoC) is required in order to unlock this API for merchant.


Formula of signature

hash_hmac( 'SHA256',  {action}{billing_email}{billing_mobile}{billing_name}{custID}{detail}{merchantID}{token_type}, {verify_key} )

Token API - Retrieve Token

For merchants to retrieve the token based on the buyer information.


Formula of signature

hash_hmac( 'SHA256', {action}{billing_email}{billing_mobile}{billing_name}{merchantID}{token_type}, {verify_key} )

Token API - Retrieve Buyer Information

Available upon request. For merchants to retrieve the token information such as credit card first 6 and last 4 digit, credit card exp date, card type and the issuer information.


Formula of signature

hash_hmac( 'SHA256', {action}{merchantID}{token}, {verify_key} )

Token API - Edit Token Details

Available upon request. For merchants to modify the token detail based on the generated active token.


Formula of signature

hash_hmac( 'SHA256', {action}{billing_email}{billing_mobile}{billing_name}{detail}{merchantID}{token}, {secret_key} )

Token API - Delete Token

Available upon request. For merchants to delete the token based on buyer information.


Formula of signature

hash_hmac( 'SHA256', {action}{billing_email}{billing_mobile}{billing_name}{merchantID}{token}, {secret_key} )

Token API - Error Handling

PG will respond the following in JSON format once error occurs (negative result).

Field NameData Type(Size)Description
statusa5false - request failed/error
error_coden4Refer to Appendix A
error_descans-254Refer to Appendix A

Token Error Code & Description in JSON.

Error CodeError MessageDescription
TK01Invalid parameter value parameter_nameOne or more parameters contain invalid values.
TK02Missing parameter value parameter_nameRequired parameter is missing.
TK03Merchant info not foundThe provided merchant information does not exist or is invalid.
TK04Incorrect signatureSignature verification failed.
TK05Record not foundThe requested token or record could not be found in the system.

Token API - Detail

Merchants will include the following information while requesting the following token action.


ADD_TOKEN

Token TypeVariable / ParameterType Format / Max LengthDescription / Example
Tcardnumbern16Card number to tokenize.
monthMM2Expiry month
yearYYYY4Expiry year

Procedure to generate:

  1. Request PG to provide RSA public key.
  2. JSON encode the variable and its data.
  3. Using OpenSSL to encrypt the JSON information with an RSA public key.
  4. Base64 encode the encrypted data generated from the OpenSSL public key encryption.
  5. Add the output in the detail variable.

EDIT_TOKEN_DETAILS

Token TypeVariable / ParameterType Format / Max LengthDescription / Example
Tbilling_nameas32Buyer’s full name
billing_mobilens32Buyer’s mobile number or contact number.
billing_emailans128Buyer’s email address.

Procedure to generate:

  1. JSON encode the variable and its data.
  2. Add the encoded JSON in the detail variable.
Language
Click Try It! to start a request and see the response here!