Test mode vs. live mode
The mode is determined entirely by the API key you use. There is no separate environment URL or configuration flag.| Test mode | Live mode | |
|---|---|---|
| API key prefix | ck_test_... | ck_live_... |
Session livemode field | false | true |
| Chains | Testnets (Sepolia, Base Sepolia, etc.) | Mainnets (Ethereum, Base, etc.) |
| Dashboard view | Test events only | Live events only |
| Real funds moved | Never | Yes |
Supported testnet chains
Enable testnet chains alongside your mainnet chains in Dashboard → Networks. Each testnet mirrors its mainnet counterpart’s behaviour.| Network | Testnet name | Chain ID |
|---|---|---|
| Ethereum | Sepolia | 11155111 |
| Base | Base Sepolia | 84532 |
| Arbitrum | Arbitrum Sepolia | 421614 |
| Optimism | Optimism Sepolia | 11155420 |
| Polygon | Polygon Amoy | 80002 |
| Solana | Devnet | 103 |
| Tron | Nile testnet | 2494104990 |
| Bitcoin | Signet | 38333 |
Getting testnet funds
Each network provides a public faucet for free testnet tokens:- Sepolia ETH — sepoliafaucet.com or the Alchemy Sepolia faucet
- Base Sepolia ETH — faucet.quicknode.com/base/sepolia or the Coinbase faucet
- Arbitrum Sepolia ETH — faucet.quicknode.com/arbitrum/sepolia
- Optimism Sepolia ETH — app.optimism.io/faucet
- Polygon Amoy MATIC — faucet.polygon.technology
- Solana Devnet SOL —
solana airdrop 2via the Solana CLI, or solfaucet.com - Bitcoin Signet — signet.bc-2.jp faucet
Running a test payment end-to-end
curl -X POST https://your-domain.com/api/v1/checkout_sessions \
-H "Authorization: Bearer ck_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: test-order-001-v1" \
-d '{
"amount": { "value": "1.00", "currency": "USD" },
"metadata": { "testRun": true }
}'
Open MetaMask (or any compatible wallet) and switch it to the matching testnet. Scan the QR code on the checkout page or copy the deposit address and send the exact required amount.
The transition from
detected to paid happens once the required number of confirmations (default: 3) are reached. On testnets this typically takes 30–90 seconds.Open Dashboard → Webhooks, select your endpoint, and check the Delivery log tab. You should see a
session.paid delivery with a 200 response from your handler.Sending a synthetic webhook event
You can trigger asession.paid delivery without making any real payment using the test endpoint. This is useful for testing your webhook handler in isolation.
session.paid event is queued immediately and delivered to your endpoint. Check the delivery log in Dashboard → Webhooks → endpoint detail to see the request and response.
Synthetic events use a placeholder session object and are marked
livemode: false. They are intended for testing your signature verification and handler logic, not for end-to-end payment flow testing.Switching to live mode
When you are satisfied with your integration on testnet, switching to production takes three steps:- Generate a
ck_live_...key in Dashboard → API Keys (select Live mode) - Update your environment variable — replace
CHECKOUT_API_KEY=ck_test_...with the new live key - Enable mainnet chains in Dashboard → Networks and confirm your payout wallet addresses in Settings → Wallet