Disclaimer: This article contains AI translations and should only be used as reference. Contact Cobo’s support team through help@cobo.com if you have any questions.
- Fixed amount: The amount payable is specified when the order is created
- Validity period: Payers need to complete payment within the specified time
- Exception handling: Supports handling various exception situations, including:
- Canceling orders that have not been paid
- Initiating refunds for paid orders
- Handling payment exceptions such as overpayment, underpayment, and late payment
Create order
You can create payment orders through Payments API or Checkout SDK.Prerequisites
You have completed all the steps mentioned in Preparation.Implementation steps
- Payments API
- Checkout SDK
- After the payer selects the token and chain to use for payment, you can first call Get exchange rate to obtain the real-time reference exchange rate. Based on the product order amount and reference exchange rate, you can calculate the estimated amount payable and display it to the payer.
-
After the payer confirms payment, call Create pay-in order to create a payment order. When creating an order, you need to provide the following key parameters:
- Merchant ID (
merchant_id
): Merchant ID, assigned by Cobo when you register the merchant. - Token and chain (
token_id
): The token and chain type selected by the payer for payment. - Currency (
currency
): The currency of the product order, currently onlyUSD
is supported. - Product order amount (
order_amount
): The amount payable for the product order. - Developer fee (
fee_amount
): The developer fee you charge to the merchant. If you are a merchant serving payers directly, you can set this field to0
. Refer to Funds allocation and balances for more information about developer fees. - Expiration time (
expired_in
): The validity period of the payment order in seconds. Calculated from the time of the create order request. When the order expires:- The order status changes to a final state and cannot be changed
- The
received_token_amount
field is no longer updated - If funds are received again, it will trigger the
transactionLate
webhook event, and the funds will not be counted towards the actual received funds for this order
- Developer order number (
psp_order_code
): Please set this field to the unique number of the order in your system.
- Amount payable (
payable_amount
): The final amount the payer needs to pay. Due to exchange rate fluctuations, this amount may differ from your estimated amount payable. - Receiving address (
receive_address
): The receiving address generated by Cobo for the order based on the token and chain selected by the payer.
- Merchant ID (
Sample code in Python
Sample code in Python
Sample code in Java
Sample code in Java
Query order status
You can subscribe to the following webhook events to receive real-time update notifications of order status. Refer to Webhook reference to understand the trigger time and returned data structure of each event.payment.status.updated
payment.transaction.created
payment.transaction.late
payment.transaction.held
payment.transaction.completed
- Payments App
- Payments API
- Log in to Cobo Portal development environment or production environment.
- In the left navigation bar, click Apps, then click the Payments card to launch the App.
- In the App’s left navigation bar, click Orders. You can view detailed information of all orders on this page, such as order ID, merchant information, payment amount, order status, etc.
- After the payer completes payment and the transaction passes compliance screening, the order status will change to Completed.

Exception situations
In order mode, you may need to handle the following exception situations.Cancel payment order
When a payment order is in thePending
status, that is, no deposit transaction has been detected yet, you can call Update pay-in order to cancel the order. After cancellation, the order status will change to Expired
.
Call example
The following is sample code for calling Update pay-in order to cancel an order:
Sample code in Python
Sample code in Python
Sample code in Java
Sample code in Java
Overpayment, underpayment, and late payment
The following three exception situations may occur during the payment process:Exception situation | Description | Impact |
---|---|---|
Overpayment | Within the order validity period, the payer’s actual payment amount exceeds twice the payable amount | The final order status is Completed . |
Underpayment | Within the order validity period, the payer’s actual payment amount is less than the amount payable | The order status is Underpaid (final state). |
Late payment | The payer makes the first or subsequent payment after the order expires | Does not change the order status. Each late payment will trigger one payment.transaction.late webhook event. |
Handle refund requests
You can initiate a refund order through Payments App or Payments API to refund funds to the payer. The following diagram shows the interaction process between payers, merchants, and Cobo during the refund process.Create refund order
- Payments App
- Payments API
- Log in to Cobo Portal development environment or production environment.
- In the left navigation bar, click Apps, then click the Payments card to launch the App.
- In the App’s left navigation bar, click Orders.
- Select the target order, then click the View Details button on the right.
- On the order details page, click the Refund button.
- In the pop-up form:
- Select the source of the refund amount. You can choose Merchant balance or Developer balance.
- Enter the refund amount. This amount must not exceed the corresponding merchant balance or developer balance.
- (Optional) Enter the fee amount. This fee will be deducted from the refund amount and credited to the developer balance. For a detailed description of developer fees, refer to Funds allocation and balances.
- Enter the receiving address. You can click Use original payment address, and the system will automatically fill in the original payment address for this order. If you want to refund to another address, you can also manually enter the target address.
- Click Preview to confirm that all information is correct, then click Submit to create the refund order.
Query refund order status
You can subscribe to thepayment.refund.status.updated
event to receive real-time updates on refund order status. Refer to Webhook reference to understand the detailed trigger conditions and returned data structure of each event.
You can also actively query refund order status through Payments App or Payments API.
- Payments App
- Payments API
- Log in to Cobo Portal development environment or production environment.
- In the left navigation bar, click Apps, then click the Payments card to launch the App.
- In the App’s left navigation bar, click Orders.
- Click the Refunds tab. In the refund order list, find the target order, then click the View Details button on the right.
- View the order status on the refund order details page.
Compliance screening failure
When a transaction receives thepayment.transaction.held
event but does not receive the payment.transaction.completed
event for a long time, this indicates that the transaction has failed to pass compliance screening by Cobo KYT or Screening App. In this case, you need to follow these steps to handle it:
-
If the transaction subsequently passes manual review:
- If the order has not expired: The funds will be counted towards the order’s actual received amount, and the order status will be updated accordingly based on the actual received amount
- If the order has expired: The system will trigger the
payment.transaction.late
event, and all funds will be credited to the developer balance
-
If the transaction ultimately fails manual review:
- The funds will be frozen and will not be counted towards the order’s actual received amount
- The order status will remain unchanged
- The payer needs to redeposit sufficient funds and pass compliance screening within the order validity period for the order to change to
Completed
status
- Cobo KYT: Please contact the Cobo support team through help@cobo.com for handling
- Screening App: You can evaluate and handle it yourself within the application
Feel free to share your feedback to improve our documentation!