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

# Quickstart

> Run a complete create, pay and verify cycle against sandbox

This walks the full path — encrypt, create, pay, poll — end to end. Everything below runs
against sandbox with your test keys.

## Before you start

<Steps>
  <Step title="Get your keys">
    You need three values, all issued during onboarding: a **public key**, a **secret key**, and
    an **RSA public encryption key**. See [Authentication](/api-reference/authentication).
  </Step>

  <Step title="Set up encryption">
    Order payloads are RSA-encrypted. While you build, sandbox's
    [encryption helper](/encryption#the-sandbox-encryption-helper) can do it for you.
  </Step>
</Steps>

## 1. Encrypt the order payload

```bash theme={null}
curl -X POST https://api-v4.reeple.ai/charge/data/encrypt \
  -H "Content-Type: application/json" \
  -H "api-key: YOUR_PUBLIC_KEY" \
  -d '{
    "customer": {
      "firstname": "Ada",
      "lastname": "Lovelace",
      "mobile": "+2348158200000",
      "country": "NG",
      "email": "ada@example.com"
    },
    "order": {
      "amount": 500,
      "reference": "order-2026-0001",
      "description": "Order #0001",
      "currency": "NGN"
    },
    "payment": {
      "RedirectUrl": "https://yourdomain.com/payment/callback"
    }
  }'
```

The response's `data` is your ciphertext.

<Tip>
  `reference` is yours to choose and must be unique. You use it for every subsequent call about
  this order, so store it before you go any further.
</Tip>

## 2. Create the order

```bash theme={null}
curl -X POST https://api-v4.reeple.ai/charge/order/create \
  -H "Content-Type: application/json" \
  -H "api-key: YOUR_PUBLIC_KEY" \
  -d '{ "data": "YOUR_ENCRYPTED_PAYLOAD" }'
```

```json theme={null}
{
  "data": {
    "order": {
      "reference": "order-2026-0001",
      "amount": 500,
      "fee": 0,
      "statusId": 1,
      "status": "Initiated",
      "currency": "NGN",
      "narration": "Order #0001"
    },
    "otherPaymentOptions": [
      { "code": "C", "name": "Card Payment", "currency": "NGN" },
      { "code": "BANK-TRANSFER", "name": "Pay With Bank Transfer", "currency": "NGN" }
    ],
    "savedCards": []
  },
  "status": "success",
  "statusCode": "01",
  "message": "Created order successfully"
}
```

`otherPaymentOptions` is what you render as the customer's choices — it varies by currency.

## 3. Pay the order

Encrypt the method-specific payload, then send it. For a card:

```json theme={null}
{
  "reference": "order-2026-0001",
  "paymentoption": "C",
  "country": "NG",
  "card": {
    "cardnumber": "5346712000061350",
    "expirymonth": "03",
    "expiryyear": "28",
    "cvv": "573"
  }
}
```

```bash theme={null}
curl -X POST https://api-v4.reeple.ai/charge/order/pay \
  -H "Content-Type: application/json" \
  -H "api-key: YOUR_PUBLIC_KEY" \
  -H "x-reeple-callback-url: https://yourdomain.com/payment/callback" \
  -d '{ "data": "YOUR_ENCRYPTED_PAYLOAD" }'
```

```json theme={null}
{
  "data": {
    "paymentDetail": {
      "redirectUrl": "https://payment-v2.reeple.ai/redirect?t=aHR0cHM6...",
      "recipientAccount": null,
      "paymentReference": "CPD5A4DAA8-C363-4179-A52F-0E8604F72494"
    },
    "orderPayment": {
      "statusId": 2,
      "orderPaymentResponseCode": "02",
      "orderPaymentResponseMessage": "pending-authenticaion",
      "totalAmount": 530,
      "fee": 30
    }
  },
  "status": "success",
  "statusCode": "02",
  "message": "pending-authenticaion"
}
```

Send the customer to `paymentDetail.redirectUrl` to complete 3-D Secure.

<Warning>
  `"status": "success"` here means *the payment was accepted for processing*, not that it
  succeeded. Do not fulfil the order yet.
</Warning>

## 4. Poll for the final status

```bash theme={null}
# encrypt { "reference": "order-2026-0001" } first
curl -X POST https://api-v4.reeple.ai/charge/order/status \
  -H "Content-Type: application/json" \
  -H "api-key: YOUR_PUBLIC_KEY" \
  -d '{ "data": "YOUR_ENCRYPTED_PAYLOAD" }'
```

```json theme={null}
{
  "status": "Successful",
  "statusCode": "00",
  "message": "Transaction was completed successfully",
  "data": {
    "isFinalStatus": true,
    "requeryNeeded": false,
    "orderSummary": {
      "orderReference": "order-2026-0001",
      "totalChargedAmount": 530,
      "fee": 30,
      "statusId": 5,
      "status": "Successful",
      "paymentType": "C"
    }
  }
}
```

Keep polling while `isFinalStatus` is `false`. See
[Order lifecycle](/order-lifecycle) for the polling schedule and every status value.

## 5. Confirm server-side before fulfilling

Status polling uses your public key, which your frontend may hold. Before you release goods,
confirm with your **secret key** from your backend:

```bash theme={null}
curl -X POST https://api-v4.reeple.ai/charge/order/verify \
  -H "Content-Type: application/json" \
  -H "api-key: YOUR_SECRET_KEY" \
  -d '{ "reference": "order-2026-0001" }'
```

See [Callbacks and verification](/callbacks-and-verification) for why this step matters.

## Next steps

<CardGroup cols={2}>
  <Card title="Payment methods" icon="credit-card" href="/payment-methods">
    Card, bank transfer and USSD payloads side by side.
  </Card>

  <Card title="Sandbox testing" icon="flask" href="/sandbox-testing">
    Test cards, test bank codes, and what differs from production.
  </Card>
</CardGroup>
