Skip to content

Test your integration

Test your whole payment flow without moving any money. Keys that start with cyan_test_ are test keys: their payments run in Stripe’s sandbox, so you can pay, fail and retry as often as you like.

Use any future expiry date, any three-digit CVC and any postal code.

Card number What happens
4242 4242 4242 4242 The payment succeeds.
4000 0000 0000 0002 The card is declined.

Stripe’s testing guide lists more cards, including ones for specific decline reasons.

Run through each of these once:

  1. A payment that succeeds. The checkout shows “Payment complete”, your server sees the link as paid, and the order is fulfilled.
  2. A declined card. The checkout explains the decline and your customer can try again. Pay with the working card in the same form.
  3. A reload after paying. Open the same checkout again. It shows the paid state, and nothing is fulfilled a second time.
  4. A closed tab. Pay with a payment link and close the page straight away. Your server should still find out. See Confirm payments.
  5. A retried create. Send the same create request twice with one Idempotency-Key. You get the same link both times.
  6. A wrong API key. Make sure your server handles a 401 cleanly. See Errors.
  • In the Cyan app: Overview charts your revenue and conversion, and Transactions lists every payment, with search and filters.
  • In Stripe: each payment appears in your Stripe Dashboard’s sandbox, with the link’s description.