Testing card payments on stage
Use the hosted card form's test outcome select on stage to run successful, 3DS, declined, and cascade card payments, and see what each outcome does on Stripe and on Worldpay.
Testing card payments on stage
On stage, the hosted card form shows a test outcome select. Pick an outcome, press Pay, and the checkout runs through the normal flow with that outcome's result. You do not need test card numbers: the outcome you pick is all the form needs.
The test outcome select never appears in production. Production checkouts always charge the card the buyer enters.
Who this is for
This guide is for developers integrating FloPay checkout, and for anyone who tests payment flows on stage before going live. Use it to decide which outcome to pick and what result to expect.
Where the select appears
The select appears in the hosted card form for checkout payment sessions in Full mode, including the Full checkout that an Auto or Confirm session opens when it falls back. Setup sessions do not show it.
Picking an outcome disables the card fields. They stay visible, but you leave them empty and Pay is ready to press. After you press Pay, the form shows the same success, decline, error, or authentication step it would show for a real card, and your integration receives the same checkout events. After a declined outcome you can pick another outcome and try again without starting a new session.
The outcome happens on whichever gateway the session routes to. The select picks an outcome, not a route: the tables below give the result when the session routes to Stripe and when it routes to Worldpay.
Outcomes
The select groups its outcomes under four headings, in this order. Each table lists what an outcome does on Stripe and on Worldpay.
Success
| Outcome | Stripe | Worldpay |
|---|---|---|
| Always succeeds (Visa) | The payment succeeds with a Visa card. | The payment succeeds with a Visa card. |
| Always succeeds (Mastercard) | The payment succeeds with a Mastercard card. | The payment succeeds with a Mastercard card. |
| Always succeeds (Amex) | The payment succeeds with an American Express card. | The payment succeeds with an American Express card. |
Authentication (3DS)
| Outcome | Stripe | Worldpay |
|---|---|---|
| Requires authentication | A 3DS challenge is shown. The payment succeeds once you complete it. | A 3DS challenge is shown. This is the closest equivalent the Worldpay test environment offers, not an exact reproduction. |
| Always authenticate | A 3DS challenge is shown on every attempt. | A 3DS challenge is shown. This is the closest equivalent the Worldpay test environment offers, not an exact reproduction of a challenge on every attempt. |
| Authentication fails | Authentication fails before any challenge is shown, and the payment is declined. | Authentication fails, and the payment does not go through. |
Declines
| Outcome | Stripe | Worldpay |
|---|---|---|
| Generic decline | The payment is declined. | The payment is declined (refused). |
| Insufficient funds | The payment is declined for insufficient funds. | The payment is declined for insufficient funds. |
| Lost card | The payment is declined as a lost card. | The payment is declined as a lost card. |
| Stolen card | The payment is declined as a stolen card. | The payment is declined as a stolen card. |
| Expired card | The payment is declined as an expired card. | The payment is declined as an expired card. |
| Incorrect CVC | The payment is declined for an incorrect CVC. | The payment is declined for an incorrect CVC. |
| Processing error | The payment fails with a processing error. | The payment fails with a processing error. |
Cascade
| Outcome | Stripe | Worldpay |
|---|---|---|
| Declines then succeeds on fallback | The first attempt is declined, then the payment succeeds on the second gateway. | The same, in either order: Worldpay can take the declined first attempt or the successful second one. |
The buyer sees only the final success, not the first decline. This lets you try the new-card walk described in Routing and reliability without waiting for a real refusal.
Cascade preconditions
Declines then succeeds on fallback stays disabled in the select until all of these hold:
- Cascade is enabled on the client, with two card gateways on stage, Stripe and Worldpay, and the second one turned on under Use for cascading (failover). See Failover eligibility.
- The session uses Full mode.
- The session uses automatic capture.
- Card routing is enabled for the client.
If one of these is missing, the option is unavailable and the other outcomes still work.
Complete or fail a 3DS challenge
When an outcome asks for 3DS authentication, the hosted form shows a test challenge from the gateway's test environment in place of a bank's page. No real bank is involved, and you decide whether the challenge passes.
On Stripe
After you press Pay and the form finishes processing, the challenge opens in a Card authentication dialog on the checkout page. It does not open a new page or tab. The dialog shows Stripe's 3D Secure 2 Test Page with two buttons, Fail and Complete.
- Press Complete and the payment carries on to its result.
- Press Fail and authentication fails, so the payment does not go through. The form shows "3D Secure authentication failed. Please try again or use a different card." The card form and the test outcome select stay on the page, so you can pick another outcome and try again.
On Worldpay
Worldpay shows the challenge page from its test environment. Follow the page's on-screen prompt to complete the challenge, and the payment carries on. Cancel the challenge instead of completing it to fail it, and the payment does not go through.
Saved cards from test outcomes
A card saved from a test outcome rebills like any other saved card: renewals and saved-card checkouts charge it again.
Next steps
- Accept a payment: Create a checkout session and handle its result.
- Routing and reliability: Understand how FloPay walks a payment between gateways.
- Subscriptions and recurring: Set up the renewals a saved test card is charged on.