Receive payout result notification
WorldFirst sends notifications of the payout result with this interface. The Partner can set up the URL for receiving payout notifications by specifying the transferToDetail.transferNotifyUrl
field when calling createPayout.
The Partner needs to acknowledge the reception of the notification. For more details, refer to the Result processing logic section.
Structure
A message consists of a header and body.
Request header parameters
Field | Required | Sample | Description |
Client-Id | Yes |
| For detailed field descriptions, see API Overview. |
Signature | Yes |
| |
Content-Type | Yes |
| |
Request-Time | Yes |
|
Request body parameters
Field | Data type | Required | Description |
transferResult | Result object | No | Indicates the result of the payout request. |
transferRequestId | String | No | The unique ID assigned by the Partner to identify a payout request. Note:
More information:
|
transferId | String | No | The unique ID assigned by WorldFirst to identify a payout. More information:
|
transferFinishTime | DateTime object | No | Indicates the finishing time of a payout. Note:
|
transferFromDetail | TransferFromDetail object | No | Payout details submitted by the payer. |
transferToDetail | TransferToDetail object | No | Payout details for the beneficiary. |
transferOrderAddition | TransferOrderAddition object | No | Additional information about the payout, such as information about the payer and the beneficiary. |
Result processing logic
transferResult.resultStatus
indicates the result of the payout. For more details, refer to the result codes section.
After receiving the notification, you need to send 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:
- Signature: Required. Example:
Signature: algorithm=RSA256, keyVersion=2, signature=*****
- Content-Type: Required. Example:
Content-Type: application/json; charset=UTF-8
- Client-Id: Required. Example:
Client-Id: *****
- Response-Time: Required. Example:
Response-Time: 2019-04-04T12:08:56+08:00
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"
}
}
In the absense of an ackowledgement reponse from the Partner, WorldFirst will resend the result.
The following policy represents how WorldFirst makes retry attempts:
- WorldFirst retries notifications 7 times.
- Intervals between notifications: 2m, 10m, 10m, 1h, 2h, 6h, and 15h.
Response body 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 | |
UNKNOWN_EXCEPTION | U | API failed due to unknown reason. | The service might be down, retry later. |
PROCESS_FAIL | F | A general business failure occurred. Do not retry. | Human intervention is usually needed. |
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 our Technical Support Team to resolve the issue. |
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 our Technical Support Team 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. |
ORDER_IS_CLOSED | F | The order is closed. | Retry with another payout order. |
ORDER_IS_REVERSED | F | The order is reversed. | Retry with another payout order. |
CARD_INFO_NOT_MATCH | F | The card information does not match. | Retry with another payout order. |
BALANCE_NOT_ENOUGH | F | Balance is not enough. | Make sure the balance is sufficient and retry. |
Samples
Request
Request sample 1
{
"transferResult": {
"resultCode": "SUCCESS",
"resultMessage": "success.",
"resultStatus": "S"
},
"transferRequestId": "*****",
"transferId": "*****",
"transferFromDetail": {
"transferFromAmount": {
"currency": "USD",
"value": 1000
}
},
"transferToDetail": {
"purposeCode": "GDS",
"transferToAmount": {
"currency": "EUR",
"value": 938
},
"feeAmount": {
"currency": "USD",
"value": 10
},
"transferToMethod": {
"paymentMethodId": "*****",
"paymentMethodType": "BANK_ACCOUNT_DETAIL"
},
"transferQuote": {
"quoteId": "*****"
},
"transferMemo": "memo shows in worldfirst statement",
"transferRemark": "remark shows in bank statement"
},
"transferOrderAddition": {
"referenceOrderId": "*****"
}
}
Request sample 2
{
"transferResult": {
"resultCode": "ORDER_IS_REVERSED",
"resultMessage": "The order is reversed.",
"resultStatus": "F"
},
"transferRequestId": "*****",
"transferId": "*****",
"transferFromDetail": {
"transferFromAmount": {
"currency": "USD",
"value": 1000
}
},
"transferToDetail": {
"purposeCode": "GDS",
"transferToAmount": {
"currency": "EUR",
"value": 938
},
"feeAmount": {
"currency": "USD",
"value": 10
},
"transferToReturnAmount": {
"currency": "EUR",
"value": 918
},
"transferToMethod": {
"paymentMethodId": "*****",
"paymentMethodType": "BANK_ACCOUNT_DETAIL"
},
"transferQuote": {
"quoteId": "*****"
},
"transferMemo": "memo shows in worldfirst statement",
"transferRemark": "remark shows in bank statement"
},
"transferOrderAddition": {
"referenceOrderId": "*****"
}
}
Response
Response header
{
"headers": {
"Content-Type": "application/json",
"client-id": "*****",
"response-time": "2022-03-07T07:49:27Z",
"signature": "algorithm=RSA256,keyVersion=1,signature=abc*****"
}
}
Response body
{
"result": {
"resultCode": "SUCCESS",
"resultMessage": "success.",
"resultStatus": "S"
}
}