Zum Hauptinhalt springen

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 credentials only work in test mode. Attempting to use them in live mode will result in payment failures.

Test Cards

Use these card numbers to simulate successful and declined payments across different regions.
RegionBrandCard NumberExpiryCVV
USVisa424242424242424206/32123
USMastercard555555555555444406/32123
IndiaVisa457623891277145006/32123
IndiaMastercard540916266938103406/32123
For all test cards, use expiry date 06/32 (or 12/34) and CVV 123.

How to Test Renewal Failure

1

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.
2

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.
3

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 next_billing_date to the current UTC time. The value must be an ISO 8601 / RFC 3339 UTC timestamp (the Z suffix is required).
PATCH /subscriptions/{subscription_id}
{
  "next_billing_date": "2026-05-03T00:00:00Z"
}
See the Update Subscription API reference for details.
4

Verify the failure

On the next billing attempt:
  • The renewal charge declines on the failure card
  • The subscription moves to On-Hold status
  • A payment.failed webhook event is delivered
  • The customer can return to the Customer Portal to update the payment method and retry
This card is specifically for testing renewal failures. The charge will decline on the next billing date, allowing you to test payment retry logic, customer notifications, and failure handling.

Test UPI

UPI testing uses special VPA (Virtual Payment Address) identifiers that simulate different payment outcomes.
StatusUPI ID
Successsuccess@upi
Failurefailure@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
For complete UPI documentation including RBI mandate testing for subscriptions, see the India Payment Methods page.

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:
FieldApprovedDenied
Date of Birth07-10-197007-10-1970
First NameTestTest
Last NamePerson-usPerson-us
Emailcustomer@email.uscustomer+denied@email.us
StreetAmsterdam AveAmsterdam Ave
House Number509509
CityNew YorkNew York
StateNew YorkNew York
Postal Code10024-394110024-3941
Phone+13106683312+13106354386
Klarna requires a minimum transaction amount of $50.01 to appear as a payment option.

Afterpay Testing

1

Select Afterpay

Choose Afterpay as the payment method in checkout and click Pay.
2

Test successful payment

Use any valid email address and shipping address for successful payments.
3

Test failed authentication

To simulate failure, close the Afterpay modal window on the redirect page. The payment transitions from requires_action to requires_payment_method.
Afterpay requires a minimum transaction amount of $50.01 to appear as a payment option.

Sunbit-Test

Ensure billing_address.country is US and billing_currency is USD. Setzen Sie den Transaktionsbetrag zwischen 60,00und60,00 und 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 60,00und60,00** und **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 auf localhost 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:
  • NL für iDEAL
  • BE für Bancontact
  • AT für EPS
  • PT für Multibanco
Europäische Methoden erfordern EUR-Währung. Folgen Sie im Testumfeld dem simulierten Bankauthentifizierungsfluss. Für vollständige europäische Zahlungsmethoden-Dokumentation siehe die Seite Europa.

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, insbesondere payment.succeeded, payment.failed und Abonnementereignisse. Verwenden Sie die Dodo Payments CLI, um Webhooks lokal zu testen:
  • dodo wh listen leitet Live-Test-Webhooks an Ihren lokalen Server weiter
  • dodo wh trigger sendet Mock-Payloads für alle 22 Ereignistypen
Für Apple Pay und Google Pay testen Sie auf tatsächlichen iOS- und Android-Geräten. Simulatoren replizieren das Wallet-Verhalten nicht vollständig. Regionale Zahlungsmethoden (UPI, iDEAL usw.) erfordern passende Rechnungsadressen. Eine US-Rechnungsadresse zeigt iDEAL nicht. BNPL-Methoden erfordern $50,01 Minimum. Testen Sie, dass sie je nach Warenkorbbetrag korrekt erscheinen/ausblenden.

Verwandte Seiten

Kartentests, 3D Secure und gespeicherte Zahlungsmethoden. Apple Pay, Google Pay, Amazon Pay Tests. Klarna-, Afterpay- und Billie-Tests. UPI- und RBI-Mandatstests. iDEAL-, Bancontact-, EPS-, Multibanco-Tests. Richten Sie Webhooks für Testereignisse ein. Testen Sie Webhooks lokal mit der Dodo Payments CLI.
Last modified on May 26, 2026