YuvexPay provides two environments behind the same API URL. The environment is
chosen by the API key you send — no separate hostname, no code fork.
Sandbox vs. production
Using sandbox
Create a sandbox API key in the dashboard under Settings > API Keys and
choose the Sandbox environment. The key will be prefixed with ypk_test_.
Sandbox simulates the full payment lifecycle:
- Payments are created with real-looking responses, including QR codes for PIX.
- Status transitions (
PROCESSING, PAID, EXPIRED) are simulated.
- Webhooks are not delivered for sandbox payments and withdrawals — poll
GET /v1/payments/{paymentId} or GET /v1/withdrawals/{withdrawalId} instead. Use the dashboard Send test button to exercise your signature verifier.
- No real money is moved.
See the Sandbox guide for the deterministic test recipes (specific amounts that trigger specific outcomes).
Use sandbox to test your entire integration flow and error scenarios before
switching to production. Webhook delivery is the one thing sandbox cannot
exercise; verify your handler against the dashboard test ping instead.
Going live
When you’re ready to accept real payments:
- Create a production API key in the dashboard (requires completed KYB).
- Replace your sandbox
ypk_test_... key with the ypk_live_... key in your
environment variables.
- Verify your webhook endpoint is configured and that your verifier accepts its signatures — use the dashboard Send test button. Live traffic is the first traffic that will actually deliver events.
- Start processing real transactions.
Production transactions involve real money. Ensure your error handling and
idempotency logic are thoroughly tested in sandbox, and your webhook verifier
against the dashboard test ping, before going live.