Block a customer from new purchases
A blocked customer cannot get a new subscription or plan change (error key `plans.customer.blocked`), buy through a payment link or the portal, or have a payment link made for them (`billing.customer.blocked`); what exists runs on until you end it, and an invoice that was issued before stays payable, except after a `fraud` or `chargeback` block. A price change you schedule skips them (`customer_blocked`). Blocking again keeps the block that is in force. The note is yours, up to 500 characters; `category` says why; `blocked_until` ends the block by itself (it must be in the future, and every check reads it, so the block stops holding at that time). Every block and lift is kept in the customer's history and sent as the `customer.blocked` / `customer.unblocked` webhook events (the end of a block by itself sends none). Usage ingestion is not affected, and entitlements are unless you set `suspend_service`: then every entitlement check of this customer answers `allowed: false` and `suspended: true` (the limits and the counted usage are untouched, and the events you send are still accepted and counted) until you lift the block or it ends by itself. The service is suspended only when the block is new: a block already in force is kept as it is, so lift it first to change it.
Loading the operation...
Say which partner brought a customer POST
For your own sign-up, which reads the ?ref= of the link. First touch wins: a customer who has an attribution keeps it. A refusal is a normal answer (attributed false and a reason), not an error: already_attributed, unknown_code, program_inactive, affiliate_inactive, expired, same_email, same_domain, same_payment_method.
Connect a customer and get the link to their customer page PUT
The one call a sign-in needs. `external_id` is your own id of the customer: a person's user id, or for an organisation your organisation id with the signed-in user as `member`. The customer is created when it does not exist, and its name, e-mail and language are updated when they changed (unchanged values write nothing). A `member` is added or updated; the first member of an organisation becomes its billing owner and every member uses the service. The link to the customer page is made for the billing owner only (for anybody else `url` is null and `billing_owner` false); it works for `expires_in_days` (default 1). With `plan_code` and no running subscription, the page opens with that plan chosen. A new organisation without `email` takes its first member's e-mail as its billing contact.