Callback Request Instructions
Overview
When the order status changes, our system will send a callback request to your server to notify you of the latest order status. This document describes the format and content of the callback request you will receive.
Request Headers
The request will include the following headers:
- Content-Type: application/json, indicating that the data being sent is in JSON format.
- Oc-Signature: A string that provides a signature verification of the request content. This is to ensure the authenticity and integrity of the request.
Request Body
The request body is a JSON-formatted string containing the following fields:
- transaction_type (string): Transaction type.
- merchant_uid (string): Merchant's unique identifier.
- amount (string): Transaction amount.
- final_amount(string): The final amount of the transaction.
- currency (string): Currency code used for the transaction.
- notify_url (string): URL address for receiving the callback.
- merchant_order_id (string): Merchant's order ID.
- payment_status (string): Payment status.
- payment_fail_reason: The reason for the most recent failure (does not necessarily represent the current status as failed,
- just the reason for the last failure).
- order_uid (string): Unique identifier for the order.
- signature_key (string): The key used to generate the signature.
- tenant (string): Tenant identifier.
Example Request Body
{
"transaction_type": "income",
"merchant_uid": "123456789",
"amount": "100.00",
"final_amount": "100.00",
"currency": "USD",
"notify_url": "https://yourserver.com/notify",
"merchant_order_id": "ORD1234567",
"payment_status": "completed",
"payment_fail_reason": "Failure reason",
"order_uid": "UID123456789",
"signature_key": "YourSignatureKey",
"tenant": "YourTenantID"
}
Signature Verification
Please use the provided Oc-Signature request header and your key to verify the signature of the request. This is to ensure that the request was issued from our system and that the request content has not been tampered with during transmission.
Response Requirements
Please ensure that your server can correctly handle this callback request and return a status code of 200 along with a simple text response of "success." If the response our system receives is not 200 or the returned content is not "success," we will regard the callback as failed and may implement further retry mechanisms.