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

# Stripe customers source

> Observe the Stripe customer list on your app.

Use the [REST mounting guide](https://docs.bijection.com/integrations/native-rest.md) to bind a feed to
`stripeCustomers(auth)` from `@bijectionhq/app-rest`. Seal a
restricted read credential as a bearer secret. Bind the feed and receiver
to the same `data` label.

Initialize the mount with `{ profile: { mode: "stripeCustomers", limit: 25 } }`.
Set a limit from 1 to 100. Each response may carry up to 36 KiB. The feed
publishes customers by ID and uses the last ID as `starting_after` while
Stripe reports more results. A terminal page starts the next sweep at the
head. The list omits customers attached to Stripe test clocks. Deleted or
otherwise omitted customers remain in the rows
already published. The feed requires the bundled parser artifact.
[Stripe customer listing](https://docs.stripe.com/api/customers/list)

## Create and update

Bind `stripeCustomerWriter(auth, label, contract?)` at the mount’s `data`
label and pass it as `receivers.writers.stripe`. Use
`mode: "stripe"` with the [REST write commands](https://docs.bijection.com/integrations/native-rest.md#create-and-update-records).
Supply scalar customer fields as a JSON object. Use bracket notation such
as `"metadata[order]"` for nested form keys. The app encodes the Stripe form
and requires the decoded 200 response to name the created or updated
customer. Use a credential with customer write permission. The default is
`once`. To declare `keyed`, use bearer authentication and account scope,
`matching: "keyAndBody"`, `bindRequest: true`, retention up to 24 hours and
a reviewed `maxInFlight`. Each kernel-authorized attempt carries the
original event’s `Idempotency-Key` and the same form body.
[Provider API](https://docs.stripe.com/api/idempotent_requests)

## Billing and payment observations

Use a separate [REST mount](https://docs.bijection.com/integrations/native-rest.md) and `providerEndpoint` per mode. Bind `https://api.stripe.com`, a restricted bearer credential with access to the listed resource, and the mount's protected `data` label. Initialize with `{ profile: { mode: "provider", provider, limit: 20 } }`.

| Provider mode | Path |
| - | - |
| `stripe.charges.observations` | `/v1/charges` |
| `stripe.invoices.observations` | `/v1/invoices` |
| `stripe.subscriptions.observations` | `/v1/subscriptions` |
| `stripe.payouts.observations` | `/v1/payouts` |
| `stripe.balance-transactions.observations` | `/v1/balance_transactions` |
| `stripe.refunds.observations` | `/v1/refunds` |

These modes land API objects by ID. Subscriptions request all statuses. Each sweep carries the last listed ID as `starting_after`, then returns to the newest page. Omitted records remain landed. Each page holds 1–100 records and up to 36 KiB.

## Event log

Use mode `stripe.events.occurrences` and path `/v1/events`. Supply `start` as a UTC timestamp to the second, within the last 29 days and more than two minutes before polling. Omit `end` for continuous collection, or set a UTC `end` no more than seven days after `start` for a finite replay.

Each poll reads a half-open creation-time window that advances by up to one day. The upper bound stays at least two minutes behind the request time and is fixed while paging by the last event ID. The next window overlaps the previous one by up to ten minutes. Each response holds 1–100 events and up to 36 KiB. An aged-out retained position records a continuity gap. To resume after the replay horizon has passed, install a fresh source with a reviewed start within that horizon.

Read entries through `occurrences.list` or `occurrences.get({ key })`. Each `evt_…` ID retains the first observed event, including its type, time, original API version and event data. Multiple events on one object land separately. Duplicate, missing and aged-out events leave existing entries in place. The log can miss events that become visible after the overlap has passed.

[Stripe Events API](https://docs.stripe.com/api/events/list)

## Billing and payment writes

Use `providerWriter` with a restricted write bearer and the same protected label. Follow the [write mount guide](https://docs.bijection.com/integrations/native-rest.md#native-provider-writes).

| Mode |
| - |
| `stripe.invoices.create-update` |
| `stripe.subscriptions.create-update` |
| `stripe.payouts.create-update` |
| `stripe.refunds.create-update` |

Supply scalar fields with bracket notation for nested provider parameters. The app bounds the request and encoded form to 24 KiB. The account-scoped contract binds the exact request and uses Stripe's idempotency header. Acknowledgment requires HTTP 200, the expected object type and an exact resource ID. For updates, the returned ID must equal the target. These modes carry no read cursor and perform no deletes. Payout and refund updates follow Stripe's API field restrictions.

[Stripe idempotent requests](https://docs.stripe.com/api/idempotent_requests)

Submit mode `stripe.invoices.finalize` through the existing invoice writer with `{ action: "finalizeInvoice", id }`. The caller key binds the exact invoice ID. The request sets `auto_advance=false`. Acknowledgment requires the same invoice ID, a finalized provider status and automatic advance disabled. This workflow carries no read cursor or deletes.

[Finalize an invoice](https://docs.stripe.com/api/invoices/finalize)

## Webhook-assisted polling

Stripe-signed notifications wake customer and native Stripe feeds in the installed account.
Bind the REST mount to a protected `data` label and follow the
[verified wake route setup](https://docs.bijection.com/integrations/native-webhooks.md#wake-a-rest-source-from-a-provider-webhook)
to seal the signing secret and register the subscription for this source.


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