Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

createVaultingSession

POST /v1/vaults/createVaultingSession

This API is used to create a vaulting session for client-side SDK integration. Through this API response, Antom returns encrypted session data. You use the session data to initiate the client-side SDK. The SDK helps you complete the card vaulting process before initiating a payment.

Request parameters

paymentMethodType String  REQUIRED

The payment method type is included in payment method options. See Payment methods to check the valid values for card payments.  

More information:

  • Maximum length: 64 characters

vaultingRequestId String  REQUIRED

The unique ID that is assigned by a merchant to identify a card vaulting request. 

More information:

  • Maximum length: 64 characters

vaultingNotificationUrl String  

The URL that is used to receive the vaulting result notification. 

More information:

  • Maximum length: 2048 characters

passThroughMetadata String  

A set of key-value pairs that indicate your additional and custom information about the transaction. 

Specify this parameter if you want to provide more information about the transaction to your acquirer.

More information:

  • Maximum length: 2048 characters

Response parameters

result Result object REQUIRED

The result of the API call. 

Show child parameters

vaultingSessionData String  REQUIRED

The encrypted vaulting session data. Pass the data to your front end to initiate the client-side SDK.   

More information:

  • Maximum length: 4096 characters

vaultingSessionId String  REQUIRED

The encrypted ID is assigned by Antom to identify a vaulting session.   

More information:

  • Maximum length: 64 characters

vaultingSessionExpiryTime Datetime  REQUIRED

The specific date and time after which the vaulting session will expire. 

More information:

  • The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
API Explorer
Sample CodesRun in Sandbox

Request

URL
Request Body

Response

Response Body

Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess

The vaulting session is successfully created. No further action is needed.

PARAM_ILLEGALFThe required parameters are not passed, or illegal parameters exist. For example, a non-numeric input, an invalid date, or the length and type of the parameter are wrong.

Check and verify whether the required request fields (including the header fields and body fields) of the current API are correctly passed and valid.

PROCESS_FAILFA general business failure occurred.

Do not retry. Human intervention is usually needed. It is recommended that you contact Antom Technical Support to troubleshoot the issue.

UNKNOWN_EXCEPTIONUAn API call has failed, which is caused by unknown reasons.

Call the API again to resolve the issue. If not resolved, contact Antom Technical Support.