WorldFirst DocsWorldFirst Docs

Receive trade order result notification

After trade orders are closed, WorldTrade calls this API to notify the Partners of the trade order result.

Note:

  • You need to respond to the notification from WorldFirst by signing and sending the response message. For steps on how to construct the signature, please refer to the Sign a request and validate the signature chapter.
  • The response message must also have proper header fields. For details, please refer to the API overview chapter. Make sure you use the Response-Time header (not Request-Time) to indicate the time of sending this response.

Structure

Messages consist of a header and body. The following sections focus on the body structure. For the header structure, see:

Request parameters

requestId String  REQUIRED

The unique ID that identifies the request to create a trade order.

More information:

  • Maximum length: 64 characters

tradeId String  REQUIRED

The unique trade ID assigned by WorldTrade.

More information:

  • Maximum length: 64 characters

isRefund String  REQUIRED

Indicates the trade order refund results. Valid values are:

  • Y: Refunded
  • N: Not refunded

Response parameters

result Result  REQUIRED

The result of the API call.

Show child parameters
API Explorer

Request

Request Body

Response

Response Body

Result processing logic

After receiving the notification, you need to send a response message to acknowledge the receipt of the notification.

Make sure you properly sign the message before sending the response. For details, refer to the Sign a request and validate the signature chapter.

For more details on the response header, refer to the API overview chapter.

The response body has the following fixed value:

Sample Code

If WorldTrade does not receive an acknowledgment, it will resend the notification with the following schedule:

  • Total retries: 7
  • Retry intervals: 2 min, 10 min, 10 min, 1 h, 2 h, 6 h, and 15 h.

result.resultCode

CodeValueMessageFurther action
SUCCESSSSuccess
PROCESS_FAILFA 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.

UNKNOWN_EXCEPTIONUAPI failed due to unknown reason.

The service might be down, retry later. If the issue persists, contact our Technical Support Team.