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

# Pay an Invoice

Pays an open invoice using the account default payment method or the `payment_method` you provide. On success, `status` becomes `paid` and `amount_due` becomes zero.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.chargeapi.co/v1/invoices/inv_SZ5lUXjKQN1PCTTssbNwD4r6mS0PgngF/pay \
    -H "Authorization: Bearer ch_sk_test_..." \
    --json '{
    "payment_method": "pm_F4cVIoPeTxca9xtzSWESIJSJ6nM22WeS"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "id": "inv_SZ5lUXjKQN1PCTTssbNwD4r6mS0PgngF",
      "object": "invoice",
      "amount_due": 0,
      "amount_paid": 2500,
      "created": "2026-05-02T00:38:42.809Z",
      "currency": "eur",
      "description": null,
      "due_date": "2026-05-09T00:38:27.507Z",
      "fleet": "flt_neUNAfpkQL62qBNzc889RGW3aX1RdIDs",
      "line_items": [
          {
              "amount": 1842,
              "description": "Charging sessions for March 2026",
              "quantity": 1,
              "unit_amount": 1842
          },
          {
              "amount": 658,
              "description": "Reservation fees",
              "quantity": 2,
              "unit_amount": 329
          }
      ],
      "metadata": {},
      "paid_at": "2026-05-02T01:18:25.570Z",
      "payment_method": "pm_F4cVIoPeTxca9xtzSWESIJSJ6nM22WeS",
      "period_end": "2026-05-02T00:38:18.941Z",
      "period_start": "2026-04-01T00:38:32.568Z",
      "status": "paid"
  }
  ```
</ResponseExample>

## Parameters

<ParamField body="payment_method" type="string">
  Override the default payment method with a specific payment method ID.
</ParamField>

## Returns

Returns the updated invoice.
