> For the complete documentation index, see [llms.txt](https://docs.payram.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payram.com/api-integration/payouts-apis/overview.md).

# Overview

<figure><img src="https://3861722996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwm1DIvbGMREWT1TdLPtz%2Fuploads%2FTh2uijiaNvL6SpgUdQPj%2Fpayram-payout-overview.png?alt=media&amp;token=e0af03f8-84a6-42a2-990d-86379c5047f8" alt=""><figcaption></figcaption></figure>

Send funds from your project to a recipient’s wallet and track each payout to completion.

***

### Two kinds of merchant payout

| Kind                 | Created by                                                                                                                                    | `createdBy` / `created_by` |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| **API payout**       | Your application, with `POST /api/v1/withdrawal/merchant` and a project API key — whether a person or your own automation triggered the call. | `user`                     |
| **Dashboard payout** | An admin in the PayRam dashboard.                                                                                                             | `system`                   |

Both kinds send [webhooks](https://docs.payram.com/api-integration/payouts-apis/payout-webhooks.md) (dashboard payouts: PayRam Core v3.9.0 and later) and can be read with [GET Single Payout](https://docs.payram.com/api-integration/payouts-apis/get-single-payout.md). [GET All Payouts](https://docs.payram.com/api-integration/payouts-apis/get-all-payouts.md) lists API payouts only.

### Base URL

Call every endpoint as `{BASE_URL}/api/v1/...`. `BASE_URL` is the address you open the dashboard with (shown under **Settings → Site URL**). The API and the dashboard share one address and port.

| Your setup                    | BASE\_URL                 |
| ----------------------------- | ------------------------- |
| Domain with SSL               | `https://pay.example.com` |
| Server IP, no SSL             | `http://192.168.0.1`      |
| Installed on a different port | `http://192.168.0.1:3000` |

### Authentication

Send a **project API key** in the `API-Key` header (generate one in **Project → API Keys**). Every request is scoped to that key’s project. Member-level API keys and dashboard logins are rejected with `401`. `GET /api/v1/ticker` is public and needs no key.

### Endpoints

| Method | Path                               | Purpose                                                                                            |
| ------ | ---------------------------------- | -------------------------------------------------------------------------------------------------- |
| `POST` | `/api/v1/withdrawal/merchant`      | [Create a payout](https://docs.payram.com/api-integration/payouts-apis/create-payouts.md)          |
| `GET`  | `/api/v1/withdrawal/{id}/merchant` | [Get one payout](https://docs.payram.com/api-integration/payouts-apis/get-single-payout.md)        |
| `GET`  | `/api/v1/withdrawal/merchant`      | [List API payouts](https://docs.payram.com/api-integration/payouts-apis/get-all-payouts.md)        |
| `GET`  | `/api/v1/ticker`                   | [Live USD prices](https://docs.payram.com/api-integration/payouts-apis/create-payouts.md) (public) |

The payout endpoints require PayRam v3.1.1 or later (older versions return `404`). Idempotency keys require v3.6.0 or later (older versions ignore them).

### Supported networks

| Network  | `blockchainCode` | Native coin | Tokens                           |
| -------- | ---------------- | ----------- | -------------------------------- |
| Ethereum | `ETH`            | `ETH`       | `USDC`, `USDT`, `PYUSD`, `CBBTC` |
| Base     | `BASE`           | `ETH`       | `USDC`, `CBBTC`                  |
| Polygon  | `POLYGON`        | `POL`       | `USDC`, `USDT`                   |
| Tron     | `TRX`            | `TRX`       | `USDT`                           |
| Bitcoin  | —                | —           | **Not supported for payouts**    |

### Status lifecycle

| `status`                   | Meaning                                                                                                                        |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `pending-approval`         | Held for approval. `attributes` is a **JSON-encoded string** — parse it to read `approvalReason` (values below).               |
| `pending-otp-verification` | An admin approved; waiting for the approver to enter the emailed code. Nothing for you to do.                                  |
| `pending`                  | Queued to send. If the hot wallet cannot cover it yet, it waits up to 48 hours for a top-up (see `failureReason`), then fails. |
| `initiated`                | Broadcast; `txHash` is set. While `initiated`, `txHash` can change (a fee-bump replacement) — always use the latest one.       |
| `sent`                     | Confirmed on chain. **The money has left — treat this as success.** A `sent` payout never becomes `failed`.                    |
| `processed`                | PayRam bookkeeping after `sent`. No webhook; do not wait for it.                                                               |
| `failed`                   | Did not go through — see `failureReason`.                                                                                      |
| `rejected`                 | Rejected by an admin.                                                                                                          |
| `cancelled`                | Cancelled before sending. Not reached today: payouts cannot be cancelled (see below).                                          |

**Final states:** `sent` (success), `failed`, `rejected`, `cancelled`.

`approvalReason` is one of `above_auto_approve`, `auto_approve_disabled`, `manual_only`, `daily_limit_exceeded`, `hourly_limit_exceeded`, `limit_check_failed`. See [Editing Payout Limits](https://docs.payram.com/api-integration/payouts-apis/editing-payout-limits.md) and [Approving Held Payouts](https://docs.payram.com/api-integration/payouts-apis/approving-held-payouts.md).

### Stopping a payout

Payouts cannot be cancelled, from the API or the dashboard. To stop a payout, **reject** it while it is held for approval (see [Approving Held Payouts](https://docs.payram.com/api-integration/payouts-apis/approving-held-payouts.md)); its webhook then carries `cancellation_code: REJECTED_BY_APPROVER`. A payout that is already being sent cannot be stopped. If you want a person to check payouts before they leave, hold them for approval with [payout limits](https://docs.payram.com/api-integration/payouts-apis/editing-payout-limits.md).

### Tracking payouts

* **Webhooks (recommended)** — [Payout Webhooks](https://docs.payram.com/api-integration/payouts-apis/payout-webhooks.md).
* **Polling** — [GET Single Payout](https://docs.payram.com/api-integration/payouts-apis/get-single-payout.md) until a final state.
