# Changelog

Every change to `/v1` is written here, newest first. The `Spec` line is the fingerprint of the published OpenAPI document after the change (`info.x-kit-fingerprint`); the build fails when the latest entry does not name the current one, so a contract change cannot ship without a line here.

## 2026-12-05: brand-free names on the wire

Spec: `76578438367c`

- Webhook headers are `X-Webhook-Signature`, `X-Webhook-Event` and `X-Webhook-Delivery` (were `Bemor-Signature`, `Bemor-Event`, `Bemor-Delivery`); the signature format is unchanged. The sender's user agent is `mor-webhooks/1`.
- API keys start with `mor_live_` or `mor_test_` (were `bm_live_`, `bm_test_`). Keys with the old prefix no longer exchange: create new ones.
- The SDK header is `X-SDK` (was `X-Bemor-SDK`).
- A subscription's `billing_mode` value `bemor_managed` is now `tenant_managed`, and the error key `subscription_bemor_managed` is `subscription_tenant_managed`. The email sender value `bemor` is now `tenant`.
- The SDK packages are `@regoria/sdk` and `regoria/sdk`; the client class is `Client` and the samples read `API_KEY`.
- The downloads are `v1.openapi.json`, `v1.openapi.yaml` and `postman.json`.

## 2026-12-04: two more kinds of published policy

Spec: `da8f675363bb`

- A published policy's `kind` may also be `merchant_privacy` (the privacy policy a business reads when it applies) or `declarations` (the statements a business makes when it applies). The existing kinds are unchanged; no request changed.

## 2026-12-03: webhooks carry a provider transaction id

Spec: `121ef5c21190`

- The `charge.declined` and `refund.issued` webhooks carry `provider_txn_id` beside `nmi_txn_id`, with the same value (a string, or null when the provider returned no transaction id). `nmi_txn_id` stays; nothing is removed. The `/v1` Charge is unchanged.

## 2026-12-02: order numbers, short operation titles

Spec: `2c0f4163d956`

- An order carries `order_number`: the short number a buyer reads out (for example `7KQ4-X2M9P`), unique within your account. It is printed on the receipt and in the emails, and the dashboard finds an order by it. The `ord_` id stays the order's id in every call; `order_number` is null on older orders that have none. The `order.paid` webhook carries it too.
- No payment fee is returned to you on a refund unless your fee card says so. Refunds already issued are unchanged.
- Every operation in the reference has a short title ("Create a refund", "List orders"); what the call does is in the description under it. No request or response changed for this.
- Internal reference numbers are gone from the descriptions of operations, parameters and fields.

## 2026-11-30: every amount names its currency

Spec: `16c3d30f73aa`

- A dispute carries `currency`, the currency of its `amount_cents` and `fee_cents` (the disputed charge's). The `dispute.opened` and `dispute.closed` webhooks carry it too.
- Statements, payouts and subscriptions in the reports carry `currency`; it is `null` on a row written before this change, which is in the home currency.
- `GET /v1/reports/finance` and its export take `currency` and answer one currency's figures, never a sum over currencies. The answer names `currency` and `currencies`, every currency the range has figures in. Without the parameter the report is the home currency's, as before.

## 2026-11-28: payouts like to like

Spec: `6f9dc5c0a9d3`

- A payout is paid in the currency of the balance it comes from, to a bank account that takes that currency. A payout in another currency than the balance is not offered.
- `next_payout` on `GET /v1/balance` carries `currency`, and its `minimum_cents` is the minimum of that currency (`null` while none is set). Two new values of `reason`: `instruction_currency` (your bank account is in another currency than this balance) and `minimum_missing` (no payout minimum is set for this currency yet).

## 2026-11-27: a sale settled in another currency than it was charged in

Spec: `c7b74f40f5b2`

- An order carries `fx_bearer` (`merchant` or `platform`): who bears the exchange difference if the processor settles the sale in another currency than the buyer paid in. `merchant`: you receive what the processor paid. `platform`: you receive the amount promised at the sale. Your provider sets it; you read it.
- An order carries what it settled as, once it has: `settled_currency`, `settled_gross_cents` (what the processor paid for the sale) and `settled_net_cents` (your share, what became available). All three are `null` while the sale is pending settlement, and stay `null` for a sale settled in the currency it was charged in.
- A charge carries `fx_bearer` too, and so do the `order.paid` and `charge.*` webhooks.
- Balance transactions: three new values of `category`. `conversion_out` takes a settled sale out of the currency it was charged in, `conversion_in` brings it into the currency it settled in (with `original_amount_cents`, `original_currency` and `exchange_rate_bps`, the rate per whole unit times 10,000), and `conversion_fee` is the fee for it where your fee card has one. A sale settled in the currency it was charged in has none of them.
- Your balance per currency follows: a sale is pending in the currency it was charged in and available in the currency it settled in.
- The reserve threshold counts settled reserve only: reserve of a sale still pending settlement does not count toward it.

## 2026-11-26: prices and checkout in more than one currency

Spec: `ef2682b4b6b3`

- `POST /v1/checkout-sessions` and `POST /v1/orders` take an optional `currency`: the currency the buyer is charged in. Absent, a hosted session opens in the currency of the buyer's country when your business offers it, otherwise in the price currency, and the buyer can switch between the two.
- Sessions, orders, subscriptions and the `order.paid` and `order.in_review` events carry `price_currency` and `price_amount_cents` beside `currency`: what the price was set in, when it differs from what the buyer paid in. `price.changed` carries `base_price_public_id` for a fixed amount in another currency.
- `POST /v1/prices` takes `currency` (one of your price currencies) and `base_price_id` (a fixed amount of an existing price in another currency); a price lists them as `amounts`.
- New: `GET /v1/prices/{price}/preview` answers what a price costs a buyer of a country, for your own storefront.
- Charges and refunds carry the request side (`request_currency`, `request_amount_cents`) when the processor charged in another currency than the one asked for.
- `GET /v1/reports/balance-summary` takes an optional `currency` and answers with `currency`: a summary is in one currency, the home currency when none is asked.
- A business that offers USD only sees no change: every new field is absent or equal to `currency`.

## 2026-11-25: every amount names its currency

Spec: `bc6dd2659251`

- Webhooks: `currency` is described as a three-letter ISO 4217 code on every event that carries one (it was documented as the fixed value `USD`). Nothing sent changes: every amount is still in USD. Read the field instead of assuming the currency.
- Amounts are integers of the currency's smallest unit (cents for USD). The field names (`amount_cents`, `total_cents`, ...) do not change.
- Ledger API: `GET /v1/balance` and `GET /v1/sub-accounts/{subAccount}/balance` take an optional `currency` (one of your declared currencies; absent, your first declared one) and answer with `currency` and `currencies`. A balance is in one currency: amounts of two currencies are never added. Statements, payouts and the accounts-payable rows carry `currency` too.

## 2026-11-25: a charge names how it was paid and what it allows

Spec: `a762751a55b1`

- `GET /v1/charges/{charge}` and `GET /v1/charges` carry `payment_system` (`credit_card`, `apple_pay` or `google_pay`) and `capabilities`, with `refund` (`none`, `full` or `partial`) and `void` (boolean). Existing charges read `credit_card`, `partial` and `true`, as cards always behaved.
- `POST /v1/refunds` answers `422` `refund_not_supported` for a charge whose `capabilities.refund` is `none`, and `422` `partial_refund_not_supported` on `amount_cents` for a partial amount on a charge whose `capabilities.refund` is `full`. No charge taken today reads either.

## 2026-11-21: roles are named by their id

Spec: `411649978b87`

- `GET /v1/users`: a user's `role` is the role's public id (`rol_...`), and `role_name` carries the name your team gave the role. A role no longer has a key, so `role` no longer carries one (`owner`, `finance`, ...); read `role_name` for display and compare `role` by id.
- `GET /v1/users`: the `role[]` filter takes role ids; `sort=role` orders by the role's name.

## 2026-11-14: buyer-selectable prices and plan changes on ending subscriptions

Spec: `1dcac8ee308d`

- `GET /v1/orders/{order}/receipt` carries `receipt_pdf_url` beside `receipt_url`: the same receipt as a PDF download, signed with the same expiry. The receipt page and the customer portal's order page link to it as Download PDF.
- A paid `POST /v1/orders` answer carries `receipt_pdf_url` beside `receipt_url`, with the same signed query.

- A checkout session's `mode` may read `resume`: the hosted session a buyer opens from the customer portal to pay the resume of a subscription they paused. It names the subscription, is never opened through `/v1`, and its paid order renews that subscription, like a renewal's. The session list filter `mode[]` accepts `resume`.

- Two new webhook events, offered on `POST /v1/webhook-endpoints` and `PATCH /v1/webhook-endpoints/{endpoint}`: `subscription.pause_scheduled` (`subscription_id`, `merchant_id`, `pause_at`, `scheduled_by` `buyer` or `merchant`) when a pause is scheduled for the period end, and `subscription.pause_cancelled` (`subscription_id`, `merchant_id`) when a scheduled pause is cleared before it starts.

- A price carries `buyer_selectable` (boolean, default `false`): set it on `POST /v1/prices` or `PATCH /v1/prices/{price}` to let the buyer switch to that price from the customer portal. Editing it never creates a new price version, and a new version (`replaces_price_id`) copies it from the price it replaces unless the request sets it. Existing prices read `false`.
- `POST /v1/subscriptions/{subscription}/change-plan` and `POST /v1/subscriptions/{subscription}/plan-change-confirmations` answer `409` `subscription_cancelled` for a subscription set to end at period end (`cancel_at_period_end` true), and the buyer's accept of a confirmation created before that answers the same. Change-plan to the subscription's current price still clears a pending change.

## 2026-11-11: a dispute's reason has a name

Spec: `497ad3a0f0aa`

- `GET /v1/disputes` and the dispute object gain `reason_label`: the card network's name for `reason_code` ("Merchandise or services not received" for `13.1`). It is `null` for a code Bemor has no name for; `reason_code` is unchanged.

## 2026-11-10: refunds are never held for approval

Spec: `3ad729fd5d83`

- `POST /v1/refunds` always answers `201`: a refund of any size is sent to the processor at once, limited only by what is left of its charge. The `202` answer is gone.
- The refund state `pending_approval` is gone, from the answers and from the `state[]` filter of `GET /v1/refunds`. `rejected`, `decided_by` and `decided_at` stay on the older refunds an approver decided.

## 2026-11-10: a user may hold no role

Spec: `1c8422b95b69`

- In `GET /v1/users`, `role` is `null` for a user whose role was deleted: they have no access to your merchant until someone gives them a role in the dashboard (Settings, Team).

## 2026-11-10: each merchant owns its roles

Spec: `98b51b9288e4`

- The `role[]` filter on `GET /v1/users` takes the role keys of your merchant: `owner` and any role the merchant made in the dashboard (Settings → Roles), such as `bookkeeper`. It is no longer a fixed list; a key your merchant does not have matches no user.

## 2026-11-05: pricing fees of their own

Spec: `e99c1278d233`

- A balance transaction's `category` can be one of eight new fee types: `auth_declined_fee` (declined authorization fee), `risk_declined_fee` (risk decline fee), `auth_voided_fee` (voided authorization fee), `chargeback_reversal_fee`, `boarding_fee`, `monthly_fee`, `monthly_minimum` and `pci_fee` (PCI non-validation fee). Each is charged only when your fee card has a rule for it, and is paid from your balance at the next payout like a chargeback fee.
- `source_type` can be `merchant` (the boarding fee and the monthly ones, `source_id` your merchant id) or `risk_check` (a risk decline fee, `source_id` the risk check).
- The finance report rows carry `account_fees_cents` (those fees), and `income_cents` includes them.

## 2026-11-05: the assistant streams and explains the docs

Spec: `59f65354953e`

- `POST /v1/ai/ask` answers from the API docs (guides, reference, webhook events) first: it searches them and cites the sections it used in `evidence` (`guide:refunds-and-disputes#partial-refunds`, `op:refundsCreate`). Reading your records through the other v1 operations is switched off for now.
- Send `Accept: text/event-stream` to stream the answer as server-sent events: `searching` (`{tool, query}`) before each search, `text` (`{delta}`) the explanation as it is written, `done` the whole answer (the same JSON as without streaming), `error` (`{key, message}`) if the model fails after the stream opened. Refusals (`ai_disabled`, `ai_rate_limited`, `ai_budget_exhausted`, validation) still answer before the stream with their status and JSON error.
- The request takes `history`, the earlier turns of the same conversation (up to 5 `{question, explanation}`, oldest first; more is `422` `invalid_history`), and `route` (used by the boards; an API client leaves it out). The answer carries `first_token_ms` (null when not streamed) and `links`, the docs URL of each guide, operation or event section `answer.evidence` cites.
- The answer carries `link_titles` next to `links`: by evidence id, the `page` title and the section `heading` of each cited docs section, as the docs index names them, so a client can label a source ("Refunds and disputes › Partial refunds") without fetching the page.

## 2026-11-04: inline product description

Spec: `262307412119`

- `price_data.product_data` on a checkout session line documents its optional `description`: it is stored on the hidden product and shown under the line name on the hosted page. The API already accepted it; nothing else changes.

## 2026-11-03: abandoned 3-D Secure step

Spec: `d5fbcd854bd0`

- A checkout session whose 3-D Secure step the buyer cancelled, or that timed out, is declined with the decline category `three_ds_abandoned` instead of `authentication_required`. Nothing is charged and the session attempt is used, as before. `authentication_required` now means only that the card's bank refused the 3-D Secure check.

## 2026-10-31: recurring prices replace plans

Spec: `01645793e2b4`

- Plans are gone: the five `/v1/plans` routes, and the `Plan` object are removed. A price carries its own terms: `type` (`one_off` or `recurring`), a `recurring` block (`interval`, `interval_count`, `trial_interval` (`day`, `week`, `month` or `year`) with `trial_interval_count`, and `trial_price_cents`; null on a one-off price), `nickname`, `metadata`, `replaces_price_id`, and a read-only `status` (`active` or `archived`).
- `POST /v1/prices` creates an additional price for a product; a change of amount or terms is a successor price (`replaces_price_id`, `effective_at`). `PATCH /v1/prices/{price}` edits only `nickname` and `metadata`; `POST /v1/prices/{price}/archive` and `/unarchive` retire and restore a price. A price returns its `effective_at` (null unless it moves the replaced price's subscribers); the single price read, the single product read's `prices` and the create response also return `replace_locked`, `replace_locked_until` and `notice_owed`: while a change that needs a notice is pending on the price's chain (over the terms in effect, or to any live subscriber judged against that subscriber's own price), a successor of it is `422` `price_increase_pending`, and `notice_owed` is true on that pending price.
- A product returns `prices` (its active prices) and an optional `sku` unique per store, and no longer has `type` or `active_price`; a product has no default price. `POST /v1/products/{product}/unarchive` (with the product's `version`, like archive) returns an archived product to the catalog; a product that is already active is returned as it is.
- A checkout session line is either `price_id` or `price_data` (an inline price on an existing product, a product named by `product_sku`, or a new `product_data`). `POST /v1/orders` still takes `price_id` lines only. An order line has no `plan_id`.
- A subscription returns `price_id`, the price's `recurring` block and `pending_price_id`; change-plan and the plan-change confirmation take `price_id`. The list filter is `price_public_id[]`.
- Webhooks: every `subscription.*` event carries `price_id` instead of `plan_id`; `subscription.plan_change_scheduled` carries `old_price_id` and `new_price_id`, and `subscription.plan_changed` drops `old_plan_id` and `new_plan_id` and keeps its price pair. Event names and the `cause` values are unchanged.
- `customer_ref` is optional: `POST /v1/customers` takes a request without one (the customer's `customer_ref` is then null), `POST /v1/orders` names its customer by `customer_ref` or the new `customer_id`, one of the two (`422` `customer_ref_required` on `customer_id` when neither; both, or an unknown `customer_id`, is `422` `validation`), and the saved card must be that customer's (`422` `payment_method_unusable`); the order, its charge and `order.paid` carry the customer's `customer_id`. A checkout session that saves the card is paid without one, its card owned by the customer of the buyer's email or the session's `customer_id`. A `setup` session still needs `customer_ref` or `customer_id` (`422` `customer_ref_required`).

## 2026-11-02: chargeback intake

Spec: `07665dc7e93f`

- Disputes are chargebacks only: `source` is always `chargeback`, and the `source[]` filter of `GET /v1/disputes` takes only `chargeback` (`rdr` and `ethoca` are `422`).
- A dispute carries `provider_case_id` (the processor's chargeback id), `merchant_evidence_due_at` (your evidence deadline, 3 business days after the dispute opened, beside the bank's `evidence_due_at`) and `over_disputed`. A payment can carry several disputes, one per chargeback. `dispute.opened` and `dispute.closed` carry the three fields too.

## 2026-10-31: merchant monitoring

Spec: `a8363b4a7450`

- Bemor Ledger: `POST /v1/sub-accounts/{subAccount}/payout-pause` pauses a sub-account's payouts (`source` `risk`, a `reason`, and the caller's `external_ref`; one pause per `external_ref`, a repeat answers `200` with the same pause) and `DELETE` on the same path lifts it (`204` when there is nothing to lift). While a pause is on, the sub-account's payout run line is held back with the outcome `risk_paused`, and the next payout's `reason` says `risk_paused`.
- Bemor Ledger: `POST /v1/holds/{hold}/release` also takes the `rhq_` id of a hold api's Risk asked for.

## 2026-10-31: refunds by order, and who decided them

Spec: `4e7967e709cb`

- `POST /v1/refunds` takes `order_id` as well as `charge_id`: send exactly one (neither or both is `422` `validation`). The order is resolved to its charge and refunded exactly as by `charge_id`; an unknown order, or one with no captured charge, is `404`.
- A refund returns `order_id`, the order its charge paid (null for a charge with no order), and `decided_by` and `decided_at`, who granted or rejected a refund held for approval and when (null until a decision).

## 2026-10-31: the risk engine

Spec: `0b39236f138f`

- Disputes carry `fraud`: whether the dispute's reason code is a fraud code of its card network (staff may override it); `dispute.opened` and `dispute.closed` carry it too.
- The hosted page: the page payload names the merchant's `three_ds_mode` (`always`, `dynamic`, `never`); a Pay sends its device `signals` (`device_id`, `device_fingerprint`, `origin`) with the browser ones; in dynamic mode a Pay may answer `status: three_ds_required` with `three_ds_amount_cents` and is re-sent with the challenge result, and a Pay the risk check could not run answers `503 risk_unavailable` to retry.
## 2026-10-31: tax is never guessed

Spec: `4f8d8e094836`

- When the tax provider does not answer and no correct rate is known for the buyer's ZIP, the hosted page's address step and `POST /v1/orders` answer `503 tax_unavailable` ("Tax could not be calculated, try again in a moment."); nothing is charged and the session stays open. A sale is no longer taxed at zero in that case. Retry later.
- Orders carry `tax_rate_source` (`provider`, `learned` for the provider's earlier answer for the ZIP, `seed_zip4` or `seed_zip` for the official-file rate table) and `tax_rate_source_version`; null on orders from before.
- Billing addresses take an optional `postal_code_suffix` (the four digits of a ZIP+4).
- The `order.paid` webhook's `tax_quote` may carry `rate_source` and `rate_source_version` (optional, additive).
- A subscription period's `attempts_log` entries carry `error`: the key of a refusal before any charge, `tax_unavailable` when the renewal waits for a tax quote (it is retried on the schedule, never declined for it).

## 2026-10-31: statements and the payout engine

Spec: `142fc15c3ce9`

- A payment's review reason gains `three_ds_check` (NMI's record of the 3-D Secure authorisation could not be read or did not prove it).

- Orders, refunds and disputes carry `statement_id` (the statement that pays them) and `paid_out_at` (when that statement's payout was sent; null until then, and again after the bank returns the payout).
- `GET /v1/balance` fills `next_payout`: `on`, `estimate_cents`, `minimum_cents` and `reason` when the payout would be held back.
- Balance transactions gain the categories `payout_fee` and `payout_return_fee`; the rows of a statement carry its `statement_id`, and its payout's id once `payout.sent` arrives.
- `payout.sent` and `payout.failed` gain `attempt`, `statement_state`, `returned`, `rejected_by_bank`, `bank_reason` and `sent_at`.

## 2026-10-30: the fee card on order.paid

Spec: `a3c1a9617141`

- The `order.paid` webhook may carry `fee_card_id` (the fee card your pricing resolved at capture) and `fee_rule` (the rule the fee came from); both optional and additive, null when nothing was priced.

## 2026-10-30: your finance report

Spec: `d645836c4c49`

- `GET /v1/reports/finance` (scope `v1.reports.read`): your volume, refunds, chargebacks and their fees, the fees charged to you and your reserve held and released, per period (`group=day|week|month`, business days of Regoria's time zone) or by store or card brand (`by=period|store|card_brand`), with the totals; `from`/`to` are business days (default: this month to date). Every money figure integer cents.
- `GET /v1/reports/finance/export`: the same rows as CSV, the chosen `columns[]`.

## 2026-10-29: your balance as of a past day

Spec: `598f99e69205`

- `GET /v1/balance` takes `as_of`: a date (the end of that day in Bemor's business time zone, final once the day has closed) or an RFC 3339 timestamp. The answer is then the account figures at that point (`payable_cents`, `reserve_cents`, `in_transit_cents`, `receivable_cents`) with `as_of` and `provisional`; `422 as_of_in_future` for today or later, `422 as_of_invalid` otherwise.

## 2026-10-28: the assistant over your API

Spec: `df04f093e30e`

- `POST /v1/ai/ask` (scope `v1.ai.use`): one question answered by the assistant, which reads through the v1 operations your key's other scopes allow and answers JSON-shaped prose with its sources. Refused with `ai_disabled` when your tenant switched the assistant off, `ai_rate_limited` (`Retry-After`) past the per-key rate, `ai_budget_exhausted` once the tenant's monthly token budget is used up; `502` `ai_unavailable` when the model could not answer.
- The same operations are the tools of the MCP server at `/mcp/v1` on the API host, with your API key as the bearer.
- A merchant carries `ai_enabled` (the owner's toggle on the dashboard); a tenant carries `ai_budget_tokens`.
## 2026-10-29: time zones named

Spec: `0c859531af86`

- `GET /v1/reports/balance-summary` answers `zone`, the IANA zone its days were read in (the `X-Timezone` header, else your merchant time zone).

## 2026-10-27: pending_plan_id and the charge_id[] refunds filter, named as webhooks name them

Spec: `0c7da65d37ac`

- A subscription returns `pending_plan_id`, the plan a confirmed change moves it to at its next renewal, as the webhooks deliver it. `pending_plan_public_id` is marked deprecated: it is still returned, with the same value.
- `GET /v1/refunds` filters by `charge_id[]`. `charge_public_id[]` is marked deprecated: it is still read; a request that sends it still succeeds.

## 2026-10-27: a declined card-saved retry names no amount

Spec: `9635828089c5`

- The card-saved screen's `retry.amount_cents` is the amount collected, tax included, on `paid`, and `null` on `declined` and `confirming`: the period's amount before tax would understate the charge the bank declined.

## 2026-10-27: the customers list counts a reference-less customer's orders

Spec: `d776a426a706`

- `GET /v1/customers` lists a customer created from a buyer's email with `customer_ref` `null` (it was `""`), and counts its orders, refunds and first and last order by its `customer_id`. An order is counted under the customer it names, even when it carries another `customer_ref`.

## 2026-10-27: link expiry times carry milliseconds

Spec: `cb9ebd43d78d`

- `expires_at` on `POST /v1/portal-sessions` is now an ISO-8601 UTC time with milliseconds (`2026-10-21T14:05:00.000Z`), like every other timestamp and the update-card link.

## 2026-10-27: a card saved on a past-due subscription charges it at once

Spec: `7e5cd512febd`

- A buyer who saves a new card on a `past_due` subscription you let Bemor bill is charged for the declined period on that card at once, and sees the result on the card-saved screen. A paid retry sends `subscription.renewed` and `subscription.updated` as a scheduled recovery does.

## 2026-10-27: a checkout session needs no customer_ref; one customer per email

Spec: `1e04b109c942`

- `POST /v1/checkout-sessions` with only `lines` and `success_url` returns a payable URL. Without `customer_ref`, the paid order's customer is the one of yours holding the buyer's email, created then with no `customer_ref` if none does; its `customer_id` is on the session and the order.
- The session takes an optional `customer_id` in place of `customer_ref`; sending both, or an id that is not one of your customers, answers `422` `validation` on `customer_id`. A `setup` session still needs one of the two (`422` `customer_ref_required`).
- One email belongs to one customer: `POST /v1/customers` and `PATCH /v1/customers/{customer}` with an email another of your customers holds answer `409` `customer_already_exists` with that customer's `customer_id`. A session whose `customer_ref` arrives with such an email belongs to that customer.
- A customer's `customer_ref` is `null` when it was created from a buyer's email.

## 2026-10-27: webhook ids named as the API names them; buyer_id deprecated

Spec: `b7c0ad5e4a9d`

- Every webhook's `data` names its ids the way `/v1` does: a key ending `_public_id` is now delivered ending `_id` (`order_id`, `customer_id`, `subscription_id`, `session_id`, `charge_id`, `price_id` …) and a list ending `_public_ids` ends `_ids` (`acceptance_ids`), at any depth. `merchant_id`, `store_id` and your `metadata` are unchanged. Replays and pings carry the new names. The [event catalogue](http://docs.staging.regoria.com/events) documents them for every event.
- `buyer_id` is marked deprecated on `POST /v1/checkout-sessions`, `POST /v1/orders` and the charge response. It is still read and returned; a request that sends it still succeeds.

## 2026-10-27: subscription.resumed, subscription.trial_ending and subscription.updated webhooks

Spec: `8da6d77e97c7`

- `subscription.resumed` is sent when a paused subscription is resumed and charged, beside `subscription.renewed`. A declined resume sends neither.
- `subscription.trial_ending` is sent once per trial, at your trial-ending lead days before the trial ends, together with the buyer's reminder email.
- `subscription.updated` carries the whole subscription after each change: past due, paused, resumed, canceled, a cancel scheduled for the period end, a plan or price change applied or scheduled, a card change, and a renewal that ends a past due. It comes beside the specific event, never instead of it.
- `POST /v1/webhook-endpoints` and `PATCH /v1/webhook-endpoints/{endpoint}` accept the three in `events`.

## 2026-10-27: direct-entry portal links

Spec: `796cde860832`

- `POST /v1/portal-sessions` now returns a link that signs the buyer in with no email and no code, once, for 10 minutes; a second or late open shows the expired-link page. It takes `customer_id` as an alternative to `customer_ref` (one of the two), and an optional `flow` (`update_card` or `cancel`) with `subscription_id` to open the portal on that subscription. An `email` another customer of yours holds answers `409` `customer_already_exists` with that customer's `customer_id`.
- Portal links in Bemor's emails name a customer with no `customer_ref` by its `cus_` id (`cid`).

## 2026-10-27: update-card links for one subscription

Spec: `66290f5210fb`

- `POST /v1/subscriptions/{subscription}/update-card-links` returns `{url, expires_at}`: a link that opens the subscription's card form with no sign-in, once, for 10 minutes. Open it for the buyer when they click Update card on your site; each call mints a new link and takes no `Idempotency-Key`. A canceled subscription answers `422` `validation` on `subscription`.
- Subscription reads, lists and webhooks carry no link.

## 2026-10-27: session, order and subscription linked; checkout.completed webhook

Spec: `34d864fc2bd7`

- A paid plan checkout session returns `subscription_id`, the subscription it starts, reserved when the buyer pays; it is `null` on a one-off session and before payment.
- `checkout.completed` is a webhook you can subscribe to: it names the session, the order, the subscription (`null` without a plan) and the customer, and is sent before `subscription.started`.
- The hosted page's return link carries `session_id` beside `status`.

## 2026-10-27: one customer id in every response

Spec: `c81f1fa4d036`

- A checkout session, an order, a subscription and a payment method each return `customer_id`, the customer's `cus_` id, beside `customer_ref`; it is `null` when the object has no customer.
- `GET /v1/orders`, `GET /v1/customers`, `GET /v1/subscriptions` and `GET /v1/charges` filter by `customer_id` as well as by `customer_ref`.
- `GET /v1/payment-methods` takes `customer_id` or `customer_ref`; it answers `422` `missing_customer_ref` only when both are absent.
- The `order.paid` and `subscription.*` webhooks carry `customer_public_id` beside `customer_ref`.
- `buyer_id` is no longer documented on the session, order, subscription and payment method; responses still carry it, so nothing that reads it breaks.

## 2026-10-25: one retry schedule per merchant

Spec: `84dd67560e04`

- A plan has no retry schedule: `POST /v1/plans` and `PATCH /v1/plans/{plan}` answer `422` `field_not_writable` (the field named) when the body carries `retry_schedule` or `retry_waits_hours`, and nothing is written. Every plan follows the merchant's one schedule of waits in hours, set in the dashboard settings.
- A plan and a subscription's `plan` block no longer carry `retry_schedule`.

## 2026-10-25: card issuer country on payment methods

Spec: `a63e1d189e95`

- A payment method carries `issuer_country`: the two-letter country of the bank that issued the card, from its BIN, or `null` when the BIN is unknown. Cards saved before this change take it from their latest charge.

## 2026-10-23: payment flow follow-ups

Spec: `c83ea9bd1dd4`

- `POST /v1/orders` is documented as not available yet: merchant-initiated orders are out of launch scope, so every call answers `422` `stored_credential_consent_missing` and charges nothing.
- `POST /v1/subscriptions/{subscription}/charge` can answer `503` with `tax_unavailable` (the tax provider gave no quote and no rate is stored for the address) or `payments_unavailable` (an earlier charge of the period could not be confirmed with the processor). Nothing is sent to the processor; retry later.
- Charges, refunds and payment methods no longer carry `provider`. A card payment method's `type` is now `credit_card` (it was `card`).
- An order's `source` can be `console` (an order staff create from the test console), on the order, in the `order.paid` event and in the `source[]` filter of `GET /v1/orders`.
- `GET /v1/orders/{order}/receipt` returns `portal_url`, the customer's signed portal link that the receipt email carries (`''` when the order has no customer or the customer has no email).
- A webhook delivery's `status` can be `sending` while it is being delivered.

## 2026-10-22: webhook retry policy and bulk replay

Spec: `3ffd38a05958`

- Webhook deliveries retry with a doubling backoff from 10 seconds, capped at 1 hour, for 72 hours; after that they are `dead` and replayable. The fixed ladder and the automatic disable after ten dead deliveries are gone: an endpoint is never disabled automatically any more.
- A failing episode is reported once after an hour of failed deliveries and again when the endpoint recovers. `WebhookEndpoint` carries `failing_since`, `last_http_status` and `last_excerpt`.
- New: `POST /v1/webhook-endpoints/{endpoint}/deliveries/replay` re-queues every dead or failed delivery created between `from` and `to` (optional `event_types`), up to 10,000 per call.

## 2026-10-21: public documentation, SDK header, rate-limit headers

Spec: `b5222052c2ea`

- The documentation site, `openapi.json`, `llms.txt`, the event catalogue and the MCP server are published for every tenant on its `docs.` host.
- Every `/v1` operation declares its scope (`x-bemor-scope`) and whether it takes `Idempotency-Key` (`x-bemor-idempotent`), and carries request and response examples.
- `POST /v1/api-keys` is documented as answering `201` with the key record and the key (it always did); `GET /v1/merchants/me`, `DELETE /v1/api-keys/{key}` and the catalogue show routes declare their real response shapes.
- New: `GET /v1/openapi.json` (any valid key) returns the published document with your servers filled in.
- New response headers on `/v1`: `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Policy` and, on 429, `RateLimit-Reset`. The limit is 600 requests per minute per key.
- New request header: `X-Bemor-SDK` (`typescript/1.2.0`), sent by the SDKs and recorded for support.
- `Deprecation` and `Sunset` headers are defined for future deprecations; nothing is deprecated.
