Overview
Test mode lets you simulate payments without processing real transactions. All test credentials only work in test mode — never use them in production.No Real Charges
Test transactions don’t process actual payments or affect real accounts.
Full API Access
All API endpoints work identically in test and live modes.
Webhook Testing
Webhooks fire for test transactions just like production.
Test Cards
Use these card numbers to simulate successful and declined payments across different regions.- Successful Payments
- Declined Payments
- Subscription Failure Testing (Renewal/Upgrade/Downgrade)
| Region | Brand | Card Number | Expiry | CVV |
|---|---|---|---|---|
| US | Visa | 4242424242424242 | 06/32 | 123 |
| US | Mastercard | 5555555555554444 | 06/32 | 123 |
| India | Visa | 4576238912771450 | 06/32 | 123 |
| India | Mastercard | 5409162669381034 | 06/32 | 123 |
For all test cards, use expiry date 06/32 (or 12/34) and CVV 123.
How to Test Renewal Failure
Create a test subscription
Create a subscription with your test API keys using a success test card (for example,
4242 4242 4242 4242). The initial charge should succeed and the subscription should become active.Swap in the failure card via Customer Portal
Open the Customer Portal, find the subscription you just created, and click Update Payment Method. Enter the failure test card
4000 0000 0000 0341 (Expiry: 12/34, CVC: 123) and save it as the subscription’s payment method.Advance the next billing date (optional)
To trigger renewal immediately instead of waiting for the natural billing cycle, use the Update Subscription API to set See the Update Subscription API reference for details.
next_billing_date to the current UTC time. The value must be an ISO 8601 / RFC 3339 UTC timestamp (the Z suffix is required).Test UPI
UPI testing uses special VPA (Virtual Payment Address) identifiers that simulate different payment outcomes.| Status | UPI ID |
|---|---|
| Success | success@upi |
| Failure | failure@upi |
Requirements for UPI Testing
- Billing country must be set to
IN - Currency must be
INR - For non-Indian merchants: Adaptive Currency must be enabled
Test BNPL
Buy Now Pay Later providers have specific test data requirements.Klarna Test Data
Use these details to simulate Klarna payments in test mode:| Field | Approved | Denied |
|---|---|---|
| Date of Birth | 07-10-1970 | 07-10-1970 |
| First Name | Test | Test |
| Last Name | Person-us | Person-us |
| customer@email.us | customer+denied@email.us | |
| Street | Amsterdam Ave | Amsterdam Ave |
| House Number | 509 | 509 |
| City | New York | New York |
| State | New York | New York |
| Postal Code | 10024-3941 | 10024-3941 |
| Phone | +13106683312 | +13106354386 |
Klarna requires a minimum transaction amount of $50.01 to appear as a payment option.
Afterpay Testing
Afterpay requires a minimum transaction amount of $50.01 to appear as a payment option.
Sunbit-Test
Ensurebilling_address.country is US and billing_currency is USD.
Setzen Sie den Transaktionsbetrag zwischen 19.999,00.
Wählen Sie Sunbit bei der Kasse und vervollständigen Sie die Finanzierungsanwendung im Sunbit-Modal.
Schließen Sie das Sunbit-Modal, bevor Sie den Ablauf abschließen, um eine abgelehnte Anwendung zu simulieren. Die Zahlung wechselt zu requires_payment_method.
Sunbit erscheint nur für US-Kunden, die in USD mit einem Betrag zwischen 19.999,00 zahlen.
Für vollständige BNPL-Dokumentation einschließlich Billie B2B-Tests, siehe die Seite Jetzt kaufen, später bezahlen.
Digitale Wallets testen
Apple Pay
Verwenden Sie Ihre Test-API-Schlüssel von Dodo Payments. Fügen Sie eine echte Karte zu Ihrer Apple Wallet hinzu. Im Testmodus wird die Karte nicht belastet. Öffnen Sie die Kasse auf einem Apple-Gerät und führen Sie den Apple Pay-Fluss durch. Apple Pay erfordert HTTPS. Es erscheint nicht auflocalhost ohne ordnungsgemäße SSL-Einrichtung. Die Domain-Verifizierung muss ebenfalls abgeschlossen sein.
Google Pay
Treten Sie der Google Pay Testkarten-Gruppe bei, um Testkarten automatisch zu Ihrer Wallet hinzuzufügen. Verwenden Sie Ihre Test-API-Schlüssel von Dodo Payments. Wählen Sie eine der Testkarten in Google Pay aus, um die Transaktion abzuschließen.Amazon Pay, Cash App Pay & RevolutPay
Verwenden Sie Ihre Test-API-Schlüssel und folgen Sie dem Standard-Checkout-Fluss. Testtransaktionen werden ohne tatsächliche Belastungen simuliert. Für vollständige Dokumentation zu digitalen Wallets, einschließlich Domain-Verifizierung für Apple Pay, siehe die Seite Digitale Wallets.Europäische Methoden testen
Europäische Zahlungsmethoden (iDEAL, Bancontact, EPS, Multibanco) können im Sandbox-Modus getestet werden. Verwenden Sie Ihre Test-API-Schlüssel von Dodo Payments. Setzen Sie das Rechnungsadressland entsprechend der Zahlungsmethode:NLfür iDEALBEfür BancontactATfür EPSPTfür Multibanco
Beste Praktiken beim Testen
Testen Sie nicht nur erfolgreiche Zahlungen. Testen Sie Ablehnungen, Stornierungen und Sonderfälle wie unzureichende Mittel. Stellen Sie sicher, dass Ihre Webhook-Endpunkte alle Ereignistypen korrekt verarbeiten, insbesonderepayment.succeeded, payment.failed und Abonnementereignisse.
Verwenden Sie die Dodo Payments CLI, um Webhooks lokal zu testen:
dodo wh listenleitet Live-Test-Webhooks an Ihren lokalen Server weiterdodo wh triggersendet Mock-Payloads für alle 22 Ereignistypen