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

> ## Agent Instructions
> Money is always a decimal string at the currency's precision (for example "29.00"), paired with an ISO 4217 currency field. Never use minor units.
> Build against the sandbox first: base URL https://sandbox-api.bachs.io with sk_sandbox_ keys. Production is https://api.bachs.io with sk_live_ keys; going live is a key swap.
> Treat webhooks (for example collection.succeeded) as the source of truth for fulfilment, never client-side events or redirects.
> Subscriptions are created by completing a checkout for a recurring product. There is no direct create-subscription endpoint.
> IDs carry resource prefixes (cust_, prod_, sub_, chk_, inv_, ref_) and timestamps are ISO 8601 UTC.

# invoice.paid

> Occurs when an invoice is paid in full.

Sent when an invoice is paid. Use it to extend the subscription period or mark the bill settled.

```json Event theme={"dark"}
{
  "id": "evt_1a2b3c4d5e6f7g8h",
  "type": "invoice.paid",
  "created_at": "2026-04-27T12:00:00.000000+00:00",
  "organization_id": "acct_7KpQ2mNv4XbR9dLc",
  "data": {
    "invoice_id": "inv_1a2b3c4d5e",
    "subscription": { "subscription_id": "sub_1a2b3c4d5e" },
    "customer": { "customer_id": "cust_1a2b3c4d5e6f", "email": "jane@example.com", "name": "Jane Doe" },
    "charge": null,
    "status": "paid",
    "collection_method": "charge_automatically",
    "currency": "USD",
    "subtotal": "10.00",
    "total": "10.00",
    "amount_paid": "10.00",
    "amount_remaining": "0.00",
    "period_start": "2026-04-01T00:00:00Z",
    "period_end": "2026-05-01T00:00:00Z",
    "attempt_count": 0,
    "next_payment_attempt": "2026-04-01T00:05:00Z",
    "created_at": "2026-04-01T00:00:00Z",
    "metadata": {}
  }
}
```

## Event fields

**id** `string`

The event's unique identifier, prefixed `evt_`. Use it to deduplicate deliveries.

**type** `string`

Always `invoice.paid`.

**created\_at** `string`

When the event occurred, in UTC.

**organization\_id** `string`

Your account's ID.

**data.invoice\_id** `string`

The invoice's ID.

**data.subscription** `object | null`

The subscription this invoice belongs to, or `null` for a one-off.

**data.customer** `object`

The customer the invoice is for.

**data.charge** `object | null`

The payment that collected the invoice, once collection is attempted.

**data.status** `string`

Invoice status: `draft`, `open`, `paid`, `uncollectible`, or `void`.

**data.collection\_method** `string`

How the invoice is collected, e.g. `charge_automatically`.

**data.currency** `string`

The invoice currency, as an ISO 4217 code.

**data.subtotal** `string`

The subtotal before credits, as a decimal string.

**data.total** `string`

The total due, as a decimal string.

**data.amount\_paid** `string`

Amount paid so far.

**data.amount\_remaining** `string`

Amount still due.

**data.period\_start** `string`

Start of the billing period, in UTC.

**data.period\_end** `string`

End of the billing period, in UTC.

**data.attempt\_count** `integer`

Number of collection attempts made.

**data.next\_payment\_attempt** `string | null`

When the next collection attempt is scheduled.

**data.metadata** `object`

Your own key-value data on the invoice.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.