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

# Test Mode

> Break things. Risk-free.

## Test Everything. Break Nothing.

Build and test your entire integration without real transactions. No real charges. No real payouts. Just safe experimentation.

<CardGroup cols={2}>
  <Card title="Safe" icon="shield">
    No real money moves.
  </Card>

  <Card title="Full Features" icon="check">
    Everything works like Live Mode.
  </Card>
</CardGroup>

***

## Test vs Live

|              | Test Mode        | Live Mode        |
| ------------ | ---------------- | ---------------- |
| Transactions | Simulated        | Real charges     |
| Money        | Fake             | Real funds       |
| Data         | Isolated         | Production       |
| Webhooks     | Fully functional | Fully functional |
| API Behavior | Identical        | Identical        |

**Switch modes:** Dashboard header toggle or `X-Environment` header in API calls.

| Header Value          | Mode      |
| --------------------- | --------- |
| `X-Environment: test` | Test Mode |
| `X-Environment: prod` | Live Mode |

<Warning>
  Always verify you're in the correct mode before sharing payment links.
</Warning>

***

## API Keys by Environment

API Keys are created for a specific environment (test or production). When creating an API key in the Dashboard, you select which environment the key belongs to.

| Environment | Purpose                 |
| ----------- | ----------------------- |
| Test        | Development and testing |
| Production  | Real payments           |

<Note>
  API Keys use key pair authentication, not prefixed secret keys. See [Authentication](/api-reference/authentication) for details.
</Note>

***

## Test Cards

### Successful Payments

| Card                  | Type              |
| --------------------- | ----------------- |
| `4576 7500 0000 0110` | Visa Credit       |
| `2226 9000 0000 0110` | Mastercard Credit |
| `4001 7000 0000 0110` | Visa Debit        |
| `2226 9300 0000 0110` | Mastercard Debit  |

### Declined Payments

| Card                  | Type              |
| --------------------- | ----------------- |
| `4576 7500 0000 0220` | Visa Credit       |
| `2226 9000 0000 0220` | Mastercard Credit |
| `4001 7000 0000 0220` | Visa Debit        |
| `2226 9300 0000 0220` | Mastercard Debit  |

<Note>
  Any future expiry date. Any 3-digit CVC.
</Note>

***

## Test Payment Methods

### Digital Wallets

Test Mode shows simulated UI:

* **Apple Pay** -- Safari/iOS
* **Google Pay** -- Chrome/Android

***

## Test Webhooks

Webhooks fire normally in Test Mode. To test your webhook endpoints:

1. Register your webhook endpoint in Dashboard --> API & Development
2. Switch to Test Mode
3. Perform actions that trigger events (create orders, complete payments)
4. Your endpoint receives webhook events just like in Live Mode

***

## Test Subscriptions

Test the full lifecycle:

1. **Create** -- Subscribe via test checkout
2. **Bill** -- Billing occurs on schedule (use short intervals for faster testing)
3. **Update** -- Change plans via the Customer Portal or API
4. **Cancel** -- Test cancellation flow
5. **Expire** -- Verify expired subscription behavior

***

## Test Data

### Isolation

Test data is completely separate:

* Test products don't appear in Live Mode
* Test customers are separate
* Test transactions don't affect live reports

### Environment Sync

When ready to go live, sync your products from test to production:

```bash theme={"system"}
curl -X POST https://api.waffo.ai/v1/actions/onetime-product/publish-product \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY_TOKEN" \
  -d '{
    "id": "product-uuid"
  }'
```

<Note>
  The publish-product endpoint is a one-way operation from test to production. It does not require an `X-Environment` header.
</Note>

***

## Going Live Checklist

Before accepting real payments:

* [ ] Complete end-to-end testing in test mode
* [ ] Test edge cases (declined cards, failures)
* [ ] Verify webhook handling
* [ ] Test checkout on mobile devices
* [ ] Add a payout account (Payout Accounts)
* [ ] Complete business details (Settings --> Business Details)
* [ ] Review product pricing
* [ ] Sync products from test to production using publish-product

<Card title="Quickstart" icon="rocket" href="/quickstart#going-live-checklist">
  Full going-live checklist.
</Card>
