<!-- Public page: https://payeast.app/developers/docs/#merchant-apps · version 2026-12-05 -->

# Merchant apps: add a customer, then charge them

A **merchant app** is a business system that accepts customer payments through PayEast. It authenticates with its own client ID and secret using server-side HTTP Basic; see [merchant authentication](authentication.md).

The rule that keeps customers safe: **adding someone's details is not consent to charge them.** The customer must first **accept** your app; only then can you charge, and every charge is shown to them for approval (PIN + two-factor) unless they switched on autopay for your app with a limit of their own.

**Every merchant app starts in the developer sandbox.** A business that wants to use the PayEast API for its customers signs up to the sandbox (`https://dev.payeast.app`), creates a test app there, **uploads its logo**, tests with test money, and only then requests to go live. PayEast does not create merchant apps any other way. The logo uploaded in the sandbox is the one customers see in production too.

## 1. Link a customer: by customer number, or by QR code

**By customer number** (you already know it): `POST /v1/mandates` with `customer_number`, `reason`, optional `recurring` and `reference`. The customer gets a prompt on their phone and an e-mail to accept. See the [API reference](api-reference.md).

**By QR code** (the customer is in front of your screen; no number needed): `POST /v1/mandates/qr`.

```
POST /v1/mandates/qr          (HTTP Basic client_id:client_secret)
{ "reason": "Chorus plan, monthly", "recurring": true, "reference": "cust-77" }

201 { "object": "mandate_qr", "id": "cqr_…", "status": "pending",
      "qr_url": "https://beta.payeast.app/connect/scan?s=…", "expires_at": "2026-11-29T12:10:00Z" }

```

1. Draw `qr_url` as a QR code on your screen (any QR library).
2. The customer opens **PayEast on their phone, chooses Scan on the home page** and points it at the code. A phone camera works too: it opens the same PayEast screen.
3. PayEast shows who is asking (your app name and logo) and why (your `reason`). The customer taps **Add** and confirms with their app PIN or fingerprint; that is their acceptance. The mandate is created **active** with autopay **off**. They get a notice and an e-mail, and can remove your app any time in PayEast → Settings → Transactions → Merchant Apps.
4. You learn the outcome in two ways: the **`mandate.accepted`** webhook (with `customer_number`, `reason`, `reference`), and by polling `GET /v1/mandates/qr/{id}` → `status` is `pending`, `approved` (with `mandate_id` and `customer_number`), `declined` or `expired`.

A QR code works **once** and expires after **5 minutes**. If it expires, ask for a new one (at most 20 per hour per app); do not keep an old code on screen. Test apps can only link their developer and testers who accepted an invitation.

## 2. Charge

`POST /v1/charges` by `customer_number` (use the one from the webhook or the poll). A customer who has not accepted you gets `409 customer_not_linked`. The rules for autopay, limits, unusual charges and prompts are in the [API reference](api-reference.md). Outcomes arrive as `payment.*` webhooks, and the money goes to your app's receiving PayEast account.

## 3. Money limits

PayEast limits what a customer can send by their verification level (not verified, basic, full: per payment, per day, per month). A charge over a limit is refused with a plain sentence naming it; show it as is.

## 4. Where to read more

[Authentication](authentication.md) · [API reference](api-reference.md) · [Webhooks](webhooks.md) · [Sandbox](sandbox.md) · [OpenAPI](/downloads/payeast-openapi.yaml) (`/mandates`, `/mandates/qr`, `/mandates/qr/{id}`, `/charges`).

## Updates

| Date | Change | Who must act |
|---|---|---|
| 2026-12-05 | **Tighter sandbox**: one named test app per developer; testers must accept an invitation; 20 requests a minute and 100 a day; test secrets expire after 90 days; stricter webhook addresses. See [the sandbox guide](sandbox.md). | Everyone testing: re-invite testers and handle `429 rate_limited` |
| 2026-11-29 | **Merchant apps start in the developer sandbox and upload their logo there**; the same logo is used in the sandbox and in production, and going live needs it. See [the sandbox guide](sandbox.md). | Merchant apps: sign up at dev.payeast.app and upload your logo |
| 2026-11-29 | **Link by QR code**: `POST /v1/mandates/qr`, `GET /v1/mandates/qr/{id}`; the customer scans with PayEast's Scan and accepts. API version `2026-11-29`. | Merchant apps that want it: add the call and show the QR |
