Skip to main content
The sandbox environment is a full simulator: it accepts the same requests as production, returns the same response shapes, and emits webhooks with the same signature scheme. Use it to test your end-to-end integration without moving any real money. This guide describes the deterministic recipes the simulator uses to drive specific outcomes.

Selecting sandbox

Send a request with a ypk_test_... key. There is no separate URL — the same https://api.yuvexpay.com base URL serves both environments.

Payment behavior matrix

Sandbox payments transition automatically based on the decimal cents of the requested amount: So R$ 49.02 simulates an unpaid PIX, R$ 99.04 simulates an expired PIX, and any value ending in .01 (R$ 1.01, R$ 49.01, R$ 1000.01) simulates an instant successful payment.

Withdrawal behavior matrix

Sandbox withdrawals follow the same convention:

Refund behavior matrix

The decimal portion is read from the payment amount being refunded, not the refund request itself.

Webhook simulation

Sandbox emits webhooks for the same events production does. Sandbox webhooks are signed with your sandbox webhook secret. We recommend configuring a separate sandbox webhook URL in the dashboard so test traffic never lands on your production endpoint. See the Webhooks guide for the verification algorithm.

Sandbox idempotency keys

Idempotency keys are scoped per environment. The same key value can be reused in sandbox and production without colliding — they’re separate keyspaces. Within sandbox, the same rules apply as in production: a 24-hour TTL and a payload match on retries.

Limits and isolation

  • Sandbox payments and withdrawals never affect your production balance or reports.
  • Webhooks, statements and receipts are generated for sandbox transactions and are clearly labelled as sandbox.
  • Sandbox keys cannot access production data, and vice versa.

Going live

When your integration is stable:
  1. Create a ypk_live_ key in the dashboard (requires completed KYB).
  2. Configure a production webhook endpoint and store its secret separately from your sandbox secret.
  3. Swap the API key in your environment variables.
  4. Run a small live transaction end-to-end before opening real traffic.