> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cheqpay.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Environments

> Choose between sandbox and production environments

## Sandbox vs Production

Cheqpay provides two separate environments to help you develop and test your integration safely before going live.

## Sandbox Environment

Use sandbox to test your integration without processing real money or affecting live data.

### Features

* Test your integration without real money
* Use test cards, SPEI accounts, PAYCASH references, and CIE Cash Net references
* Perfect for development and testing
* Faster processing for testing
* Full feature parity with production

### Base URL

```
https://api.sandbox.cheqpay.mx/pos
```

### When to Use Sandbox

<CardGroup cols={2}>
  <Card title="Development" icon="code">
    Build and test your integration locally
  </Card>

  <Card title="Testing" icon="flask">
    Run automated tests and QA workflows
  </Card>

  <Card title="Demos" icon="presentation">
    Show product demos to stakeholders
  </Card>

  <Card title="Training" icon="graduation-cap">
    Train your team on the platform
  </Card>
</CardGroup>

### Test Data

In sandbox, you can use:

* Test card numbers (see [Testing Guide](/guides/testing))
* Mock SPEI transfers (auto-complete after 30 seconds)
* PayCash references with **webhook-driven** status changes (no auto-complete; use the [PayCash simulator](/testing/webhook-simulators) in development)
* CIE Cash Net references with **webhook-driven** status changes (no auto-complete; use the [CIE Cash Net simulator](/testing/webhook-simulators) in development)
* Simulated webhook events
* Test 3D Secure flows

<Note>
  **SPEI vs offline methods in sandbox:** SPEI mock transfers can complete automatically for faster testing. PayCash and CIE Cash Net only advance when Cheqpay receives a deposit notification (simulator or provider reconciliation), then emit `payment.capture.success` to your endpoint.
</Note>

<Tip>
  Refunds process instantly in sandbox instead of taking 5-10 days like in production.
</Tip>

## Production Environment

Use production to process real payments with actual money and live customer data.

### Features

* Process real payments
* Live API credentials required
* Full compliance and security
* Real bank integrations
* Actual money movement

### Base URL

```
https://prod.cheqpay.mx/pos
```

### Requirements

Before using production:

<AccordionGroup>
  <Accordion title="Complete Account Verification" icon="check-circle">
    Submit your business documentation and complete KYC verification.
  </Accordion>

  <Accordion title="Obtain Production API Keys" icon="key">
    Contact support to receive your production API credentials.
  </Accordion>

  <Accordion title="Test Thoroughly in Sandbox" icon="flask">
    Ensure your integration works perfectly before going live.
  </Accordion>

  <Accordion title="Configure Webhooks" icon="webhook">
    Set up your production webhook endpoints.
  </Accordion>
</AccordionGroup>

## Switching Between Environments

Simply change the base URL and API key:

```javascript theme={null}
// Sandbox
const baseUrl = 'https://api.sandbox.cheqpay.mx/pos';
const apiKey = process.env.CHEQPAY_SANDBOX_KEY;

// Production
const baseUrl = 'https://prod.cheqpay.mx/pos';
const apiKey = process.env.CHEQPAY_PRODUCTION_KEY;
```

<Warning>
  Never use production API keys in sandbox or vice versa. Each environment requires its own credentials.
</Warning>

## Going Live

Ready to switch to production? Follow our [Going Live Guide](/guides/going-live) for a complete checklist.

<Card title="Go Live Checklist" icon="rocket" href="/guides/going-live">
  Review all the steps needed to launch in production
</Card>
