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

# Testing

> Test your integration safely in sandbox mode

Glyde's sandbox environment lets you build and test your integration without processing real money. Sandbox behaves identically to production, so you can validate your entire payment flow before going live.

## Sandbox Environment

| Setting            | Value                            |
| ------------------ | -------------------------------- |
| **Base URL**       | `https://sandbox.useglyde.co/v1` |
| **API Key Prefix** | `sk_`                            |

All sandbox transactions are simulated—no real money moves, and no real bank accounts are affected.

## Getting Sandbox Credentials

1. Log in to your dashboard at [app.useglyde.co](https://app.useglyde.co)
2. Toggle to **Sandbox** mode (usually in the top navigation)
3. Go to **Settings** → **API Configuration**
4. Copy your sandbox API keys

## Test Bank Accounts

Use these test accounts to simulate different transfer scenarios:

### Successful Transfer

| Field          | Value              |
| -------------- | ------------------ |
| Account Number | `0264341458`       |
| Bank Code      | `058`              |
| Account Name   | `Glyde Transfer 1` |

Transfers to this account will succeed after a brief processing period.

### Failed Transfer

| Field          | Value              |
| -------------- | ------------------ |
| Account Number | `49214898`         |
| Bank Code      | `059`              |
| Account Name   | `Glyde Transfer 2` |

Transfers to this account will fail, allowing you to test error handling.

## What to Test

Build confidence in your integration by testing these scenarios:

### Payment Collection

* Create a checkout session and complete payment
* Test both card and bank transfer channels
* Verify webhook delivery when payment completes
* Handle expired or abandoned payments

### Transfers

* Verify bank accounts before sending
* Initiate transfers and confirm webhook receipt
* Test insufficient funds scenarios
* Handle duplicate reference errors

### Virtual Accounts

* Create static and dynamic accounts
* Simulate incoming payments
* Test account deactivation
* Verify transaction history

### Error Handling

* Invalid API keys
* Malformed requests
* Missing required fields
* Network timeouts

## Webhook Testing

Webhooks work the same in sandbox as in production. To receive webhooks during local development:

1. Use a tunneling service like [ngrok](https://ngrok.com) to expose your local server
2. Configure the tunnel URL as your webhook endpoint in the dashboard
3. Process test transactions and verify webhooks arrive

```bash theme={null}
# Example: expose local port 3000
ngrok http 3000
```

## Going Live Checklist

Before switching to production, verify:

<Steps>
  <Step title="All Flows Tested">
    You've successfully tested payments, transfers, and webhooks in sandbox.
  </Step>

  <Step title="Error Handling Works">
    Your integration gracefully handles all error scenarios.
  </Step>

  <Step title="Webhooks Configured">
    Your production webhook URL is set and your server is ready to receive events.
  </Step>

  <Step title="Keys Updated">
    You've replaced sandbox keys with production keys (`sk_` prefix).
  </Step>

  <Step title="URL Updated">
    Your base URL points to `https://api.useglyde.co/v1`.
  </Step>

  <Step title="Logging Enabled">
    You're logging API requests and responses for debugging.
  </Step>
</Steps>

## Sandbox Limitations

A few things behave differently in sandbox:

* **Wallet balance** — You have unlimited test funds
* **Processing time** — Transactions complete faster than in production
* **Bank verification** — Only test accounts can be verified
* **Webhooks** — May have slight delays compared to production

These differences don't affect your integration logic—code that works in sandbox will work in production.
