MoonPay provides a test mode for integration development and testing. Test mode uses testnet blockchains and simulated payments. No real assets are transferred.Documentation Index
Fetch the complete documentation index at: https://dev.moonpay.com/llms.txt
Use this file to discover all available pages before exploring further.
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.
+ 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.Test payment cards
Use the following test cards to simulate payments. Do not enter real payment card information. Use any valid 3-digit CVV (or 4-digit for Amex) and any future expiration date.US customers
| Card type | Card number | Expiration | CVV |
|---|---|---|---|
| Visa Credit | 4000 0200 0000 0000 | 12/2030 | 100 |
| Mastercard Credit | 5436 0310 3060 6378 | 12/2030 | 100 |
| Amex Credit | 3456 7890 1234 564 | 12/2030 | 1000 |
UK customers
| Card type | Card number | Expiration | CVV |
|---|---|---|---|
| Visa Credit | 4242 4242 4242 4242 | 12/2030 | 100 |
| Visa Debit | 4659 1055 6905 1157 | 12/2030 | 100 |
| Mastercard Debit | 5305 4847 4880 0098 | 12/2030 | 100 |
EU customers
| Card type | Card number | Expiration | CVV |
|---|---|---|---|
| Visa Debit (FR) | 4010 0617 0000 0021 | 12/2030 | 100 |
| Mastercard Debit (DE) | 5305 4847 4880 0098 | 12/2030 | 100 |
| Amex Credit (ES) | 3456 7890 1234 564 | 12/2030 | 1000 |
Declined transactions
Use these cards to test error handling for different failure scenarios.| Card number | Expiration | CVV | Decline reason |
|---|---|---|---|
4544 2491 6767 3670 | 12/2030 | 100 | Insufficient funds |
4897 4535 6848 5113 | 12/2030 | 100 | Suspected fraud |
4818 9242 5013 1070 | 12/2030 | 100 | Restricted card |
4556 2537 5271 2245 | 12/2030 | 100 | Security violation |
4095 2548 0264 2505 | 12/2030 | 100 | Timeout / Internal error |
5437 8211 3539 9682 | 12/2030 | 100 | Insufficient funds |
5279 9884 0539 8834 | 12/2030 | 100 | Restricted card |
5265 1622 7058 7964 | 12/2030 | 100 | Timeout / Internal error |
5363 4501 8040 2239 | 12/2030 | 100 | Lost card |
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.
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.Supported testnets
Test mode supports the following tokens and testnets:| Token | Testnet |
|---|---|
| Bitcoin | Testnet3 |
| Ethereum | Sepolia |
| ERC-20 tokens | Sepolia |
| Solana | Testnet |
| Binance Coin | Testnet |
| TON | Testnet |
| Stellar | Testnet |
| Litecoin | Testnet |
ERC-20 token transfers in test mode use MoonPay’s test token contract.
Troubleshooting
Common errors
| Error | Cause | Solution |
|---|---|---|
Framing 'https://blocks.moonpay.com' violates "frame-ancestors" CSP | Your app or website domain has not been allowlisted | Add domains at https://dashboard.moonpay.com/developers |