Getting started
Test mode
To test your integration without money, create a test key in the dashboard: tick "Test key" when you create it. It starts with cpk_test_… and works with invoices only:
POST /invoicescreates a test invoice withtest: true, its own numbering and a regularpay_url;- the payment page of a test invoice has no address or QR code: the buyer picks a coin and clicks "Pay" or "Pay part", which pays half of what is due;
- the rest goes as with a real payment:
payment.detectedat once,payment.confirmedandinvoice.paidorinvoice.partially_paid10 seconds later, all withtest: true.GET /invoices/{id}shows the same amounts and status, and the page button leads toreturn_url; - the address, transaction hash and sender in the events are made up, but in the network format;
- test expiry with a short
lifetime_minutes(15 minutes or more) and cancellation withPOST /invoices/{id}/cancel.
A test key sees only test invoices, a live key only real ones. Addresses, payments, balances and payouts are not available to a test key: 403 TEST_MODE_UNSUPPORTED. Test invoices never reach balances, payouts, turnover or reports; in the dashboard they are on the "Test" tab of "Invoices".