Testing without a real Stripe account
POST /api/v1/checkout-sessions never accepts a test_card_code and never resolves a payment result itself — it only ever returns a checkout_url. You can send payment_method="test" explicitly, but on an app whose environment allows it, you still just get back a checkout_url pointing to PayGate’s hosted picker page (GET /checkout/{public_token}) — same as omitting payment_method entirely on an app with more than one available method.
To test without a real Stripe account: call checkout-sessions on an app whose environment allows the Test Payment Method (test or staging), with or without payment_method="test". Open the returned checkout_url (PayGate’s hosted picker page) and choose Test Payment Method there, submitting one of these card codes:
test_card_code | Outcome |
|---|---|
4242424242424242 | success |
4000000000000002 | invalid_card_details (400) |
4000000000009995 | insufficient_funds (402) |
These numbers match Stripe’s own published test cards purely so they’re easy to recognize — PayGate never actually calls Stripe for this payment method, the outcome is resolved synchronously and locally, entirely within the picker page’s own resolve step — never inside checkout-sessions itself.