API Reference
Testing & Sandbox
Build and test your integration with test keys. Sandbox payments never touch a blockchain or a card provider, so no money moves.
Test keys#
Under API Keys, choose Test when you create a key. Test keys start with plio_test_ instead of plio_live_ and are marked with a Test badge. They work on the same endpoints, with the same request and response fields, so switching to live means swapping the key and nothing else.
| Live key (plio_live_) | Test key (plio_test_) | |
|---|---|---|
| Deposit address | Real address on the selected network | Fake, starts with test_ |
| Card checkout | Hands off to the on-ramp provider | No provider; the checkout shows a TEST MODE banner |
| Gets paid | When the customer pays | When you click Simulate payment in the dashboard |
| Payout | Forwarded to your wallet | Nothing is forwarded |
Response field is_test | false | true |
Keys only see their own mode
A test key can only read sandbox payments, and a live key never sees them. Looking up a live payment with a test key (or the other way round) returns404 not_found.Test the full flow#
- 1
Create a sandbox payment
Call POST /api/v1/wallet or POST /api/v1/crypto/payments with your test key. Amounts, currencies, coin minimums and address formats are validated exactly as for live payments. Payout wallets do not have to be approved for test keys.
Requestcurl -X POST https://paylio.org/api/v1/crypto/payments \ -H "Authorization: Bearer plio_test_YOUR_TEST_KEY" \ -H "Content-Type: application/json" \ -d '{ "coin": "polygon_usdc", "amount": "25.00", "currency": "USD", "address": "0xYourPayoutWallet", "callback": "https://shop.example.com/paylio/webhook" }'Response{ "object": "crypto_payment", "payment_id": "8d1f3c2a-4b5e-4f6a-9c7d-1e2f3a4b5c6d", "status": "unpaid", "deposit_address": "test_3f9a1c0e5b7d42a8c6e1f0b9d2a4c7e3", "crypto_amount": "25.000000", "checkout_url": "https://paylio.org/pay/8d1f3c2a-4b5e-4f6a-9c7d-1e2f3a4b5c6d", "is_test": true, ... } - 2
Mark it paid
Open the payment under Payments in the dashboard and click Simulate payment. The payment becomes
paidand PayLio sends thepayment.paidwebhook to yourcallbackURL, signed like a real one. - 3
Verify it
Handle the webhook as described in Webhooks, then confirm with GET /api/v1/payment-status using the same test key. Test webhooks carry
"isTest": true, so your shop can refuse to ship real orders for them.
Good to know#
- Sandbox payments never appear in revenue, analytics or payouts.
- Rate limits and the cap of 100 open crypto payments apply to test keys as well; test and live payments are counted separately.
- The official plugins accept a test key too: paste it into the API key field of your staging shop.
- Before going live, create a live key and replace the test key everywhere it is used.