> 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/approving-held-payouts.md).

# Approving Held Payouts

<figure><img src="https://3861722996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwm1DIvbGMREWT1TdLPtz%2Fuploads%2Fuxr7rUZySL3kig3L72mU%2Fpayram-payout-approving.png?alt=media&amp;token=1dba0c21-4b3c-4687-a6ac-95504a548d6f" alt=""><figcaption></figcaption></figure>

A payout in `pending-approval` is approved or rejected in the **PayRam dashboard** (**Withdraw → Payouts**), not through the API.

| Action  | What happens                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Approve | A 6-digit code, valid for 10 minutes, is emailed to the approving admin’s own address. An approver with [two-factor sign-in](https://docs.payram.com/features/two-factor-sign-in.md) on enters the code from their authenticator app instead, and no email is sent (PayRam Core v3.11.0 and later). The payout shows `pending-otp-verification` until the code is entered. **The approval takes effect only when the code is entered**: the payout then moves to `pending`, `payout.approved` is sent (PayRam Core v3.9.0 and later), and the payout is sent. |
| Reject  | The payout becomes `rejected` (final).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

Who can approve a held payout (PayRam Core v3.9.0 and later):

* **Root and Admin** — any payout, including one they created.
* **Project Admin** — payouts of the projects they administer, including one they created.
* **Nobody else** — creating a payout never lets you approve it. Other members get an “insufficient permissions” error, and the payout stays awaiting approval.

Approving or rejecting a payout that is no longer awaiting approval (already queued, being sent, sent, rejected or cancelled) is refused with `409 PAYOUT_NOT_AWAITING_APPROVAL` and changes nothing.

A refused code changes nothing either: the payout keeps waiting for the right code. From PayRam Core v3.11.0:

| Code refused because                                                          | Answer                        |
| ----------------------------------------------------------------------------- | ----------------------------- |
| Wrong emailed code                                                            | `400 INVALID_OTP`             |
| 5 wrong tries on one emailed code: it no longer works, press Resend           | `400 OTP_TOO_MANY_TRIES`      |
| Expired: press Resend                                                         | `400 OTP_EXPIRED`             |
| Already confirmed, for example by another approver                            | `409 OTP_ALREADY_USED`        |
| Started by an approver who uses the app, so no code was emailed: press Resend | `400 OTP_NOT_SENT`            |
| Wrong code from the authenticator app                                         | `400 TWO_FACTOR_CODE_INVALID` |
| App code already used: wait for the app's next code                           | `400 TWO_FACTOR_CODE_USED`    |
| Too many wrong app codes: try again after the wait                            | `429 TWO_FACTOR_LOCKED`       |

Resend waits a minute between codes (`429 OTP_RESEND_TOO_SOON`) and sends at most 5 codes an hour for each payout (`429 OTP_RESEND_LIMIT`).

Track the result through [webhooks](https://docs.payram.com/api-integration/payouts-apis/payout-webhooks.md) or [GET Single Payout](https://docs.payram.com/api-integration/payouts-apis/get-single-payout.md).
