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

# Sandbox & Test Mode

> Test your integration risk-free using test secret keys and simulated test phone numbers.

## Overview

RapidTopup provides a fully isolated **Sandbox (Test Mode)** environment. You can test your API endpoints, payload inspector, error handling, and webhook signature verification without spending real funds or invoking live upstream carrier transactions.

***

## 1. Test API Keys (`rtu_test_sk_...`)

Every reseller account automatically has access to both **Live Keys** (`rtu_live_sk_...`) and **Test Keys** (`rtu_test_sk_...`).

In your Developer Dashboard (`/developer-api`), use the **Live / Test Mode Toggle** at the top to switch between environments and copy your test secret key.

```
Authorization: Bearer rtu_test_sk_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

***

## 2. Interactive Test Balance & Refills

* **Starting Balance:** Your sandbox test wallet starts with a simulated balance of **₦500,000.00**.
* **Test Deductions:** Test purchases deduct from your sandbox test balance. When your test balance drops too low, test purchases return `400 Insufficient Sandbox Balance` so you can test insufficient balance error handling in your code.
* **1-Click Refill:** You can instantly reset and refill your sandbox balance back to ₦500,000.00 anytime by clicking **"Top Up Test Balance"** in your Developer Dashboard.

***

## 3. Test Scenarios & Phone Numbers

To simulate successful, pending, or failed transaction outcomes during testing, use these native test phone numbers in your `POST /purchase` request body:

| Phone Number | Test Outcome | HTTP Response Code | Description |
| - | - | - | - |
| `08000000000` | **Success** | `200 OK` (`code: "000"`) | Returns a successful purchase response with mock tokens for electricity. |
| `08000000001` | **Pending** | `200 OK` (`code: "091"`) | Simulates a pending transaction state. |
| `08000000002` | **Timeout** | `200 OK` (`code: "099"`) | Simulates an upstream gateway timeout. |
| `08000000003` (or any other) | **Failed** | `200 OK` (`code: "099"`) | Simulates a failed transaction scenario. |

***

## 4. Sandbox Webhooks

Test purchases made with your `rtu_test_sk_...` key will automatically trigger test webhook callbacks to your configured webhook URL, signed with your HMAC-SHA512 secret, allowing you to test your webhook listener end-to-end.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.