# Quickstart

Your first sandbox payment in three steps.

Canonical page: https://docs.nuepay.net/quickstart/

## 1. Create a sandbox key

In [API Keys](https://platform.nuepay.net/integration/api-keys), name your application, select **Sandbox Key** and validate your transactional PIN. API access requires an approved business account.

```bash
export NUEPAY_TEST_KEY="YOUR_SANDBOX_SECRET"
# Save a new UUID for each payment. Keep it for retries.
export PAYMENT_UUID="00000000-0000-4000-8000-000000000001"
```

 

## 2. Send a request

```bash
curl -X POST https://api.nuepay.net/v1/collections \
  -H "Authorization: Bearer $NUEPAY_TEST_KEY" \
  -H "Idempotency-Key: $PAYMENT_UUID" \
  -H 'Content-Type: application/json' \
  -d '{"amount":"500.00","currency":"UGX","phone":"0772000000","merchant_reference":"order-123"}'
```

 

> **Accepted is not paid**
> 
> HTTP 202 returns `process`. Fulfil only after `success`.

## 3. Confirm the payment

Replace `YOUR_REFERENCE` with `data.reference` from the response.

```bash
curl -X POST https://api.nuepay.net/v1/sandbox/transactions/YOUR_REFERENCE/simulate \
  -H "Authorization: Bearer $NUEPAY_TEST_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"outcome":"success"}'
```



This credits UGX 500 in test funds. No real money moves. Next, [set up webhooks](https://docs.nuepay.net/webhooks/index.md) and test `failed` and `timeout` outcomes.
