Skip to content

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 /invoices creates a test invoice with test: true, its own numbering and a regular pay_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.detected at once, payment.confirmed and invoice.paid or invoice.partially_paid 10 seconds later, all with test: true. GET /invoices/{id} shows the same amounts and status, and the page button leads to return_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 with POST /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".