Say which partner brought a customer
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.
Loading the operation...
Set the low-balance threshold PUT
A consume or a hold that takes a customer's available credits from at least `low_threshold` to fewer announces `credits.low` once (the webhook event). 0, the default, turns it off.
Block a customer from new purchases POST
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.