PayOrder modes
CoinVoyage supports three PayOrder modes. You choose the mode when you create the order, and it determines how settlement is handled.- DEPOSIT
- SALE
- REFUND
A
DEPOSIT PayOrder moves funds directly to a wallet address you specify on a target chain. Use this when a user is topping up a wallet, funding an account, or making a transfer where you control the destination address.You specify toChain, toAddress, and either toAmount (token units) or a fiat equivalent. CoinVoyage handles conversion from whatever the user pays with.DEPOSIT PayOrders do not require an API secret for authorization. You can create them from client-side or server-side code using only your API key.PayOrder statuses
A PayOrder moves through a series of statuses as the payment progresses. Your webhook handler and any polling logic should account for each of these states.Webhook subscription event types use uppercase
ORDER_* identifiers (e.g., ORDER_COMPLETED), but the JSON type field in the delivered payload uses lowercase payorder_* values (e.g., payorder_completed).EXPIRED, REFUNDED, FAILED, or PARTIAL_PAYMENT depending on where the problem occurs.
PayOrder metadata
You can attach structured metadata to any PayOrder when you create it. Metadata is visible in the dashboard and included in webhook payloads, making it useful for reconciliation, analytics, and displaying order context to the user.Items
Use theitems array to describe what the user is paying for. Each item can include a name, description, image URL, quantity, and unit price. This data surfaces in the payment modal and in dashboard order views.
Refund details
ForREFUND PayOrders, populate the refund object to record the reason and amount being refunded: