Skip to main content
The VelaFi sandbox is an isolated test environment that mirrors the production API’s structure and behavior using entirely simulated data. You can create orders, query accounts, and exercise the full request/response cycle without moving real money, verifying real identities, or affecting any live merchant accounts. It is the recommended starting point for any new integration and a safe place to validate changes before deploying them to production.

Sandbox Base URL

Point your HTTP client at the following base URL to reach the sandbox:
All production endpoints are available under this base URL with the same path structure. For example, to retrieve fiat trading pairs in the sandbox:
This endpoint is public, so it needs no token. Endpoints that act on your account do: see Authentication.

Getting Sandbox Credentials

Sandbox API keys are provisioned separately from production keys and are not generated through the dashboard. To obtain your sandbox API key and API secret, contact the VelaFi team directly:
You do not need to complete KYC/KYB or create a merchant account to access the sandbox. The VelaFi team will provision a pre-configured test account with simulated user and merchant data ready to use.
Once you receive your credentials, use them to get a token from GET /v2/token/generate and include it in the X-BH-TOKEN header of every request, exactly as you would in production:

Sandbox vs. Production

The table below summarizes the key behavioral differences between the two environments. Use this as a checklist when deciding which environment is appropriate for a given activity.
Never use production API keys against the sandbox base URL, or sandbox credentials against the production base URL. Keep the two sets of credentials strictly separated in your environment configuration.

Example: Retrieve Fiat Trading Pairs

The following request demonstrates a complete sandbox API call. It uses a public endpoint, so it confirms you can reach the sandbox but does not test your credentials.
A successful response returns the list of supported fiat trading pairs available in the test environment:
Run through your entire on-ramp, off-ramp, and global payment order flows in the sandbox before switching to production. Because webhook callbacks are not triggered in sandbox, poll the order status endpoint manually to verify state transitions during testing.
Work through the following sequence in the sandbox to validate your integration end to end before going live:
1

Confirm credentials

Get a token from GET https://api-test.velafi.com/v2/token/generate with your sandbox API key and secret, then call GET /v2/user/account with it. A successful response confirms that your key, secret, IP whitelist, and API access are all set up.
2

Test on-ramp order creation

Create a fiat-to-crypto order using simulated merchant and account data. Verify that the system returns an order_id and that you can retrieve the order by ID.
3

Test off-ramp order creation

Create a crypto-to-fiat order and confirm the response includes the expected settlement details and beneficiary information.
4

Test global payment order creation

Create a fiat-to-fiat order with a sender and recipient merchant configured for different fiat currencies. Confirm the order status progresses as expected.
5

Switch to production

Replace the sandbox base URL with https://api.velafi.com, swap in your production API key and secret, and get tokens from the production host. Re-run a smoke test against the production /v2/user/account endpoint to confirm the switch.

Sandbox Testing Tools

The sandbox has two endpoints that simulate incoming deposits, so you can fund test merchants without moving real money. They exist only on https://api-test.velafi.com. On https://api.velafi.com they return 404. Both accept GET or POST, with the parameters sent as query parameters.

Simulate a Fiat Deposit

https://api-test.velafi.com/v2/platform/test/deposit Simulates an incoming bank deposit to a merchant’s activated fiat account.
number
required
ID of the merchant to credit.
string
required
Fiat currency code, for example MXN.
number
required
Amount to deposit. Must be greater than 0.
number
required
Payment method ID of the merchant’s activated fiat account for this currency.
string
Alias of a virtual account under the same merchantId, fiat and paymentId. When set, the deposit goes to that virtual account.
Common failure messages:
  • The merchant has not activated the corresponding fiat currency account. — the merchant has no active account for this fiat and paymentId.
  • The depositAlias invalid. — no virtual account matches depositAlias.
  • This method of currency recharge is not currently supported. — this payment method has no deposit simulator.
cURL

Simulate a Crypto Deposit

https://api-test.velafi.com/v2/platform/test/crypto/deposit Adds test crypto funds to a merchant’s wallet.
number
required
ID of an approved merchant.
string
required
One of USDT, USDC, BTC, MMXN, COPM or MXNB. Other values return {"code":500, "msg":"crypto is invalid"}.
number
required
Amount to add. Must be greater than 0.
On success the response code is 200.
cURL
The simulators only cover successful deposits. They cannot produce a failed or returned deposit.

Next Steps

Quickstart

Set up your production account and generate your live API key.

API Reference

Browse all available endpoints, parameters, and response schemas.