Skip to content
Creative Payments

Test mode

Build and check your whole integration with a test key. Test payments move through the same code as live ones, but no money moves.

On this page

Test and live mode

The mode of a request is the mode of its API key. The two never see each other.

TestLive
Key prefixcp_test_cp_live_
MoneyNone movesReal payments
Payments it seesTest payments onlyLive payments only
Webhook eventsSent to test endpointsSent to live endpoints
livemodefalsetrue

A test payment of the wrong mode, like any payment you cannot see, answers 404 not_found.

Completing a test payment

There is no payment provider in test mode, so a test payment does not move on its own. You play the provider:

  1. Open the checkout_url. The page shows the banner “Test payment, no money moves”.
  2. Choose a method. The payment becomes pending and the page links to the test controls.
  3. On the test controls (<checkout_url>/simulate), choose paid, failed or expired. The payment is updated and your test endpoint receives the event.

With the direct payment API, selecting a method on a test payment returns a next_action of type none: there is nothing to show, so open <checkout_url>/simulate to finish it.

The test controls exist only for test payments. For a live payment they answer 404.

What differs in test mode

  • The methods offered are the ones enabled for test on your account.
  • A test payment is never invoiced and has no VAT: its charge.vat_amount is "0.00".
  • A pending test payment cannot be canceled through the API: the cancel call answers 409 not_cancellable. A created one can.
  • Payouts are live only. Payout events are never sent for test payments.
  • Subscriptions have no test mode: creating one with a test key answers 422 livemode_required.