Billing modes
The two ways an organization pays for its providers, how to tell which one you are on, and which endpoints belong to each.
Your organization is on exactly one of two billing modes. Twofold sets it when you are onboarded, and it decides two things: how a provider gets access to Twofold, and how your organization pays for it. Most of this API is the same in both modes; the endpoints that give and take access are not, and this page tells them apart.
The two modes
| Seat subscription | Usage billing | |
|---|---|---|
billingMode | partner_level_seat_subscriptions | provider_seat_usage |
| How you pay | A subscription with a seat total, billed in advance | One invoice a month for the seats that were in use, billed in arrears |
| Seat cap | The total you bought — seatsAllowed | None |
| Giving a provider access | PUT /v2/partner/users/{externalUserId}/access-level with FULL_ACCESS | POST /v2/partner/users/{externalUserId}/seat/start with a plan and a group |
| Taking it away | The same endpoint with READ_ONLY | POST /v2/partner/users/{externalUserId}/seat/end |
| Buying seats | POST /v2/partner/seats/set-seats, or the Seats page of the console | Not a step — a seat exists from the moment you start it |
| The guide | Access & seats | Seat usage billing |
Which one you are on
curl https://partner-api.trytwofold.com/v2/partner/seats \
-H "Authorization: Bearer twofold_key_prod_xxxxxxxxxxxx" \
-H "Twofold-Client-Id: prtn_ab12Cd34Ef56"curl https://partner-api.staging.trytwofold.com/v2/partner/seats \
-H "Authorization: Bearer twofold_key_staging_xxxxxxxxxxxx" \
-H "Twofold-Client-Id: prtn_ab12Cd34Ef56"{ "billingMode": "provider_seat_usage", "seatsAllowed": null, "seatsUsed": 79, "seatsByPlan": { "monthly": 24, "annual": 55 } }{ "billingMode": "provider_seat_usage", "seatsAllowed": null, "seatsUsed": 79, "seatsByPlan": { "monthly": 24, "annual": 55 } }billingMode is the answer. The rest of the response follows it: on a seat subscription seatsAllowed is your total and seatsUsed counts providers at FULL_ACCESS; on usage billing seatsAllowed is null, seatsUsed counts open seats, and seatsByPlan splits them.
The mode never changes on its own. Twofold switches it with you, and only while no provider has access — so a switch is something you arrange, never something you discover from an error.
Which endpoints belong to which
The reference groups them the same way.
- Seat subscriptions only —
PUT …/access-levelandPOST /v2/partner/seats/set-seats. - Usage billing only —
POST …/seat/startandPOST …/seat/end. - Both modes — everything else.
GET /v2/partner/users,POST …/revokeandGET /v2/partner/seatsmean the same thing whichever way you are billed: a linked provider, an ended link, and where your seats stand. Templates, webhooks and every user-token endpoint have nothing to do with billing at all.
Calling an endpoint of the other mode is refused with 400 / not_available_in_billing_mode, and the message names the endpoint to use instead. Nothing is changed or charged by the refused call. Revoking a link works in both modes and ends any open seat with it.
The two fields on the linked-user row that describe a seat — groupExternalId and seat — are always present and are null on a seat subscription, so a client written for one mode reads the other's rows without surprises.