Skip to main content
MoonPay provides a test mode for integration development and testing. Test mode uses testnet blockchains and simulated payments. No real assets are transferred.

Enabling test mode

Test mode is determined by the API key you use when creating a session. Use your test API key (sk_test_...) to enable test mode. Use your live API key (sk_live_...) for production. You can find your API keys on the Developers page in your MoonPay dashboard.
All frames and SDK methods automatically operate in test mode when initialized with a session token created using test API keys.

Test accounts

When creating test accounts:
  • KYC verification is simulated - documents are not verified
  • We recommend using a US or UK address for test accounts, as these work best with test payment cards
  • You can skip document submission by clicking “Skip document submission” if prompted

Test data

Email addresses

You must use a real email address that you can access. MoonPay sends OTP codes for login verification, and there are no test bypass values.
You cannot reuse the same email address for different customers.
Tip: Use the + suffix pattern to create multiple unique addresses from a single inbox: you+test1@example.com, you+test2@example.com, etc.

Phone numbers

You must use a real phone number that you can access. MoonPay sends OTP codes for verification, and there are no test bypass values.
A phone number can only be associated with one customer at a time. If you verify with the same phone number on a different customer, it will be removed from the previous customer.

SSN (US residents)

SSN values are not verified in test mode. You can enter any 9-digit value.
Do not use your real Social Security number. Use a fake value like 123456789.

Test payment cards

Use the following test cards to simulate payments. Do not enter real payment card information. Use any valid 3-digit CVV and any future expiration date.

US customers

UK customers

EU customers

3D Secure test cards

3D Secure (3DS) is an additional verification step the customer’s bank may require during a card payment. The cards below trigger deterministic 3DS outcomes so you can test your challenge handling end to end.
  • Frictionless outcomes complete without any customer interaction.
  • Challenge outcomes render a 3DS challenge frame the customer must complete or cancel.
When a card triggers a 3DS challenge, the simulator prompts for a password. Enter Checkout1! to complete the challenge.

Frictionless

Challenge

Declined transactions

Use these cards to test error handling for different failure scenarios.

Apple Pay

In test mode, the Apple Pay frame renders a mock Apple Pay button instead of the native Apple Pay UI. When a customer taps the mock button, a browser confirmation dialog (window.confirm) appears in place of the Apple Pay payment sheet:
  • Ok simulates a successful transaction.
  • Cancel simulates a failed transaction.
This lets you test the full Apple Pay flow without a real Apple Pay account or Safari-specific setup.
If you embed the Apple Pay frame in an iframe with a sandbox attribute, include allow-modals in the sandbox value. This allows window.confirm to work cross-origin inside the frame. See the Apple Pay frame reference for details.

Triggering challenges

In test mode, you can force a challenge by setting the buy amount to a specific value. This lets you test how your integration renders and resolves a challenge without reproducing the real-world conditions that normally trigger one. The amount must match exactly. For example, a quote for 49 triggers the CVV challenge, but 49.01 does not. These triggers only apply in test mode and have no effect with a live API key.
Challenges are surfaced by a challenge event that points to the challenge frame. See Handle challenges for how to render and resolve one.

Supported testnets

Test mode supports the following tokens and testnets:
ERC-20 token transfers in test mode use MoonPay’s test token contract.
Quote requests for assets that aren’t available in test mode fail with a 400 invalid_request error. Use an asset such as SOL or ETH when testing.

Troubleshooting

Common errors