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

Để mô phỏng lỗi, hãy đóng cửa sổ modal Afterpay trên trang chuyển hướng. Thanh toán chuyển từ requires_customer_action sang requires_payment_method.
Afterpay requires a minimum transaction amount of $50.01 to appear as a payment option.
Để xem tài liệu BNPL đầy đủ, bao gồm cả việc kiểm thử Billie B2B, hãy xem trang Buy Now Pay Later.

Kiểm thử Digital Wallets

Apple Pay

1

Enable test mode

Sử dụng test API keys của Dodo Payments.
2

Add a card to Apple Wallet

Thêm một thẻ thật vào Apple Wallet. Trong test mode, thẻ sẽ không bị tính phí.
3

Complete test purchase

Mở checkout trên thiết bị Apple và hoàn tất quy trình Apple Pay.
Apple Pay yêu cầu HTTPS. Tính năng này sẽ không xuất hiện trên localhost nếu chưa thiết lập SSL đúng cách. Việc xác minh domain cũng phải được hoàn tất.

Google Pay

1

Join the test card group

Tham gia nhóm thẻ kiểm thử Google Pay để tự động thêm test cards vào wallet của bạn.
2

Enable test mode

Sử dụng test API keys của Dodo Payments.
3

Complete test purchase

Chọn một trong các test cards trong Google Pay để hoàn tất giao dịch.

Amazon Pay, Cash App Pay & RevolutPay

Sử dụng test API keys và làm theo quy trình checkout tiêu chuẩn. Các giao dịch kiểm thử được mô phỏng mà không phát sinh khoản phí thực tế. Để xem tài liệu Digital Wallets đầy đủ, bao gồm việc xác minh domain cho Apple Pay, hãy xem trang Digital Wallets.

Kiểm thử ACH Direct Debit

Có thể kiểm thử ACH Direct Debit trong Test Mode bằng cách nhập thông tin ngân hàng kiểm thử tại bước thanh toán.
1

Enable test mode

Sử dụng test API keys của Dodo Payments.
2

Set currency and billing address

Đặt đơn vị tiền tệ thanh toán thành USD và quốc gia của địa chỉ thanh toán thành US. ACH không được cung cấp ngoài tổ hợp này.
3

Use a one-time payment

ACH không khả dụng trên các trang thanh toán cho subscription, vì vậy hãy kiểm thử với một khoản thanh toán one-time.
4

Enter the test bank details

Nhập một trong các cặp routing number và account number kiểm thử bên dưới, sau đó xác nhận webhook handler của bạn nhận được trạng thái thanh toán cuối cùng — các khoản thanh toán ACH được xác nhận bất đồng bộ thay vì tại bước thanh toán.

Tài khoản ngân hàng kiểm thử

Sử dụng routing number 110000000 với bất kỳ account number nào sau đây: Để xem danh sách đầy đủ các tài khoản kiểm thử, hãy tham khảo trang ACH Direct Debit.

Kiểm thử các phương thức châu Âu

Có thể kiểm thử các phương thức thanh toán châu Âu (iDEAL, Bancontact, EPS, Multibanco) trong Test Mode.
1

Enable test mode

Sử dụng test API keys của Dodo Payments.
2

Set billing address

Đặt quốc gia của địa chỉ thanh toán tương ứng với phương thức thanh toán:
  • NL cho iDEAL
  • BE cho Bancontact
  • AT cho EPS
  • PT cho Multibanco
3

Set currency

Các phương thức châu Âu yêu cầu đơn vị tiền tệ EUR.
4

Complete test flow

Thực hiện quy trình xác thực ngân hàng mô phỏng trong môi trường kiểm thử.

IBAN kiểm thử cho SEPA Direct Debit

SEPA Direct Debit yêu cầu EUR và địa chỉ thanh toán thuộc Eurozone. Sử dụng các IBAN kiểm thử này để buộc một kết quả cụ thể: Để xem danh sách đầy đủ các IBAN kiểm thử, bao gồm giá trị theo từng quốc gia, hãy tham khảo trang Europe. Để xem tài liệu đầy đủ về các phương thức thanh toán châu Âu, hãy tham khảo trang Europe.

Phương pháp kiểm thử tốt nhất

Đừng chỉ kiểm thử các khoản thanh toán thành công. Hãy kiểm thử cả trường hợp bị từ chối, hủy và các tình huống đặc biệt như không đủ tiền.
Đảm bảo các webhook endpoints của bạn xử lý chính xác mọi event types, đặc biệt là payment.succeeded, payment.failed và các subscription events.Sử dụng Dodo Payments CLI để kiểm thử webhooks trên máy local:
  • dodo wh listen chuyển tiếp live test webhooks đến local server của bạn
  • dodo wh trigger gửi mock payload cho tất cả webhook event types được hỗ trợ
Đối với Apple Pay và Google Pay, hãy kiểm thử trên thiết bị iOS và Android thực tế. Simulator không mô phỏng đầy đủ hành vi của wallet.
Các phương thức thanh toán theo khu vực (UPI, iDEAL, v.v.) yêu cầu địa chỉ thanh toán tương ứng. Địa chỉ thanh toán tại Hoa Kỳ sẽ không hiển thị iDEAL.
Các phương thức BNPL yêu cầu giá trị tối thiểu $50.01. Hãy kiểm thử để đảm bảo chúng hiển thị/ẩn chính xác dựa trên tổng giá trị giỏ hàng.

Các trang liên quan

Cards

Kiểm thử thẻ, 3D Secure và các phương thức thanh toán đã lưu.

Digital Wallets

Kiểm thử Apple Pay, Google Pay và Amazon Pay.

BNPL

Kiểm thử Klarna, Afterpay và Billie.

India

Kiểm thử UPI và RBI mandate.

Europe

Kiểm thử iDEAL, Bancontact, EPS và Multibanco.

Webhooks

Thiết lập webhooks cho các test events.

CLI Webhook Testing

Kiểm thử webhooks trên máy local bằng Dodo Payments CLI.
Lần sửa đổi cuối 17 tháng 8, 2026