Antom, leading provider of tailored payment solutions

fetchNonce

POST /v1/payments/fetchNonce
Use the fetchNonce API to collect card information when you do not have PCI qualifications.

Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Note: Set the data type of each field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:
  • If the data type of a field is Integer and its value is 20, set it as "20".
  • If the data type of a field is Boolean and its value is true, set it as "true".

Request parameters

card Card  REQUIRED

The card information.

Response parameters

cardToken String  REQUIRED

The token of the card. The value of this parameter is used by paymentMethodId in the pay (Checkout Payment) API when initiating payments.

More information:

  • Maximum length: 255 characters

result Result  REQUIRED

The result of the API call.
API Explorer

Request

URL
Method
POST
json
{
  "card": {
    "cardNo": "4111111111111111",
    "cvv": "123",
    "expiryMonth": "11",
    "expiryYear": "2028",
    "cardholderName": {
      "firstName": "Tom",
      "lastName": "Jerry"
    }
  }
}

Response

json
{
  "cardToken": "PYMT2f76a5bc2e244d1eaba993d7e5e6bbf3",
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "success.",
    "resultStatus": "S"
  }
}

Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess
PROCESS_FAILFThe called API is failed.
Do not retry. Human intervention is usually needed. It is recommended that you contact Alipay Technical Support to troubleshoot the issue.