notifyTransfer
WorldFirst uses the notifyTransferResult interface to send transfer result notifications to the Partner. Partner needs to process the result and response to WorldFirst indicating the reception of the notification.
Note: By consuming this interface, the Partner mainly engages with the
transferResult
field.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Request parameters
Field | Data type | Required | Description |
transferResult | Result object | Yes | Indicates the result of the transfer request. Note:
|
transferRequestId | String | Yes | The unique ID assigned by the Partner to identify a transfer request. Note:
More information:
|
transferId | String | Yes | The unique ID assigned by WorldFirst(Alipay) to identify a transfer. More information:
|
transferFinishTime | Datetime object | Yes | Indicates the finishing time of a transfer. Note:
|
transferFromDetail | TransferFromDetail object | Yes | The transfer amount submitted by the payer. |
transferToDetail | TransferToDetail object | Yes | The transfer details for the beneficiary, such as the transfer amount collected by the beneficiary. |
transferFactor | TransferFactor object | Yes | Indicates different scenarios for the transfer, such as: remitting to China in CNY, or remitting to countries/regions other than China. Note:
|
Result processing logic
In the request message:
- The
transferResult.resultCode
field indicates the result of the prefunding process. For more information, refer to the Result codes section.
After receiving the notification from WorldFirst(Alipay), the Partner needs to send WorldFirst(Alipay) a response message to acknowledge the receipt of the notification.
The Partner needs to properly sign the message before making the response. For details, refer to the Sign a request and validate the signature chapter.
The response header observes the following structure:
Header field | Required | Code sample |
Signature | Yes | Signature: algorithm=RSA256, keyVersion=2, signature=**** |
Content-Type | Yes | Content-Type: application/json; charset=UTF-8 |
Client-Id | Yes | Client-Id: **** |
Response-Time | Yes | Response-Time: 2019-04-04T12:08:56+08:00 |
Sample response header:
{
"headers": {
"Content-Type": "application/json",
"client-id": "5J5Y2Z1GSG5ET508239",
"response-time": "2022-03-07T07:49:27Z",
"signature": "algorithm=RSA256,keyVersion=1,signature=VelVji6jp8UJVrBUvZrwij8uPmjc//hfmVJqCCW0x+Yh/HEs5pz9wiMyYLRjykTOii+f5EznxcFIUxPae5KITe3fChufJzFhJ4iku5U/w6exmBWVR5vrvQZSYO0vG5aJKwUQW/jjgaUWg1d+ySmaJ0VZ0pniQRtwYRGCvzdey+gI0+jMFbChIQDemZ0uLCExRQ0SBKAjEH/Vq14KlY88Wr2bR829tqsxaECSq2M5eeDC7j6FGPMazfX1W+EGqa2go2Hif6BnodwXzNsEAfQlUrbwCi9Ey/uNO4ScTX6FVG1nb+q8/k09wTkCz/nHnwTQolDrLRndZqZfz79a344/FQ=="
}
}
For more details about the response message, refer to the API overview chapter.
The response body has the following fixed value:
{
"result":{
"resultStatus":"S",
"resultCode":"SUCCESS",
"resultMessage":"success"
}
}
If the Partner does not respond to WorldFirst(Alipay) that the notification has been received successfully, WorldFirst(Alipay) will resend the result.
The following policy represents how WorldFirst(Alipay) makes retry attempts:
- WorldFirst(Alipay) retries notifications 7 times.
- Intervals between notifications: 2m, 10m, 10m, 1h, 2h, 6h, and 15h.
Response parameters
Field | Data type | Required | Description |
result | Result object | Yes | Indicates whether this API is called successfully. |
Result codes
result.resultCode
resultCode | resultStatus | resultMessage | Further action |
SUCCESS | S | Success | |
PROCESS_FAIL | F | A general business failure occurred. Do not retry. | Human intervention is usually needed. It is recommended that you contact WorldFirst Technical Support to resolve the issue. |
PARAM_ILLEGAL | F | Illegal parameters exist. For example, a non-numeric input, or an invalid date. | Check and verify whether the request fields, including the header fields and body fields, are correct and valid. For details on the fields of each API, see the specific API Structure section. |
REQUEST_TRAFFIC_EXCEED_LIMIT | U | The request traffic exceeds the limit. | Call the API again to resolve the issue. If the issue persists, contact WorldFirst Technical Support. |
INVALID_API | F | The called API is invalid or not active. | Check whether the correct API is being called. |
INVALID_CLIENT | F | The client is invalid. | The Client ID does not exist or is invalid. |
INVALID_SIGNATURE | F | The signature is invalid. | Make sure the request is properly signed with a valid signature. For more details, refer to the following chapter:
|
METHOD_NOT_SUPPORTED | F | The server does not implement the requested HTTP method. | Ensure the HTTP method is |
UNKNOWN_EXCEPTION | U | The API call is failed, which is caused by unknown reasons. | The service might be down, retry later. If the issue persists, contact WorldFirst Technical Support. |
ORDER_NEED_RETRY | U | Note: This result message explains the reason for the error. Retry the order to fix the issue. | Perform further actions according to the specific returned result message. |
transferResult.resultCode
resultCode | resultStatus | resultMessage | Further action |
SUCCESS | S | Success | |
PROCESS_FAIL | F | A general business failure occurred. Do not retry. | Human intervention is usually needed. It is recommended that you contact WorldFirst Technical Support to resolve the issue. |
PARAM_ILLEGAL | F | Illegal parameters exist. For example, a non-numeric input, or an invalid date. | Check and verify whether the request fields, including the header fields and body fields, are correct and valid. For details on the fields of each API, see the specific API Structure section. |
USER_NOT_EXIST | F | The user does not exist. | Retry with the correct user information. |
USER_ACCOUNT_ABNORMAL | F | The user account status is abnormal. | Retry with a different user. If the issue persists, contact WorldFirst Technical Support for more details. |
AMOUNT_EXCEED_LIMIT | F | The amount exceeds the limit. | Make sure the amount submitted is correct and retry. |
RISK_REJECT | F | The transfer is rejected for risk control reasons. | Prompt the user that the request is rejected because the risk control failed. |
TRANSFER_IN_PROCESS | U | The transfer is being processed. | Query the transfer result with the inquiryTransfer API. |
ORDER_IS_CLOSED | F | The order is closed. | Retry with another transfer order. |
ORDER_IS_REVERSED | F | The order is reversed. | Retry with another transfer order. |
CARD_INFO_NOT_MATCH | F | The card information does not match. | Retry with the correct card information. |
UN_SUPPORT_BUSINESS | F | Unsupported business. | Invalid parameters are used e.g. currency is incorrect. Retry with the correct information. |
BALANCE_NOT_ENOUGH | F | Balance is not enough. | Make sure the balance is sufficient and retry. |
Samples
Request
WorldFirst(Alipay) notifies the Partner with the following transfer result:
{
"transferFactor": {
"delegationMode": "TRANSFER",
"transferFundType": "GLOBAL_CNH_CN"
},
"transferFinishTime": "2022-01-14T16:58:50+08:00",
"transferFromDetail": {
"transferFromAmount": {
"currency": "USD",
"value": "2135"
}
},
"transferId": "2022******",
"transferRequestId": "106",
"transferResult": {
"resultCode": "SUCCESS",
"resultMessage": "success",
"resultStatus": "S"
},
"transferToDetail": {
"transferQuote": {
"quoteCurrencyPair": "USD/CNY",
"quoteId": "2022******",
"quotePrice": "6.48118695"
},
"transferToAmount": {
"currency": "CNY",
"value": "13837"
},
"transferToMethod": {
"paymentMethodMetaData": "{\"bankAccount\":\"{\\\"bankAccountNo\\\":\\\"********0002\\\",\\\"bankAddress\\\":{\\\"region\\\":\\\"CN\\\"},\\\"bankBIC\\\":\\\"ICBKCNBJ***\\\",\\\"bankName\\\":\\\"工商银行\\\",\\\"holderAccountName\\\":{\\\"fullName\\\":\\\"**\\\"},\\\"holderAccountType\\\":\\\"INDIVIDUAL\\\"}\",\"paymentMethodDetailType\":\"bankAccount\"}",
"paymentMethodType": "BANK_ACCOUNT"
}
}
}
Response
The Partner processes the result and responds to WorldFirst(Alipay):
{
"result":{
"resultStatus":"S",
"resultCode":"SUCCESS",
"resultMessage":"success"
}
}