Receive association result notificationSignature required

POST /undefined

After trade orders are submitted, Worldfirst will call this API to notify the B2B Partners of the trade order submission result.

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

notifyRequestId String  REQUIRED

The notification number of trade submission results defined by WorldFirst

More information:

  • This field is an API idempotency field.
  • Maximum length: 64 characters

extRequestId String  REQUIRED

The request number of trade submission results assigned by the Partner

More information about this field:

  • This field is identical to the requestId defined by submitTradeOrder API.
  • Maximum length: 64 characters

associationResult Result  REQUIRED

The trade submission result 

Show child parameters

notificationType String  

The dimension of risk audit results or order association results. 

Valid values are: 

  • ASSOCIATION_RESULT: indicates whether the association of trade orders to the fund order is successful.
  • ASSOCIATION_DETAIL_RESULT: indicates whether the risk control review of the trade order has passed. 

referenceOrderNo String  CONDITIONAL

Indicates the trade order number provided by the partner. 

This parameter is required when notificationType is ASSOCIATION_DETAIL_RESULT 

More information:

  • Maximum length: 64 characters

Response parameters

result Result  REQUIRED

Result of API calling

Show child parameters
API Explorer

Request

Request Body

Response

Response Body

Request processing

In the request message:

  • associationResult.resultCode: indicates the trade submission result, see AssociationResult section in result code for details.

Note: After the Partner calls submitTradeOrder API, WorldFirst create, associate, and verify trade orders, which are asynchronous operations. In the process, it can not be retrieved by retrying, in the case that the operation fails due to the change of trade or collection order, for example, a collection order is refunded.

The Partner needs to update the order, change the reqeustId, and retry calling submitTradeOrder API to submit the order.

To verify if the message is received, the Partner is required to send the notification to WorldFirst after receiving the requests from it.

Before sending the response message, the request's signature should be valid.

Response header:

Parameter

Required

Example

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 of the response body

Sample Code


WorldFirst resends request notification, if the Partner does not send response message to it. The rule for resending is:

  • Maximum times of retrying: 7
  • Interval between two requests: 2 minutes, 10 minutes, 10 minutes, 1 hour, 2 hours, 6 hours, 15 hours. 

AssociationResult.resultCode

CodeValueMessageFurther action
ASSOCIATION_FAILEDFInvalid parameter exists (wrong data type, wrong data length, or unspecified parameter).

Update the trade order or its associated information, change order reqeustId, and retry. 

ASSOCIATION_FAILEDFInvalid amount parameter exists.

Update the trade order or its associated information, change order reqeustId, and retry. 

ASSOCIATION_FAILEDFtradeType values are inconsistent for trade orders.

Update the trade order or its associated information, change order reqeustId, and retry. 

ASSOCIATION_FAILEDFAbnormal collection order.

The refunded collection order can not be synchronized in batch or associated. Verify the collection order is in success status. 

ASSOCIATION_FAILEDFAccess denied.

The order can not be synchronized in batch or associated. Contact WorldFirst technical support for a specific reason. 

ASSOCIATION_FAILEDFtradeType of a trade order is not supported.

This type of order can not be submitted or associated. Contact WorldFirst technical support for a specific reason. 

ASSOCIATION_FAILEDFAbnormal trade order exists.

The order is abnormal. Contact WorldFirst technical support for a specific reason. 

ASSOCIATION_FAILEDFThe number of associated trade orders exceeds the limit.

Update the number of order associations, change order reqeustId, and retry. 

ASSOCIATION_FAILEDFThe intended association amount is incorrect.

Update the associated order amount, change order reqeustId, and retry.

Note: The submitted order amount can not be modified. 

ASSOCIATION_FAILEDFtradeType values are inconsistent for partial associations of the same collection order.

Update order type, change order reqeustId, and retry. 

ASSOCIATION_FAILEDFAn internal system error has occurred. Do not retry.

Contact WorldFirst technical support. 

ORDER_SUBMISSION_FAILEDFInvalid parameter exists (wrong data type, wrong data length, or unspecified parameter).

Update the order or its associated information, change order reqeustId, and retry. 

ORDER_SUBMISSION_FAILEDFInvalid amount parameter exists.

Update the order or its associated information, change order reqeustId, and retry. 

ORDER_SUBMISSION_FAILEDFtradeType values are inconsistent for trade orders.

Update the order or its associated information, change order reqeustId, and retry. 

ORDER_SUBMISSION_FAILEDFAbnormal collection order.

The refunded collection order can not be synchronized in batch or associated. Verify if it is in the status of success.

ORDER_SUBMISSION_FAILEDFAccess denied.

The order can not be associated in batch or associated. Contact WorldFirst technical support for a specific reason. 

ORDER_SUBMISSION_FAILEDFtradeType of a trade order is not supported.

This type of order can not be submitted or associated. Contact WorldFirst technical support for a specific reason. 

ORDER_SUBMISSION_FAILEDFAbnormal trade order exists.

The order is abnormal. Contact WorldFirst technical support for a specific reason. 

ORDER_SUBMISSION_FAILEDFThe number of associated trade orders exceeds the limit.

Update the number of order associations, change order reqeustId, and retry. 

ORDER_SUBMISSION_FAILEDFThe intended association amount is incorrect.

Update the associated order amount, change order reqeustId, and retry.

Note: The submitted order amount can not be modified. 

ORDER_SUBMISSION_FAILEDFtradeType values are inconsistent for partial associations of the same collection order.

Update order type, change order reqeustId, and retry. 

ORDER_SUBMISSION_FAILEDFAn internal system error has occurred. Do not retry.

Contact WorldFirst technical support. 

VERIFICATION_DENIEDFThe verification has been denied.

The order synchronization fails. The order update is denied. Contact WorldFirst technical support. 

ADDITIONAL_FILE_NEEDEDFAn additional file is needed for the verification.

An additional file is in need of order association. Log in WorldFirst and provide supplemental materials manually. 

VERIFICATION_PASSEDSThe verification has passed.

Result.resultCode

CodeValueMessage
SUCCESSSSuccess
PROCESS_FAILFA general business failure occurred. Do not retry.
UNKNOWN_EXCEPTIONUThe API call fails, which is caused by unknown reasons.

@2024 WorldFirst