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_assetsarrayPairs 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_railsarrayMust includecrypto. Addcardto take card payments, or leave it out to stop.fee_payerstringbusinessorcustomer: who pays 402pay's fees. Withcustomer, checkout adds them to each customer's total.quote_minutesinteger5, 10, 15, 30 or 60.underpayment_tolerance_pctnumber0, 0.5, 1, 2 or 5.success_redirect_enabledbooleanWhether to send customers tosuccess_redirect_urlafter paying.success_redirect_urlstringAnhttps://URL, ornullto clear it.collect_emailbooleanWhether checkout asks crypto customers for an email.corner_stylestringroundedorpill.direct_crypto_enabledbooleanWhether to offer crypto from the customer's own wallet.p2p_enabledbooleanWhether to offer buying a stablecoin from a P2P seller.paypal_pyusd_enabledbooleanWhether to offer PayPal.truealso turns onPYUSDonsolana.venmo_pyusd_enabledbooleanWhether to offer Venmo.truealso turns onPYUSDonsolana.app_methods_enabledobjectFinance apps to turn on or off, byidfromapp_methods, such as{ "cashapp": false }. Apps you leave out keep their setting;paypalandvenmohere are the same switches as the two fields above.
Errors
- 400
invalid_requestA field is unknown or has a value it can't take, such asaccepted_railswithoutcrypto.fieldnames it.
Any request can also fail on its key or its body. See errors.
Request
curl -X PATCH "https://api.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": "ethereum", "enabled": true, "offered": true }, { "asset": "USDC", "network": "base", "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 }, { "asset": "LTC", "network": "litecoin", "enabled": true, "offered": true }, { "asset": "TRX", "network": "tron", "enabled": true, "offered": true }, { "asset": "PYUSD", "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, "corner_style": "rounded", "card_available": true, "fees_waived": false, "p2p_enabled": true, "paypal_pyusd_enabled": true, "venmo_pyusd_enabled": true, "direct_crypto_enabled": true, "app_methods": [ { "id": "paypal", "name": "PayPal", "enabled": true, "available": true, "coins": [ { "asset": "PYUSD", "network": "solana" } ], "countries": ["US"] }, { "id": "cashapp", "name": "Cash App", "enabled": true, "available": true, "coins": [ { "asset": "BTC", "network": "bitcoin" } ], "countries": ["US"] }, { "id": "venmo", "name": "Venmo", "enabled": true, "available": true, "coins": [ { "asset": "PYUSD", "network": "solana" } ], "countries": ["US"] }, { "id": "robinhood", "name": "Robinhood", "enabled": true, "available": true, "coins": [ { "asset": "USDC", "network": "solana" }, { "asset": "USDC", "network": "base" }, { "asset": "BTC", "network": "bitcoin" }, { "asset": "LTC", "network": "litecoin" }, { "asset": "USDC", "network": "ethereum" } ], "countries": ["US"] }, { "id": "coinbase", "name": "Coinbase", "enabled": true, "available": true, "coins": [ { "asset": "USDC", "network": "base" }, { "asset": "USDC", "network": "solana" }, { "asset": "BTC", "network": "bitcoin" }, { "asset": "LTC", "network": "litecoin" }, { "asset": "USDC", "network": "ethereum" }, { "asset": "USDT", "network": "ethereum" } ], "countries": [ "AT", "AU", "BE", "BG", "BR", "CA", "CH", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "GR", "HR", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MT", "NL", "NO", "PL", "PT", "RO", "SE", "SG", "SI", "SK", "US" ] }, { "id": "revolut", "name": "Revolut", "enabled": true, "available": true, "coins": [ { "asset": "USDT", "network": "tron" }, { "asset": "USDC", "network": "solana" }, { "asset": "USDT", "network": "solana" }, { "asset": "BTC", "network": "bitcoin" }, { "asset": "USDC", "network": "ethereum" }, { "asset": "USDT", "network": "ethereum" } ], "countries": [ "AT", "BE", "BG", "CH", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "GR", "HR", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MT", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK" ] }, { "id": "strike", "name": "Strike", "enabled": true, "available": true, "coins": [ { "asset": "BTC", "network": "bitcoin" } ], "countries": ["US"] }, { "id": "gcash", "name": "GCash", "enabled": true, "available": true, "coins": [ { "asset": "USDC", "network": "solana" }, { "asset": "PYUSD", "network": "solana" }, { "asset": "USDC", "network": "base" }, { "asset": "USDT", "network": "tron" }, { "asset": "BTC", "network": "bitcoin" }, { "asset": "LTC", "network": "litecoin" }, { "asset": "USDC", "network": "ethereum" }, { "asset": "USDT", "network": "ethereum" } ], "countries": ["PH"] } ] }}