API Reference
Crypto Payment Orders
Accept crypto payments from your customers. A payment order is an invoice in fiat (amountInFiat, in your vault's currency) that the customer pays in crypto. Available in payment vaults.
Flow: 1) Create the order. 2) If you did not give an assetId, the customer picks a coin and you call Select Asset; RoxCustody then assigns a dedicated receiving wallet and calculates amountInAsset at the current price. 3) The customer pays to the wallet address, or through paymentLink, before expiration. 4) RoxCustody detects the payment and marks the order PAID; you receive the paid_payment_vault_order webhook.
Statuses: INITIALIZING (being created), PENDING (waiting for payment), PAID, EXPIRED, CANCELLED, REFUNDED. Order ids: you can give your own id (up to 42 characters); otherwise a ULID is generated.
Endpoints
POSTCreate Crypto Payment OrderCreates a payment order. With assetId, the receiving wallet and the crypto amount are prepared immediately; without it, call Select Crypto Payment Order Asset once the customer chooses a coin.POSTSelect Crypto Payment Order AssetSets the coin a PENDING order will be paid in. RoxCustody assigns a receiving wallet on that network and calculates amountInAsset at the current price. You can call it again to switch to another asset while the order is PENDING.GETGet Crypto Payment OrdersLists this vault's crypto payment orders, newest first by default.GETGet Crypto Payment Order DetailsReturns one payment order with its receiving wallet, amounts, balance received and blockchain transactions.POSTCancel Crypto Payment OrderCancels a PENDING order. An order that already received a payment cannot be cancelled.PATCHUpdate Crypto Payment OrderChanges the clientName and/or itemName of an order. Send at least one of them.
Was this page helpful?