Full API Access
Webhook Testing
测试卡
使用以下卡号,在不同地区模拟成功和被拒绝的付款。- Successful Payments
- Declined Payments
- Subscription Renewal Failures
测试续订失败
Create a test subscription
4242424242424242)创建订阅。初始扣款应成功,且订阅应变为 active。Update the payment method
4000000000000341(有效期:12/34,CVV:123),然后保存。Advance the next billing date (optional)
next_billing_date 设置为当前 UTC 时间,并替换下面的示例值。该值必须是 ISO 8601 / RFC 3339 UTC 时间戳(必须包含 Z 后缀)。Verify the failure
- 续订扣款会在失败卡上被拒绝
- 订阅首先变为 Past Due(宽限期;
subscription.past_duewebhook 携带past_due_ends_at),宽限期结束后变为 On-Hold - 会发送
payment.failedwebhook event - 客户可以返回 Customer Portal 更新付款方式并重试
测试 UPI
UPI 测试使用特殊的 VPA(Virtual Payment Address)标识符来模拟不同的付款结果。UPI 测试要求
- Billing country 必须设置为
IN - Currency 必须为
INR - 对于非印度商家:必须启用 Adaptive Currency
测试 Pix
Pix 测试使用测试 CPF(Brazilian tax ID)来模拟二维码流程。Pix 测试要求
- Billing country 必须设置为
BR - Currency 必须为
BRL
测试 BNPL
Buy Now Pay Later 提供商有特定的测试数据要求。Klarna 测试数据
使用以下信息在测试模式下模拟 Klarna 付款:Afterpay 测试
Select Afterpay
Test successful payment
Test failed authentication
requires_customer_action 转换为 requires_payment_method。测试数字钱包
Apple Pay
Enable test mode
Add a card to Apple Wallet
Complete test purchase
Google Pay
Join the test card group
Enable test mode
Complete test purchase
Amazon Pay、Cash App Pay 和 RevolutPay
使用测试 API keys 并遵循标准结账流程。测试交易会在不实际扣款的情况下进行模拟。 有关完整的数字钱包文档(包括 Apple Pay 的 domain verification),请参阅 Digital Wallets 页面。测试 ACH Direct Debit
可以在测试模式下通过结账时输入测试银行信息来测试 ACH Direct Debit。Enable test mode
Set currency and billing address
USD,并将 billing address country 设置为 US。除此组合外不提供 ACH。Use a one-time payment
Enter the test bank details
测试银行账户
使用 routing number110000000 以及以下任一 account number:
测试欧洲支付方式
欧洲支付方式(iDEAL、Bancontact、EPS、Multibanco)可在测试模式下进行测试。Enable test mode
Set billing address
NL用于 iDEALBE用于 BancontactAT用于 EPSPT用于 Multibanco
Set currency
Complete test flow
测试 SEPA Direct Debit IBAN
SEPA Direct Debit 需要 EUR 和欧元区 billing address。使用以下测试 IBAN 强制触发特定结果:测试亚太地区钱包
GCash、Alipay HK、FPS 和 Touch ‘n Go 是二维码支付方式,仅在 billing country 和 currency 匹配时显示。Enable test mode
Set billing country and currency
Select the method and confirm
Verify the checkout behavior
测试最佳实践
Test all payment scenarios
Test all payment scenarios
Verify webhook handling
Verify webhook handling
payment.succeeded、payment.failed 和 subscription events。使用 Dodo Payments CLI 在本地测试 webhooks:dodo wh listen将 live 测试 webhooks 转发到本地服务器dodo wh trigger为所有支持的 webhook event types 发送模拟 payloads
Test on real devices
Test on real devices
Test regional methods with correct addresses
Test regional methods with correct addresses
Verify minimum amounts
Verify minimum amounts