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.
Test cards
Section titled “Test cards”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.
A checklist before you launch
Section titled “A checklist before you launch”Run through each of these once:
- A payment that succeeds. The checkout shows “Payment complete”, your server sees the link as
paid, and the order is fulfilled. - A declined card. The checkout explains the decline and your customer can try again. Pay with the working card in the same form.
- A reload after paying. Open the same checkout again. It shows the paid state, and nothing is fulfilled a second time.
- A closed tab. Pay with a payment link and close the page straight away. Your server should still find out. See Confirm payments.
- A retried create. Send the same create request twice with one
Idempotency-Key. You get the same link both times. - A wrong API key. Make sure your server handles a
401cleanly. See Errors.
See your test payments
Section titled “See your test payments”- 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.