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.
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.
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.
Đừng chỉ kiểm thử các khoản thanh toán thành công. Hãy kiểm thử cả các trường hợp bị từ chối, bị hủy và các trường hợp đặc biệt như không đủ tiền.
Verify webhook handling
Đảm bảo các webhook endpoints của bạn xử lý chính xác tất cả 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 local:
dodo wh listen chuyển tiếp live test webhooks đến local server của bạn
dodo wh trigger gửi mock payloads cho tất cả 22 event types
Test on real devices
Đối với Apple Pay và Google Pay, hãy kiểm thử trên các thiết bị iOS và Android thực tế. Simulator không mô phỏng đầy đủ hành vi của wallet.
Test regional methods with correct addresses
Các phương thức thanh toán theo khu vực (UPI, iDEAL, v.v.) yêu cầu billing address tương ứng. Billing address tại Hoa Kỳ sẽ không hiển thị iDEAL.
Verify minimum amounts
Các phương thức BNPL yêu cầu mức tối thiểu $50.01. Hãy kiểm thử để đảm bảo chúng được hiển thị/ẩn chính xác dựa trên tổng giá trị giỏ hàng.