Test Stripe Terminal
Learn how to effectively test your Terminal integration.
Notiz
Much of the process for testing Stripe Terminal is similar to that for testing online Stripe payments. Also, you can’t use Stripe Terminal with mobile wallets (for example, Apple Pay or Google Pay) in testmode. For more information, see the general Stripe testing guide.
The best way to achieve a successful Terminal deployment is to test every part of your integration. We provide testing tools for each stage:
- Before ordering a reader, test your integration with the reader simulator.
- Test your complete hardware integration with a physical test card.
Simulated reader
Stripe Terminal SDKs and server-driven integration come with a built-in simulated card reader, so you can develop and test your app without connecting to physical hardware. Whether your integration is complete or you’re still building it, use the simulated reader to emulate all the Terminal flows in your app.
The simulated reader doesn’t provide a UI. After connecting to it in your app, you can see it working when calls to the Stripe SDK or API succeed.
Simulated readers for SDKs automatically simulate card presentment as needed. For the server-driven integration, update your integration to simulate card presentment.
Simulated test cards
The simulated reader can be configured to use a simulated test card, enabling you to test different flows within your point of sale application.
Before collecting a payment method, configure the simulated reader to use one of the following test card numbers or test payment methods to produce specific responses.
Standard test cards
Test card number | Test payment method | Brand |
---|---|---|
visa | Visa | |
visa_ | Visa (debit) | |
mastercard | Mastercard | |
mastercard_ | Mastercard (debit) | |
mastercard_ | Mastercard (prepaid) | |
amex | American Express | |
amex2 | American Express | |
discover | Discover | |
discover2 | Discover | |
diners | Diners Club | |
diners_ | Diners Club (14 digit card) | |
jcb | JCB | |
unionpay | UnionPay | |
interac | Interac | |
eftpos_ | eftpos Australia | |
eftpos_ | eftpos Australia/Visa | |
eftpos_ | eftpos Australia/Mastercard |
Test cards for specific success cases
Test card number | Test payment method | Result |
---|---|---|
offline_ | Simulates the cardholder being prompted for and entering an offline PIN. The resulting charge has cardholder_verification_method set to offline_ . | |
offline_ | Simulates an SCA-triggered retry flow where a cardholder’s initial contactless charge fails and the reader then prompts the user to insert their card and enter their offline PIN. The resulting charge has cardholder_verification_method set to offline_ . | |
online_ | Simulates a cardholder being prompted for and entering an online PIN. The resulting charge has cardholder_verification_method set to online_ . | |
online_ | Simulates an SCA-triggered retry flow where a cardholder’s initial contactless charge fails and the reader then prompts the user to input their online PIN. The final charge has cardholder_verification_method set to online_ . |
Test cards for specific error cases
Notiz
Using these specific cards for Saving directly without charging and SetupIntents returns a setup_intent_authentication_failure response.
Test card number | Test payment method | Result |
---|---|---|
charge_ | Charge is declined with a card_ code. | |
charge_ | Charge is declined with a card_ code. The decline_code attribute is insufficient_ . | |
charge_ | Charge is declined with a card_ code. The decline_code attribute is lost_ . | |
charge_ | Charge is declined with a card_ code. The decline_code attribute is stolen_ . | |
charge_ | Charge is declined with an expired_ code. | |
charge_ | Charge is declined with a processing_ code. | |
refund_ | Charge succeeds but refunding a captured charge fails asynchronously with a failure_ of expired_ . Because refund failures are asynchronous, the refund will appear to be successful at first and will only have the failed status on subsequent fetches. |
Simulated card presentment
When using the server-driven integration, use the present_payment_method endpoint to simulate a cardholder tapping or inserting their card on the reader.
{ "id": "tmr_xxx", "object": "terminal.reader", "action": { "failure_code": null, "failure_message": null, "process_payment_intent": { "payment_intent": "pi_xxx" }, "status": "succeeded", "type": "process_payment_intent" }, … }
If you don’t specify parameters, the simulated payment defaults to a valid test card based on the payment method type of the PaymentIntent. Below are the default test cards for Terminal payment method types:
Payment method type | Test card number | Test payment method |
---|---|---|
card_ | visa | |
card_ and interac_ | visa | |
interac_ | interac |
With the standard test cards, you can also use test amounts to simulate failure scenarios
Simulated reader updates
During connection to a simulated Bluetooth reader, you can configure a simulated reader update.
Physical test cards
Test payments with your Stripe Terminal reader using a physical test card. You can purchase readers and physical test cards from the Terminal tab of the Stripe Dashboard.
This physical test card supports both chip entry and contactless payments. It only works with Stripe’s pre-certified readers, and only against the Stripe API in test mode. If you attempt to use your physical test card in live mode, the Stripe API returns an error. Unless stated otherwise, use the PIN 1234
when prompted.
When creating payments using a physical test card, use amounts ending in the following values to produce specific responses:
Decimal | Result |
---|---|
00 | Payment is approved. |
01 | Payment is declined with a call_ code. |
02 | When using readers featuring a cardholder-facing screen, insert (or tap, if supported) the test card. If the card requires a PIN, the payment declines with an offline_ code and the reader requests PIN entry. Enter 1234 to complete the test payment. |
03 | When using readers featuring a cardholder-facing screen, insert (or tap, if supported) the test card. If the card requires a PIN, the payment declines with an online_ code and the reader requests PIN entry. Enter any 4-digit PIN to complete the test payment. |
05 | Payment is declined with an generic_ code. |
55 | Payment is declined with an incorrect_ code. |
65 | Payment is declined with an withdrawal_ code. |
75 | Payment is declined with an pin_ code. |
For example, a payment processed using a physical test card for the amount 25.00 USD succeeds; a payment processed for the amount 10.05 USD is declined.
Interac test cards Canada only
To test your Interac integration, you can use the simulated interac
test card or an Interac physical test card. You can order it from the Terminal hardware shop in the Dashboard. You can’t use the Stripe-branded physical test as an Interac card.
The Interac test card works for both interac_
payments and interac_
refunds. You can use the same test amounts you use for testing card_
payments. Unless stated otherwise, use the PIN 1234
when prompted. To test a declined refund, create a partial refund with an amount ending with the following decimal values: 01
, 05
, 55
, 65
, or 75
.
Notiz
The Interac test card doesn’t support contactless payments.
eftpos test cards Australia only
To test your eftpos integration, you can use the simulated eftpos
test card or an eftpos physical test card. You can order it from the Terminal hardware shop in the Dashboard. You can’t use the Stripe-branded physical test card as an eftpos
card.
You can use the same test amounts you use for testing card_
payments. Unless stated otherwise, use the PIN 1234
when prompted.