跳到主要内容

New: the Landed Cost API quotes duties and taxes at checkout in 40 markets. About the Landed Cost API

International OrdersInternational Orders

Get started

Testing

Test cards, amounts and scenarios that trigger declines, authentication, disputes and payout failures in test mode.

Test mode lets you run every flow end to end without moving money. Use your sk_test_ key, then use the cards and values on this page to trigger specific outcomes.

This is preview documentation for a prototype. Endpoints, fields and keys are illustrative.

Test cards

Use any future expiry date, any three-digit CVC (four for American Express) and any postal code.

Card numberBrandResult
4242 4242 4242 4242VisaSucceeds
5555 5555 5555 4444MastercardSucceeds
3782 822463 10005American ExpressSucceeds
4000 0000 0000 3220VisaRequires 3-D Secure authentication
4000 0000 0000 0002VisaDeclined: card_declined
4000 0000 0000 9995VisaDeclined: insufficient_funds
4000 0000 0000 0069VisaDeclined: expired_card
4000 0000 0000 0259VisaSucceeds, then opens a dispute
4000 0000 0000 5126VisaSucceeds, but refunds fail

Cards by country

To test local acquiring and country-specific methods, use a card issued in the shopper's country.

Card numberIssuing country
4000 0027 6000 0016Germany
4000 0082 6000 0000United Kingdom
4000 0039 2000 0003Japan
4000 0007 6000 0002Brazil

Trigger outcomes with amounts

For methods without card numbers, such as wallets and bank transfers, the order amount decides the outcome.

Amount ends inResult
00Succeeds
01Fails with payment_method_declined
02Stays in processing for 2 minutes, then succeeds
03Stays in processing for 2 minutes, then fails

For example, an order for 10001 minor units with a bank transfer will fail.

Authentication

Card 4000 0000 0000 3220 opens a test 3-D Secure page. Choose Complete to succeed or Fail to decline. The order moves to requires_action while the shopper is on that page, and you receive payment.requires_action.

Payouts

Use these bank details in test mode to simulate payout outcomes:

DetailResult
IBAN DE89370400440532013000paid
IBAN DE62370400440532013001failed with account_closed
Account holder name Test Mismatchfailed with name_mismatch

Trigger events directly

You don't have to create a real flow to test your webhook handler. The CLI sends a realistic event to your endpoint:

io trigger payment.failed
io trigger dispute.opened
io trigger payout.failed

See Webhooks for how to forward events to your machine.

Landed-cost quotes

In test mode, quotes use fixed illustrative rates so results are repeatable. Any destination postal code works. To test a non-guaranteed quote, leave out hs_code on an item.

Moving to live

Before you switch to sk_live_ keys:

  • Handle order.paid from a webhook, not the browser redirect.
  • Handle payment.failed and show the shopper a clear message.
  • Verify webhook signatures.
  • Send an Idempotency-Key on every POST.
  • Check your error handling against the error reference.

Next steps