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

# Checkout

> The quickest way to get paid. You price in your currency; your customer pays in USDC or USDT, on a page we host.

## The flow

**1. Create the payment**

Your server creates it and gets a `checkoutUrl`.

**2. Send your customer**

Redirect them, or share the link or a QR code.

**3. They pay**

They choose a network and token, and send the amount shown.

**4. We confirm it**

We see it on-chain, credit your balance and POST `checkout.completed` to your webhook URL.

**5. They come back**

The customer returns to your `redirectUrl`.

## Create the payment

Amounts are in your currency: `USD`, `NGN`, `GHS`, `KES`, `UGX`, `TZS`, `XOF-BEN` or `XOF-CIV`. We convert at the current rate when the customer picks a token. Put your order ID in `reference`; it comes back in the webhook.

```bash cURL theme={null}
curl -X POST "https://api.pay.flipeet.io/api/v1/transaction/initialize" \
  -H "x-api-key: $FLIPEET_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": 25000,
  "currency": "NGN",
  "email": "ada@example.com",
  "memo": "Order #1042",
  "reference": "order_1042",
  "redirectUrl": "https://shop.example.com/thanks"
}'
```

```javascript Node.js theme={null}
const response = await fetch("https://api.pay.flipeet.io/api/v1/transaction/initialize", {
  method: "POST",
  headers: {
    "x-api-key": process.env.FLIPEET_SECRET_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "amount": 25000,
    "currency": "NGN",
    "email": "ada@example.com",
    "memo": "Order #1042",
    "reference": "order_1042",
    "redirectUrl": "https://shop.example.com/thanks"
  }),
});
const { data } = await response.json();
```

```python Python theme={null}
import os
import requests

response = requests.post(
    "https://api.pay.flipeet.io/api/v1/transaction/initialize",
    headers={"x-api-key": os.environ["FLIPEET_SECRET_KEY"]},
    json={
        "amount": 25000,
        "currency": "NGN",
        "email": "ada@example.com",
        "memo": "Order #1042",
        "reference": "order_1042",
        "redirectUrl": "https://shop.example.com/thanks"
    },
)
data = response.json()["data"]
```

Keep the `txRef` from the response. It identifies the payment on our side.

## Confirm it was paid

Don't rely on the customer reaching your `redirectUrl`: they might close the tab. Fulfil the order when you receive `checkout.completed`, after [checking its signature](https://docs.flipeet.io/webhooks.md#verify-signatures).

```json checkout.completed theme={null}
{
  "event": "checkout.completed",
  "livemode": true,
  "amount": 25000,
  "asset": "usdc",
  "currency": "NGN",
  "txAmount": 16.67,
  "memo": "Order #1042",
  "network": "base",
  "paymentAddress": "0x8b3F5a7C9e1B3d5F7a9C1e3B5d7F9a1C3e5B02aD",
  "paymentDate": "2026-11-04T10:21:09.000Z",
  "payerEmail": "ada@example.com",
  "payerAddress": "0x5aE1c3B0d2F4e6A8b0C2d4E6f8A0b2C4d6E89c21",
  "reference": "order_1042",
  "status": "completed",
  "rate": 1500,
  "txHash": "0x4f9e2a6c8e0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a4c6e8bb7c1",
  "txRef": "fp_8f2k3m"
}
```

| Field | Meaning |
| - | - |
| `amount`, `currency` | What you charged, in your currency |
| `txAmount`, `asset`, `network` | What the customer sent on-chain |
| `rate` | The conversion rate used |
| `reference` | Your order ID |
| `txRef` | Our ID for the payment |

If you missed a webhook, look the payment up with [Retrieve a checkout](https://docs.flipeet.io/api-reference/checkout/retrieve-a-checkout.md).

## Fees

Each completed payment is added to your balance in the payment's currency, less a 0.5% fee: a ₦25,000 payment adds ₦24,875.

## Payments that don't match

A payment that arrives more than 1% short, or in a token other than the one the checkout asked for, isn't completed automatically. We hold it and review it, and refund the customer where that's right. You won't get `checkout.completed` for it.

> [!TIP]
>
> In the sandbox the checkout page has buttons to complete or fail the payment, so you can test the redirect and the webhook without sending funds.


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