Environments
Build and test safely in Sandbox, then switch to Live when your integration and business account are approved.
MigraPay has two environments. They share the same base URL and the same endpoints; the API key you send selects the environment.
| Capability | Sandbox | Live |
|---|---|---|
| Base URL | https://business-api.migrapay.com/v1/api | https://business-api.migrapay.com/v1/api |
| Key prefix | mpb_test_ | mpb_live_ |
| Money movement | Simulated. No real funds move. | Real payouts and collections. |
| Payout outcomes | Controlled by test values | Decided by the receiving network. |
| Collections | Settle on demand with mock-settle | Settle when your customer pays. |
| Webhooks | Sent to the endpoints you add while in Sandbox mode | Sent to your Live endpoints. |
| Data | Test data | Production data |
The key prefix for the environment selected in the top bar is mpb_test_mpb_live_.
Sandbox and Live data are fully isolated. Wallets, recipients, payouts, collections and webhook endpoints created in one environment do not exist in the other, and their ids differ.
Sandbox
Create a Sandbox key in the dashboard under Developers → API keys by choosing the Sandbox mode. Everything you do with it happens in a separate test copy of your business, so you can create recipients, send payouts and settle collections without touching real money. See Sandbox & test values for how to trigger specific outcomes.
Move to Live
Complete your integration
Exercise every flow you use in Sandbox, including failed payouts and webhook handling.
Verify your business account
Live payouts and collections are available once your business has been reviewed and approved.
Swap in Live credentials
Create a key with the mpb_live_ prefix, store it in your production secret manager and add your production webhook endpoint. Recreate any recipients you need in Live: Sandbox recipients do not carry over.