# Mark a payout as paid

### Request

| Method | URL                                               |
| ------ | ------------------------------------------------- |
| `PUT`  | `https://api.getrewardful.com/v1/payouts/:id/pay` |

### Examples

#### Mark a payout as paid

```shell
curl --request PUT \
  --url https://api.getrewardful.com/v1/payouts/3b03791a-3fb5-4bd6-8ec3-614c9fd978ca/pay \
  -u YOUR_API_SECRET:
```

### Response

{% tabs %}
{% tab title="Success" %}

| Response code | Body                                                                                                                                                                                                                                                 |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200           | <p>JSON object describing the updated payout.<br>The state of the payout at the time the response is sent will usually be <code>processing</code>. This indicates that the payout has been queued to be marked as paid and is completely normal.</p> |

```json
{
    "id": "3b03791a-3fb5-4bd6-8ec3-614c9fd978ca",
    "currency": "USD",
    "paid_at": "2022-11-08T09:13:05.954Z",
    "state": "processing",
    "paid_by_id": null,
    "created_at": "2022-10-12T14:42:48.800Z",
    "updated_at": "2022-11-21T11:48:51.067Z",
    "amount": 1470,
    "affiliate": {
        "id": "5768bd90-7953-493f-ae6c-6562eb4d7e72",
        "created_at": "2022-10-12T14:25:09.323Z",
        "updated_at": "2022-11-08T09:13:05.954Z",
        "state": "active",
        "first_name": "Joe",
        "last_name": "Example",
        "email": "joe@example.com",
        "confirmed_at": "2022-10-12T14:25:09.323Z",
        "paypal_email": null,
        "paypal_email_confirmed_at": null,
        "wise_email": null,
        "wise_email_confirmed_at": null,
        "receive_new_commission_notifications": false,
        "sign_in_count": 0,
        "unconfirmed_email": null,
        "stripe_customer_id": null,
        "stripe_account_id": null,
        "visitors": 376,
        "leads": 142,
        "conversions": 56
    },
    "commissions": [
        {
            "id": "3a4a775c-b660-4d7f-a733-6f259a2646a7",
            "currency": "USD",
            "stripe_account_id": "acct_1GWIyRDLlKlZvFB2",
            "due_at": "2022-07-31T15:55:19.000Z",
            "paid_at": "2022-11-21T11:48:51.067Z",
            "created_at": "2022-07-01T15:57:18.742Z",
            "updated_at": "2022-11-21T11:48:51.067Z",
            "amount": 1470
        }
    ]
}
```

{% endtab %}

{% tab title="Failure" %}

### Not found

| Response code | Body                              |
| ------------- | --------------------------------- |
| `404`         | JSON object describing the error. |

```
{ "error": "Payout not found: 3b03791a-3fb5-4bd6-8ec3-614c9fd978c" }
```

#### Authentication failure

| Response code | Body                                       |
| ------------- | ------------------------------------------ |
| 401           | Description of the authentication failure. |

```json
{  "error": "Invalid API Secret." }
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.rewardful.com/rest-api/payouts/mark-a-payout-as-paid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
