Create pay-in order
This operation creates a pay-in order.
Before you can call this operation, make sure the following prerequisites are met:
- Payments onboarding is complete, so your organization’s payment developer account is active.
merchant_idreferences a merchant that already exists and is owned by your organization.
Completing Payments onboarding automatically provisions a default merchant for your organization, which you can use directly as the merchant_id value. To create additional merchants, call Create merchant.
This operation does not independently check merchant KYB, merchant activation or status, merchant configuration, or whether a developer-fee configuration record exists for the merchant. These checks are not substitutes for completing organization-level Payments onboarding — if your organization’s payment developer account is not active, the request fails regardless of merchant state. For more information, refer to Merchants and Error codes and status codes.
Authorizations
The API key. For more details, refer to API key.
In the API playground, enter your API secret, and your API key will be accordingly calculated.
Body
The request body to create a pay-in order.
The merchant ID.
"1001"
The order identifier for your own internal business order. Set this to the order reference you use internally to identify this pay-in — for example, an order or transaction ID from your own order-management system. This value must be unique within your Cobo organization: Cobo enforces uniqueness on psp_order_code, so reusing a code already associated with an existing order in your organization is rejected. If a downstream merchant you serve supplies its own separate order reference, record that in merchant_order_code instead — psp_order_code always identifies your own order, not the merchant's.
"psp-order-20240601-00789"
The order-level developer charge deducted from the payment collected for this order and credited to your developer balance. Both 0 and positive values are valid. A value of 0 means that no developer fee is taken and the merchant receives the full collected amount.
When the collected payment exactly matches the payable amount, the merchant balance is credited with the payable amount minus fee_amount, and your developer balance is credited with fee_amount. For example, for a payable amount of 104.08 and a fee_amount of 2, the merchant receives 102.08 and you receive 2.
For related fee settings and settlement details, see Merchant management and Accounts and fund allocation.
"2"
The ID of the cryptocurrency used for payment. Supported values:
- USDC:
ETH_USDC,ARBITRUM_USDC,SOL_USDC,BASE_USDC,MATIC_USDC,BSC_USDC - USDT:
TRON_USDT,ETH_USDT,ARBITRUM_USDT,SOL_USDT,BASE_USDT,MATIC_USDT,BSC_USDT
"ETH_USDT"
An optional reference for the order maintained by a downstream merchant you serve — for example, when you are a payment service provider (PSP) processing pay-in orders on behalf of merchants. Set this field only when such a downstream merchant supplies its own order reference that is distinct from your internal psp_order_code. Omit this field if you are collecting payment directly as the merchant, with no separate downstream merchant reference to track.
"merchant-inv-55231"
The pricing currency that denominates pricing_amount and fee_amount. If left empty, both values will be denominated in payable_currency.
Currently, For a complete list of supported currencies, see Supported chains and tokens.
"USD"
The base amount of the order, excluding the developer fee (specified in fee_amount). Values must be greater than 0 and contain two decimal places.
"100.00"
The total amount the payer needs to pay, denominated in the specified payable_currency. If this field is left blank, the system will automatically calculate the amount at order creation using the following formula: (pricing_amount + fee_amount) / current exchange rate.
Values must be greater than 0 and contain two decimal places.
"103.03"
The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to 1800, the order will expire in 30 minutes. Must be greater than zero and cannot exceed 3 hours (10800 seconds). After expiration:
- The order status becomes final and cannot be changed
- The
received_token_amountfield will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance.
- A late payment will trigger a
transactionLatewebhook event.
1800
The allowed amount deviation, with precision up to 1 decimal place.
For example, if payable_amount is 100.00 and amount_tolerance is 0.50:
- Payer pays 99.55 → Success (difference of 0.45 ≤ 0.5)
- Payer pays 99.40 → Underpaid (difference of 0.60 > 0.5)
"0.5"
This field has been deprecated. Please use pricing_currency instead.
"USD"
This field has been deprecated. Please use pricing_amount instead.
"100.00"
This field has been deprecated. Please use payable_currency instead.
"ETH_USDT"
This field has been deprecated.
false
This field has been deprecated.
"1.00"
Response
The request was successful.
The unique identifier of the payment order. Cobo assigns this ID when the payment order is created — when that happens depends on which pay-in method you use.
For the direct method, Create pay-in order creates the order synchronously and returns order_id in the response immediately.
For the payment link method, Create order link returns only the hosted link details and does not create an order, so order_id does not exist yet at that point. order_id becomes available only after the payer opens the hosted payment page, selects the payment token and blockchain network, and submits the order — Cobo creates the order and assigns order_id at that moment, not when the link itself was generated.
"5001"
The order identifier for your own internal business order, exactly as you supplied it in psp_order_code when creating the order. This value is unique within your Cobo organization.
"psp-order-20240601-00789"
The order-level developer charge credited to your developer balance when the order settles. A value of 0 means that no developer fee was charged and the merchant was credited with the full collected amount.
When the collected payment exactly matches the payable amount, the merchant balance is credited with the payable amount minus fee_amount, and your developer balance is credited with fee_amount. For example, for a payable amount of 104.08 and a fee_amount of 2, the merchant receives 102.08 and you receive 2.
For related fee settings and settlement details, see Merchant management and Accounts and fund allocation.
"2"
The ID of the blockchain network where the payment transaction should be made.
"ETH"
The cryptocurrency amount to be paid for this order.
"103.03"
The exchange rate between payable_currency and pricing_currency, calculated as (pricing_amount + fee_amount) / payable_amount.
This field is only returned when payable_amount was not provided in the order creation request.
"0.99"
The recipient wallet address to be used for the payment transaction.
"0x1234567890abcdef1234567890abcdef12345678"
The current status of the pay-in order:
Pending: The order has been created and is awaiting payment. No incoming transaction has been detected.Processing: An incoming transaction has been detected at the recipient address.Completed: The payment has been fully received and is now complete.Expired: The order has reached its expiration time without receiving any payment, or the order has been cancelled by the Update pay-in order operation.Underpaid: The order has reached its expiration time. A payment was received but the amount is less than the order's required amount.
Pending, Processing, Completed, Expired, Underpaid "Pending"
The total cryptocurrency amount received for this order. Updates until the expiration time. Precision matches the token standard (e.g., 6 decimals for USDT).
"103.0305"
The merchant ID.
"1001"
The downstream merchant's order reference, exactly as you supplied it in merchant_order_code when creating the order, if you provided one. Present only when a merchant_order_code was included at order creation.
"merchant-inv-55231"
The pricing currency of the order.
"USD"
The base amount of the order, excluding the developer fee (specified in fee_amount).
"100.00"
The ID of the cryptocurrency used for payment.
"ETH_USDT"
The allowed amount deviation, with precision up to 1 decimal place.
For example, if payable_amount is 100.00 and amount_tolerance is 0.50:
- Payer pays 99.55 → Success (difference of 0.45 ≤ 0.5)
- Payer pays 99.40 → Underpaid (difference of 0.60 > 0.5)
"0.5"
The expiration time of the pay-in order, represented as a UNIX timestamp in seconds.
1711324800
The created time of the order, represented as a UNIX timestamp in seconds.
1744689600
The updated time of the order, represented as a UNIX timestamp in seconds.
1744689600
An array of transactions associated with this pay-in order. Each transaction represents a separate blockchain operation related to the settlement process.
This field has been deprecated. Please use pricing_currency instead.
This field has been deprecated. Please use pricing_amount instead.
This field has been deprecated. Please use payable_currency instead.
The current status of a settlement.
Pending: The settlement has been created and is awaiting processing.Processing: The settlement is being processed.Completed: The funds have been successfully deposited into the bank account or the withdrawal crypto address.PartiallyCompleted: Some settlement transactions have been completed successfully, while others have failed.Failed: The settlement could not be completed due to an error.
Pending, Processing, Completed, PartiallyCompleted, Failed "Pending"
