Hoppa till huvudinnehåll

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-tester

1

Set billing country and currency

Säkerställ att billing_address.country är US och billing_currency är USD.
2

Use a qualifying amount

Ställ in transaktionsbeloppet mellan 60.00och60.00 och 19,999.00.
3

Complete the Sunbit flow

Välj Sunbit vid utcheckningen och slutför finansieringsansökan i Sunbit-modal.
4

Test failure

Stäng Sunbit-modal innan flödet slutförs för att simulera en avvisad ansökan. Betalningen övergår till requires_payment_method.
Sunbit visas endast för amerikanska kunder som betalar i USD med ett belopp mellan 60.00och60.00** och **19,999.00.
För fullständig BNPL-dokumentation inklusive Billie B2B-testning, se sidan Köp nu Betala senare.

Testa digitala plånböcker

Apple Pay

1

Enable test mode

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

Add a card to Apple Wallet

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

Complete test purchase

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

Google Pay

1

Join the test card group

Gå med i Google Pay testkortgrupp för att få testkort automatiskt tillagda i din plånbok.
2

Enable test mode

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

Complete test purchase

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

Amazon Pay, Cash App Pay & RevolutPay

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

Testa europeiska metoder

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

Enable test mode

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

Set billing address

Ställ in faktureringsland för att matcha betalningsmetoden:
  • NL för iDEAL
  • BE för Bancontact
  • AT för EPS
  • PT för Multibanco
3

Set currency

Europeiska metoder kräver EUR-valuta.
4

Complete test flow

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

Testningsbästa praxis

Testa inte bara lyckade betalningar. Testa avvisningar, avbokningar och kantfall som otillräckliga medel.
Säkerställ att dina webhook-endpoints korrekt bearbetar alla händelsetyper, särskilt payment.succeeded, payment.failed och abonnemangshändelser.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 händelsetyper
För Apple Pay och Google Pay, testa på riktiga iOS- och Android-enheter. Simulatorer återspeglar inte fullt ut plånbokens beteende.
Regionala betalningsmetoder (UPI, iDEAL, etc.) kräver matchande faktureringsadresser. En amerikansk faktureringsadress visar inte iDEAL.
BNPL-metoder kräver minst $50.01. Testa att de korrekt visas/döljs baserat på varukorgens total.

Relaterade sidor

Cards

Korttester, 3D-secure och sparade betalningsmetoder.

Digital Wallets

Apple Pay, Google Pay, Amazon Pay testning.

BNPL

Klarna, Afterpay och Billie testning.

India

UPI och RBI-mandat testning.

Europe

iDEAL, Bancontact, EPS, Multibanco testning.

Webhooks

Ställ in webhooks för testhändelser.

CLI Webhook Testing

Testa webhooks lokalt med Dodo Payments CLI.
Last modified on May 26, 2026