Skip to main content
The sandbox mode is similar to that of real world usage in most regards, however there are some differences depending on the service being used.

Prices

The prices used in sandbox are generally based on real world asset prices, for assets which exist (conceptually) on both mainnet and testnet. However the DEXs used on testnets are generally not arbitraged to be the same price. This can lead to the application reporting unexpectedly large (or possibly negative) fees.

KYC

If the user does not have an existing MoonPay or Stripe account, a mock KYC form will be shown. This will not require a valid SSN or credit card, however the user will have to provide a valid email and phone number to get past security checks. See test credit card details that can be provided, depending on the service. The sandbox testing mode can be enabled in the application by setting sandbox to true. API keys can be obtained by contacting [email protected]. Below is an example using the Payments Widget. To learn more about the Halliday API and its options, please reach out to [email protected]:
copy
import { openHallidayPayments } from "@halliday-sdk/payments";

openHallidayPayments({
    apiKey: HALLIDAY_PUBLIC_API_KEY,
    // USDC on Base
    outputs: ["base:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"],
    ...

    // If set to true, will use service sandboxes and testnet chains.
    sandbox: true
});

Moonpay Onramp KYC Mock Values

For testing Moonpay onramp, see the guidelines for testing. The following mock values will work for testing in the United States:
KYC RequirementMock Value
SSN123-12-3123
Credit Card Number5385 3083 6013 5181
Credit Card Expiration12/2030
Email Verification Codereceive from email
Checkout Confirmation CodeCheckout1!
CVC123

Banxa Onramp Mock Values

For testing Banxa onramp, see the testing information. The following mock values will work for testing:
FieldValue
Card NameUse the name that you provided as part of KYC
Card Number4111 1111 1111 1111
ExpiryAny expiry date in the future
Security CodeAny

Crypto.com Sandbox Onramp Mock Values

For testing Crypto.com onramp, the following mock values will work for testing:
FieldValue
EmailAny valid email string
NameAny name
Card NameAny first and last name
Card Number4242 4242 4242 4242
ExpiryAny expiry date in the future
CVCAny 3 digits
Billing addressAny US address
Checkout Confirmation CodeCheckout1!

Considerations when testing MoonPay

MoonPay has several security features in place to detect and prevent fraud; given the nature of testing, it is possible some activities may be incorrectly tagged as fraudulent. To that end, it is recommended to follow these best practices to test an integration:
  • Do not use test credit cards in real world environments or the account will automatically be blocked.
  • Do not use the same MoonPay account across sandbox and real world environments or the account will automatically be blocked.
  • Fraud alerts / issues may occur if MoonPay suspects a user has multiple MoonPay accounts. Ensure that each tester uses a unique identifier (email, phone number, etc.) that has not been previously associated with MoonPay.

Sandbox Transactions with the API

Test transactions for Halliday Payments can be created for onramps and swaps using the API with sandbox assets. Sandbox transaction requests are submitted to the API using the same URL as production API requests (https://v2.prod.halliday.xyz/). Four API endpoints accept a sandbox query parameter boolean in the request URL (?sandbox=true). The endpoints are:
  • GET /chains
  • GET /assets
  • GET /assets/available-inputs
  • GET /assets/available-outputs
The sets of assets returned from the API with and without the sandbox flag have no overlap, which is also true for returned chains. For example, /assets?sandbox=true will return fake_usd and sepolia:0x among other sandbox assets. And /assets will return usd and ethereum:0x among other production assets. When creating or confirming a quote, the API will classify the transaction as sandbox or production based on the provided input and output assets in the request body. Using the POST /payments/quotes endpoint for a sandbox transaction does not require the sandbox=true URL parameter. Simply providing a request body specifying fake_usd to get ETH on Sepolia testnet (sepolia:0x) will be treated as a sandbox transaction because the provided assets are sandbox assets. Example sandbox request to POST /payments/quotes:
{
  "request": {
    "kind": "FIXED_INPUT",
    "fixed_input_amount": {
      "asset": "fake_usd",
      "amount": "500"
    },
    "output_asset": "sepolia:0x"
  },
  "price_currency": "USD",
  "customer_ip_address": "102.129.145.128"
}
Notice the following request does not require a sandbox query parameter:
copy
curl -X POST "https://v2.prod.halliday.xyz/payments/quotes" \
  -H "Authorization: Bearer pk_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "request": {
      "kind": "FIXED_INPUT",
      "fixed_input_amount": {
        "asset": "fake_usd",
        "amount": "500"
      },
      "output_asset": "sepolia:0x"
    },
    "price_currency": "USD",
    "customer_ip_address": "102.129.145.128"
  }'
To walk through onramping and swapping using the API, see the Halliday API Quickstart page.