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

notifySettlement

Antom uses the notifySettlement interface to send the settlement result of the funds transfer to the marketplace when the settlement reaches a final state of success or failure.

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

settlementBatchId String  REQUIRED

The unique ID that is assigned by Antom to identify a settlement cycle. 

More information:

  • Maximum length: 64 characters

notifyType String  REQUIRED

The notification type about the settlement. The value of this parameter is fixed to SETTLEMENT_RESULT.  

More information:

  • Maximum length: 64 characters

referenceMerchantId String  

The unique ID that is assigned by the marketplace to identify the sub-merchant.

This parameter is returned when the value of settleTo is SELLER

More information:

  • Maximum length: 32 characters

settleTo String  REQUIRED

The destination where the funds of a successful payment are settled. Valid values are:

  • SELLER: indicates that the funds are settled to the seller. 
  • MARKETPLACE: indicates that the funds are settled to the marketplace.  

More information:

  • Maximum length: 32 characters

settlementArrivalTime Datetime  

The date and time when the settlement funds arrive at the account of the marketplace or sub-merchant. 

This parameter is returned when the value of result.resultStatus is S.  

More information:

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

actualSettlementAmount Amount  REQUIRED

The actual settlement amount that arrives at the account of the marketplace or sub-merchant.  

Show child parameters

result Result  REQUIRED

Details about the settlement result, such as settlement status, result code, and result message. 

Show child parameters

Response parameters

result Result  REQUIRED

A fixed value, which is sent to Alipay to acknowledge that the notification is received.

Show child parameters
API Explorer

Request

Request Body

Response

Response Body

Result processing logic

Send the following message with fixed values to Antom after receiving the notification, to acknowledge that the notification from Antom is received:

Sample Code

If no such message is returned to Antom due to operation issues or network issues, Antom will send the notification again and again until the required message is returned by the merchant. Resending of the notification will be performed within 24 hours after the first notification is sent. The notification will be resent up to eight times, with an interval of 0s, 2min, 10min, 10min, 1h, 2h, 6h, and 15h. 

Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess

N/A 

SETTLEMENT_FAILEDFThe settlement failed due to some reasons, such as an invalid card number.

Contact Antom Technical Support for detailed reasons.  

SETTLEMENT_REVERSEDFThe settlement is reversed and funds are returned to the marketplace's and sub-merchants' Antom settlement accounts respectively.

Contact Antom Technical Support for detailed reasons.