Skip to content
Docs menu

Endpoints

Update checkout settings

Turn coins and card payments on or off, and change the quote window, tolerance and redirect.

Send only what changes. New settings apply to checkouts opened afterward: a quote that's already open keeps its address, amount and expiry. You receive checkout_settings.updated.

Body

  • accepted_assets array
    Pairs to turn on or off, each { asset, network, enabled }. Pairs you leave out keep their setting, and at least one must stay on. See supported networks.
  • accepted_rails array
    Must include crypto. Add card to take card payments, or leave it out to stop.
  • fee_payer string
    business or customer: who pays 402pay's fees. With customer, checkout adds them to each customer's total.
  • quote_minutes integer
    5, 10, 15, 30 or 60.
  • underpayment_tolerance_pct number
    0, 0.5, 1, 2 or 5.
  • success_redirect_enabled boolean
    Whether to send customers to success_redirect_url after paying.
  • success_redirect_url string
    An https:// URL, or null to clear it.
  • collect_email boolean
    Whether checkout asks crypto customers for an email.

Errors

  • 400 invalid_request
    A field is unknown or has a value it can't take, such as accepted_rails without crypto. field names it.
  • 403 test_mode_unavailable
    A test key can't change checkout settings on a live business, so use a live key.

Any request can also fail on its key or its body. See errors.

Request
curl -X PATCH "https://dash.402pay.co/api/v1/settings/checkout" \  -H "Authorization: Bearer $PAY402_SECRET_KEY" \  -H "Content-Type: application/json" \  -d '{    "accepted_assets": [      {        "asset": "BTC",        "network": "bitcoin",        "enabled": true      }    ],    "quote_minutes": 15  }'
Response200 OK
{  "data": {    "kind": "checkout_settings",    "accepted_assets": [      {        "asset": "USDC",        "network": "polygon",        "enabled": true,        "offered": true      },      {        "asset": "USDC",        "network": "ethereum",        "enabled": true,        "offered": true      },      {        "asset": "USDC",        "network": "solana",        "enabled": true,        "offered": true      },      {        "asset": "USDT",        "network": "tron",        "enabled": true,        "offered": true      },      {        "asset": "USDT",        "network": "ethereum",        "enabled": true,        "offered": true      },      {        "asset": "USDT",        "network": "solana",        "enabled": true,        "offered": true      },      {        "asset": "BTC",        "network": "bitcoin",        "enabled": true,        "offered": true      },      {        "asset": "ETH",        "network": "ethereum",        "enabled": true,        "offered": true      },      {        "asset": "SOL",        "network": "solana",        "enabled": true,        "offered": true      }    ],    "accepted_rails": ["crypto", "card"],    "fee_payer": "business",    "quote_minutes": 15,    "underpayment_tolerance_pct": 0.5,    "success_redirect_enabled": false,    "success_redirect_url": null,    "collect_email": true,    "card_available": true  }}