Skip to Content

Create a checkout

POST/checkouts

Create a checkout session for a one-time stablecoin payment. Returns a checkout_url to redirect the customer to the hosted payment page. Direct payments require a signatures array; two-step payments need no signature at creation and accept an optional expires_at.

Headers

HeaderDescriptionRequired
AuthorizationBearer token with your secret API keyyes

Request Body

FieldTypeRequiredDescription
amountnumberyes
currencystringyes
descriptionstring
success_urlstringWhere to redirect the customer after a successful payment. Automatic countdown redirect and the primary CTA on the completed screen.
cancel_urlstringWhere to redirect the customer if the checkout was actually cancelled. Also used on the expired/failed terminal screens.
return_urlstringWhere to send the customer if they leave a still-pending checkout. Purely navigational — no side effects. Distinct from cancel_url (the checkout was actually cancelled) and success_url (the post-payment confirmation destination).
customer_emailstring · email
metadataobjectFlat map of merchant-defined references. Up to 50 keys; keys up to 40 characters; values are strings up to 500 characters (nested values are rejected).
expires_atstring · date-time
payment_methodenum: direct | two_stepyes
signaturesobject[]
quote_idstring

signatures

FieldTypeRequiredDescription
chain_familyenum: evm | solanayes
tokenenum: USDT | USDC | XO
on_chain_idstringyes
signaturestringyes
deadlineintegeryes

Example Request

Request

const response = await fetch('https://checkout-api.exodus-int.com/checkouts', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxx',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "amount": 5000,
    "currency": "USD",
    "description": "Premium Plan - Monthly",
    "payment_method": "two_step",
    "success_url": "https://yoursite.com/success",
    "cancel_url": "https://yoursite.com/cancel",
    "return_url": "https://yoursite.com/products/premium-plan",
    "customer_email": "[email protected]",
    "metadata": {
      "order_id": "12345"
    }
  }),
});

Responses

StatusDescription
201The created checkout.
400Validation error
401Missing or invalid authentication
403API key lacks the required scope

Response body

FieldTypeRequiredDescription
idstringyes
objectenum: checkoutyes
amountnumberyes
currencystringyes
descriptionstring | nullyes
statusenum: pending | completed | expired | cancelledyes
checkout_urlstring · uriyes
success_urlstring | nullyes
cancel_urlstring | nullyes
return_urlstring | nullyes
customer_emailstring · email | nullyes
metadataobject | nullyes
expires_atstring · date-time | nullyes
created_atstring · date-timeyes
paymentsobject[]yes

payments

FieldTypeRequiredDescription
idstringyes
objectenum: paymentyes
statusenum: client_deposit_pending | client_deposit_detected | client_deposit_confirmed | client_deposit_expired | escrow_confirmed | settlement_pending | settled | failed | refunded | cancelledyes
payment_methodenum: direct | two_stepyes
detected_assetstring | nullyes
detected_token_symbolstring | nullyes
detected_chainstring | nullyes
token_amountstring | nullyes
token_amount_decimalstring | nullyes
deposit_addressstring | nullyes
payer_addressesstring[]yes
on_chain_idstring | nullyes
created_atstring · date-timeyes
flaggedbooleanyes

Example Response

{
  "id": "chk_1234567890abcdef",
  "object": "checkout",
  "amount": 5000,
  "currency": "USD",
  "description": "Premium Plan - Monthly",
  "status": "completed",
  "checkout_url": "https://checkout.exodus-int.com/pay/chk_1234567890abcdef",
  "success_url": "https://yoursite.com/success",
  "cancel_url": "https://yoursite.com/cancel",
  "return_url": "https://yoursite.com/products/premium-plan",
  "customer_email": "[email protected]",
  "metadata": {
    "order_id": "12345",
    "product_name": "Premium Plan"
  },
  "expires_at": "2024-01-16T12:00:00Z",
  "created_at": "2024-01-15T12:00:00Z",
  "payments": [
    {
      "id": "tz4a98xxat96iws9zmbrgj3a",
      "object": "payment",
      "status": "settled",
      "payment_method": "two_step",
      "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "detected_token_symbol": "USDC",
      "detected_chain": "eip155:1",
      "token_amount": "50000000",
      "token_amount_decimal": "50",
      "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
      "payer_addresses": [
        "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
      ],
      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
      "created_at": "2024-01-15T12:30:00Z",
      "flagged": false
    }
  ]
}

Error Response

Error (e.g. 400)

{
  "error": {
    "type": "validation_error",
    "message": "amount must be a positive number",
    "param": "amount"
  }
}

Start building

XO

Request Demo

Schedule a call with our team

Select a product
Arrow right

Start building
Grateful

Contact Us

We're here to help