Create a transfer
Once the prerequisite steps are completed, the Customer can create a transfer request.
Workflow
The following figure illustrates the overall process of a transfer:
Figure 1. Transfer process
Procedure
Step 1. Create a transfer
The transfer process consists of the following steps:
- The Customer makes a transfer request to the Partner.
- The Partner needs to send an API request with the inquiryBalance API to WorldFirst.
Note: This step is the best practice before making a request with the transfer API, which ensures sufficient funds before creating a transfer request. |
- If the Customer makes a cross-currency payment, the Partner needs to get currency exchange rates with the inquiryQuote API.
- The Partner initiates a transfer with the transfer API. WorldFirst accepts the transfer request and returns relevant information to the Partner.
Note: The transfer process is asynchronous. WorldFirst responds to the Partner with the processing status of the transfer, rather than the final result of the transfer. To query the final transfer result, use the inquiryTransfer API. |
- After the payment is completed, the Partner can check the payment result with the inquiryTransfer API. WorldFirst returns the Partner with information such as transfer status, transfer amount, payment method, and transfer order ID.
- Once WorldFirst finishes processing the transfer request, WorldFirst notifies the Partner with the notifyTransferResult API. The Partner can forward the result of the transfer order to the Customer.
Step 2. Inquire about the payment result
To obtain the transfer status, you can monitor the asynchronous notification or actively call the inquiryTransfer API to get the transfer status. Although a retransmission mechanism exists for the asynchronous notification, the notification might not be received due to network issues when the user successfully completes the transfer. Therefore, it is necessary to actively inquire about the transfer result by using the inquiryTransfer API.
Usually, when you encounter one of the following cases, call the inquiryTransfer API:
- The Partner can inquire about the transfer result 5 seconds after initializing a transfer.
- No clear transfer result can be obtained. For example, when the transfer result notification is not received within 30 minutes after receiving the response from the transfer API.
Step 3. Receive payment notification
WorldFirst sends the Partner the result of the transfer order after processing. The transfer result notification is carried out with the notifyTransferResult API. After receiving the transfer result notification, you must take the corresponding action to process the notification.
After receiving the transfer result notification, you need to take the following actions:
- Verify the signature: to check whether the transfer result notification is sent by WorldFirst.
The transfer result notification from WorldFirst is signed by WorldFirst. It is recommended to verify the signature and check whether the notification is sent by WorldFirst. For more details, refer to the Sign a request and validate the signature chapter.
- Return a receipt acknowledgment message: to let WorldFirst know that you have already received the notification.
After verifying the signature and confirming that the notification is from WorldFirst, you need to return a receipt acknowledgment message to WorldFirst to inform WorldFirst of a successful receipt of the notification.
The example below shows the body of the message you send to WorldFirst:
{
"result":{
"resultCode":"SUCCESS",
"resultMessage":"success.",
"resultStatus":"S"
}
}
If the Partner fails to respond to WorldFirst and acknowledges the receipt of the message, WorldFirst will try to resend notifications. WorldFirst uses the following rules to send notifications:
- Times: 7
- Time intervals between each request: 2 min, 10 min, 10 min, 1 h, 2 h, 6 h, 15 h
Next steps
- The Customer can log into the WorldFirst website to check balances.
- WorldFirst pulls transaction data from the Partner with the pullTransactionData API. This process occurs the next day after the Partner calls the transfer API.