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.
Per la documentazione completa su BNPL, inclusi i test B2B di Billie, consulta la pagina Buy Now Pay Later.

Testare i Digital Wallet

Apple Pay

1

Enable test mode

Usa le tue chiavi API di test di Dodo Payments.
2

Add a card to Apple Wallet

Aggiungi una carta reale al tuo Apple Wallet. In modalità di test, la carta non verrà addebitata.
3

Complete test purchase

Apri il checkout su un dispositivo Apple e completa il flusso Apple Pay.
Apple Pay richiede HTTPS. Non verrà visualizzato su localhost senza una configurazione SSL corretta. Anche la verifica del dominio deve essere completata.

Google Pay

1

Join the test card group

Unisciti al gruppo di carte di test di Google Pay per aggiungere automaticamente le carte di test al tuo wallet.
2

Enable test mode

Usa le tue chiavi API di test di Dodo Payments.
3

Complete test purchase

Seleziona una delle carte di test in Google Pay per completare la transazione.

Amazon Pay, Cash App Pay e RevolutPay

Usa le tue chiavi API di test e segui il flusso di checkout standard. Le transazioni di test sono simulate senza addebiti effettivi. Per la documentazione completa sui Digital Wallet, inclusa la verifica del dominio per Apple Pay, consulta la pagina Digital Wallets.

Testare i metodi europei

I metodi di pagamento europei (iDEAL, Bancontact, EPS, Multibanco) possono essere testati in modalità sandbox.
1

Enable test mode

Usa le tue chiavi API di test di Dodo Payments.
2

Set billing address

Imposta il Paese dell’indirizzo di fatturazione in modo che corrisponda al metodo di pagamento:
  • NL per iDEAL
  • BE per Bancontact
  • AT per EPS
  • PT per Multibanco
3

Set currency

I metodi europei richiedono la valuta EUR.
4

Complete test flow

Segui il flusso di autenticazione bancaria simulato nell’ambiente di test.
Per la documentazione completa sui metodi di pagamento europei, consulta la pagina Europe.

Best practice per i test

Non testare solo i pagamenti completati correttamente. Testa i rifiuti, le cancellazioni e i casi limite, come i fondi insufficienti.
Assicurati che i tuoi endpoint webhook elaborino correttamente tutti i tipi di evento, in particolare payment.succeeded, payment.failed e gli eventi di sottoscrizione.Usa la Dodo Payments CLI per testare i webhook localmente:
  • dodo wh listen inoltra i webhook di test live al tuo server locale
  • dodo wh trigger invia payload simulati per tutti i 22 tipi di evento
Per Apple Pay e Google Pay, esegui i test su dispositivi iOS e Android reali. I simulatori non replicano completamente il comportamento dei wallet.
I metodi di pagamento regionali (UPI, iDEAL, ecc.) richiedono indirizzi di fatturazione corrispondenti. Un indirizzo di fatturazione statunitense non mostrerà iDEAL.
I metodi BNPL richiedono un minimo di $50.01. Verifica che vengano mostrati o nascosti correttamente in base al totale del carrello.

Pagine correlate

Cards

Test delle carte, 3D Secure e metodi di pagamento salvati.

Digital Wallets

Test di Apple Pay, Google Pay e Amazon Pay.

BNPL

Test di Klarna, Afterpay e Billie.

India

Test dei mandati UPI e RBI.

Europe

Test di iDEAL, Bancontact, EPS e Multibanco.

Webhooks

Configura i webhook per gli eventi di test.

CLI Webhook Testing

Testa i webhook localmente con la Dodo Payments CLI.
Ultima modifica il 31 luglio 2026