Skip to main content
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 fire with the same shape and headers as production, signed with your sandbox webhook secret.
  • 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, including webhook handling and error scenarios, before switching to production.

Going live

When you’re ready to accept real payments:
  1. Create a production API key in the dashboard (requires completed KYB).
  2. Replace your sandbox ypk_test_... key with the ypk_live_... key in your environment variables.
  3. Verify your production webhook endpoints are configured and that your verifier accepts production signatures.
  4. Start processing real transactions.
Production transactions involve real money. Ensure your error handling, idempotency logic and webhook verification are thoroughly tested in sandbox before going live.