When one of these cards declines, the payment’s error_code and error_message reflect the scenario above. Look up any code in the Transaction Failures reference for its meaning and recommended action, and see Handle Payment Failures for handling declines in your integration.
Card Number
Expiry
CVC
4000 0000 0000 0341
12/34
123
Use this card to test subscription Failure renewal, upgrade, and downgrade scenarios.
For all test cards, use expiry date 06/32 (or 12/34) and CVV 123.
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).
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.
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 inte bara lyckade betalningar. Testa avvisanden, avbrutna betalningar och gränsfall som otillräckliga medel.
Verify webhook handling
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
Test on real devices
För Apple Pay och Google Pay ska du testa på faktiska iOS- och Android-enheter. Simulatorer återskapar inte wallet-beteendet fullt ut.
Test regional methods with correct addresses
Regionala betalningsmetoder (UPI, iDEAL med flera) kräver matchande faktureringsadresser. En amerikansk faktureringsadress gör att iDEAL inte visas.
Verify minimum amounts
BNPL-metoder kräver ett lägsta belopp på $50.01. Kontrollera att de visas eller döljs korrekt baserat på varukorgens totalsumma.