Charge and provision an activation
POST
/api/v1/users/{id}/activation
Prices, charges and provisions in one operation. Funds are reserved first, then the plan is applied, and both halves are keyed off your request_id, so a retry after a crash re-runs neither the charge nor the grant.
The nested activation object is serialised with Go field names (UserID, NewSubscriptionEnd) and RFC3339 timestamps, unlike every other object on this API. Everything around it uses snake_case and yyyy-MM-dd HH:mm:ss. Do not write a parser that assumes one convention.
At a glance
- Authentication
- Staff token or session
- Requires any one of
-
prm_users_activateprm_users_extend - Rate limit
t_mutate- Idempotency key
request_id
Parameters
| Parameter | Description |
|---|---|
idrequired
path · integer
|
Subscriber id. |
request_idrequired
body · string
|
Idempotency key, up to 255 characters, no colon or pipe. Reuse the same one on every retry of one intent. |
money_collected
body · boolean
|
Defaults to true. |
card_code
body · string
|
Required when method is card. The voucher must be in the caller's subtree. |
issue_invoice
body · boolean
|
Also record an invoice document. Skipped on a replay so a retry never double-issues. |
Errors
| Code | When it is returned |
|---|---|
ERR_VALIDATION400
|
request_id missing, too long, or in a reserved namespace |
ERR_CONFLICT409
|
the request_id is already bound to an activation of a different subscriber |
ERR_FORBIDDEN403
|
the body's operation needs a permission the caller does not hold |