Skip to main content

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

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:
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.
För fullständig BNPL-dokumentation, inklusive Billie B2B-testning, se sidan Buy Now Pay Later.

Testa digitala plånböcker

Apple Pay

1

Enable test mode

Använd dina test-API-nycklar för Dodo Payments.
2

Add a card to Apple Wallet

Lägg till ett riktigt kort i din Apple Wallet. I testläge debiteras kortet inte.
3

Complete test purchase

Öppna checkout på en Apple-enhet och slutför Apple Pay-flödet.
Apple Pay kräver HTTPS. Det visas inte på localhost utan korrekt SSL-konfiguration. Domänverifieringen måste också vara slutförd.

Google Pay

1

Join the test card group

Gå med i testkortsgruppen för Google Pay för att automatiskt lägga till testkort i din plånbok.
2

Enable test mode

Använd dina test-API-nycklar för Dodo Payments.
3

Complete test purchase

Välj ett av testkorten i Google Pay för att slutföra transaktionen.

Amazon Pay, Cash App Pay och RevolutPay

Använd dina test-API-nycklar och följ det vanliga checkout-flödet. Testtransaktioner simuleras utan faktiska debiteringar. För fullständig dokumentation om digitala plånböcker, inklusive domänverifiering för Apple Pay, se sidan Digital Wallets.

Testa europeiska metoder

Europeiska betalningsmetoder (iDEAL, Bancontact, EPS, Multibanco) kan testas i sandbox-läge.
1

Enable test mode

Använd dina test-API-nycklar för Dodo Payments.
2

Set billing address

Ange faktureringsadressens land så att det matchar betalningsmetoden:
  • NL för iDEAL
  • BE för Bancontact
  • AT för EPS
  • PT för Multibanco
3

Set currency

Europeiska metoder kräver valutan EUR.
4

Complete test flow

Följ det simulerade bankautentiseringsflödet i testmiljön.
För fullständig dokumentation om europeiska betalningsmetoder, se sidan Europe.

Bästa praxis för testning

Testa inte bara lyckade betalningar. Testa avvisanden, avbrutna betalningar och gränsfall som otillräckliga medel.
Se till att dina webhook-endpoints behandlar alla event types korrekt, särskilt payment.succeeded, payment.failed och subscription events.Använd Dodo Payments CLI för att testa webhooks lokalt:
  • dodo wh listen vidarebefordrar live-testwebhooks till din lokala server
  • dodo wh trigger skickar mock-payloads för alla 22 event types
För Apple Pay och Google Pay ska du testa på faktiska iOS- och Android-enheter. Simulatorer återskapar inte wallet-beteendet fullt ut.
Regionala betalningsmetoder (UPI, iDEAL med flera) kräver matchande faktureringsadresser. En amerikansk faktureringsadress gör att iDEAL inte visas.
BNPL-metoder kräver ett lägsta belopp på $50.01. Kontrollera att de visas eller döljs korrekt baserat på varukorgens totalsumma.

Relaterade sidor

Cards

Korttestning, 3D Secure och sparade betalningsmetoder.

Digital Wallets

Testning av Apple Pay, Google Pay och Amazon Pay.

BNPL

Testning av Klarna, Afterpay och Billie.

India

Testning av UPI- och RBI-mandat.

Europe

Testning av iDEAL, Bancontact, EPS och Multibanco.

Webhooks

Konfigurera webhooks för testhändelser.

CLI Webhook Testing

Testa webhooks lokalt med Dodo Payments CLI.
Senast ändrad 31 juli 2026