inquirePayment
POST
: /amsin/api/v1/business/inquiryPayOrder
After the Partner makes a payment, the Partner can inquire about the result of the payment order with this API.
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 |
payToRequestIds | List<String> | Yes(Conditional) | A list of the requests that the Partner inquires about. Each request is identified by a unique Note:
More information:
|
payToIds | List<String> | Yes(Conditional) | A list of the requests that the Partner inquires about. Each request is identified by a unique Note:
More information:
|
Response parameters
Field | Data type | Required | Description |
result | Result object | Yes | Indicates the result of the payment order. |
payToSummaries | Array<PayToSummary object> | Yes | Details about the payment that the Beneficiary receives. |
paymentDetailSummaries | Array<PaymentDetailSummary object> | Yes | Details about the payment, such as the payment amount, payment method, etc. Note:
|
feeDetailSummaries | Array<FeeDetailSummary object> | Yes | Details about fees. |
Result processing logic
To get the result of the payment order, you can call the inquirePayment API or wait for the asynchronous notification to obtain the payment result:
- If the payment is successful, proceed with other tasks.
- If the payment is being processed, call the inquirePayment API again or wait for the result notification from the notifyPayment API.
- If the payment is not successful, call the createCashierPayment API again with a different
payToRequestId
.
After calling the API, a response is returned. The possible responses for result.resultStatus
are:
Result status | Description |
S | This indicates the API call succeeded. |
F | This indicates the API call failed. For more information on why the call failed, see |
U | This indicates the API call result is unknown. Partner can make a query when the returned status is
If none of the queries is successful, contact WorldFirst Technical Support. |
Note: result.resultStatus
only indicates the result of the API request. For the payment result, refer to the payToSummaries.orderResult.status
.
Possible values for payToSummaries.orderResult.status
are:
payToSummaries.orderResult.status | Description |
WAIT_PAY | WorldFirst is processing the payment. |
PAY_SUCCESS | Payment is successful. |
PAY_FAILED | Payment failed. |
PAY_CANCELLED | Payment is canceled. |
Result codes
resultCode | resultStatus | resultMessage | Further action |
SUCCESS | S | Success | |
PROCESSING | S | The payment order is being processed. | Call the inquirePayment API again for the payment order result or wait for notifications. |
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. |
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. |
Samples
Request
{
"payToRequestIds":["requestId_*****"]
}
Response
{
"feeDetailSummaries": [
{
"feeAmount": {
"currency": "USD",
"value": "3"
},
"paymentMethodType": "WALLET_WF"
}
],
"payToSummaries": [
{
"orderResult": {
"status": "PAY_SUCCESS"
},
"payToAmount": {
"currency": "USD",
"value": "1000"
},
"payToCreateTime": "2022-06-17T01:43:58-07:00",
"payToId": "*****",
"payToRequestId": "requestId_*****"
}
],
"paymentDetailSummaries": [
{
"paymentAmount": {
"currency": "USD",
"value": "1000"
},
"paymentMethodMetaData": "{}",
"paymentMethodType": "WALLET_WF"
}
],
"result": {
"resultCode": "SUCCESS",
"resultMessage": "success.",
"resultStatus": "S"
}
}