Documentation · API reference
POST
/api/v1/billing/buyerSay who the account buys as
This page as Markdown, or in an AI chatMore ways to read this page
Say who the account buys as: a business or an organisation, or a consumer of 18 or older.
# Say who the account buys as
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-billing-buyer
`POST /api/v1/billing/buyer`
Say who the account buys as: a business or an organisation, or a consumer of 18 or older.
## What to send
`BuyerChoice`: Who an account buys as. A consumer says they are 18 or older, and, where it decides who sells to them, whether they live in the EU.
- `adult` (boolean)
- `buyer` (string, needed): `business` or `consumer`.
- `lives` (string): `eu` or `outside`, where `asks_where` says it is asked.
## The answer
200, `BillingView`
- `address` (string, needed)
- `adult_said` (boolean): The owner said they are 18 or older when the workspace was made (doc/sign-in-services.md, B.1): the Plan screen does not ask again.
- `asks_where` (boolean): A consumer is asked whether they live in the EU: it decides who sells to them (doc/managed-payments.md §4.1).
- `billing_email` (string, needed)
- `buyer` (string): Who the account buys as: empty until asked, `business` or `consumer` (doc/consumers.md §1).
- `buyer_open` (boolean): Who buys can still be changed: no subscription is running.
- `buyer_where` (string): `eu`, `outside`, or empty where not asked.
- `by_site` (list of SiteUse, needed)
- `cancelled` (integer or null)
- `consumers` (boolean): Consumers are offered the plans here, so who buys is asked.
- `dpa` (integer or null): When the data processing agreement was accepted, and by whom.
- `dpa_by` (string, needed)
- `events` (integer, needed): Views and events received this month, across every site. Bots, spam and rejected hits are not in it, and neither is anything imported.
- `grace_days` (integer, needed)
- `history` (HistoryNotice or null)
- `instance` (boolean): This is the account of whoever runs this tidekeeper: its plan is its own, limits nothing, costs nothing and is offered to nobody.
- `invoices` (list of InvoiceView): The provider's invoices, newest first.
- `limit` (integer, needed)
- `members` (integer, needed)
- `month` (string, needed): `2026-10`, and the stretch of it so far in words.
- `month_label` (string, needed)
- `now` (integer, needed)
- `own_limits` (OwnLimits or null)
- `passes_on` (string or null): The day the limit is passed if the month goes on as it has.
- `pays` (boolean): A provider that takes payment is connected: a plan with a price is paid for on its pages, not chosen here.
- `plan` (PlanView, needed)
- `plans` (list of PlanView, needed)
- `provider` (boolean, needed): Whether a payment provider is connected. Without one there are no invoices and no card, and a plan is changed by choosing it.
- `read_only_days` (integer, needed)
- `region` (string, needed)
- `renews` (integer or null)
- `resets` (string, needed): The first day of the next month.
- `sites` (integer, needed)
- `sold_by_provider` (boolean): The next checkout is sold by the payment provider as merchant of record (Stripe's Managed Payments), not by whoever runs this.
- `standing` (object, needed)
- `subscription` (SubscriptionView or null)
- `test_mode` (boolean): The provider takes no real payment: its keys are test keys.
- `trial_days` (integer, needed): The days of trial a card starts, for an account that has not given one.
- `unset` (boolean, needed)
- `vat` (string, needed)
- `withdraw_until` (integer or null): A consumer may withdraw from the agreement until then (§3).
- `withdrawn` (integer or null): When a consumer withdrew, and in whose name.
- `withdrawn_by` (string)
## Asking
```sh
curl -X POST https://tidekeeper.eu/api/v1/billing/buyer \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"buyer": "…"}'
```
What to send
BuyerChoice Who an account buys as. A consumer says they are 18 or older, and, where it decides who sells to them, whether they live in the EU.
- adult
- boolean
- buyer
- stringneeded`business` or `consumer`.
- lives
- string`eu` or `outside`, where `asks_where` says it is asked.
The answer
Status 200
BillingView
- address
- stringneeded
- adult_said
- booleanThe owner said they are 18 or older when the workspace was made (doc/sign-in-services.md, B.1): the Plan screen does not ask again.
- asks_where
- booleanA consumer is asked whether they live in the EU: it decides who sells to them (doc/managed-payments.md §4.1).
- billing_email
- stringneeded
- buyer
- stringWho the account buys as: empty until asked, `business` or `consumer` (doc/consumers.md §1).
- buyer_open
- booleanWho buys can still be changed: no subscription is running.
- buyer_where
- string`eu`, `outside`, or empty where not asked.
- by_site
- list of SiteUseneeded
- cancelled
- integer or null
- consumers
- booleanConsumers are offered the plans here, so who buys is asked.
- dpa
- integer or nullWhen the data processing agreement was accepted, and by whom.
- dpa_by
- stringneeded
- events
- integerneededViews and events received this month, across every site. Bots, spam and rejected hits are not in it, and neither is anything imported.
- grace_days
- integerneeded
- history
- HistoryNotice or null
- instance
- booleanThis is the account of whoever runs this tidekeeper: its plan is its own, limits nothing, costs nothing and is offered to nobody.
- invoices
- list of InvoiceViewThe provider's invoices, newest first.
- limit
- integerneeded
- members
- integerneeded
- month
- stringneeded`2026-10`, and the stretch of it so far in words.
- month_label
- stringneeded
- now
- integerneeded
- own_limits
- OwnLimits or null
- passes_on
- string or nullThe day the limit is passed if the month goes on as it has.
- pays
- booleanA provider that takes payment is connected: a plan with a price is paid for on its pages, not chosen here.
- plan
- PlanViewneeded
- plans
- list of PlanViewneeded
- provider
- booleanneededWhether a payment provider is connected. Without one there are no invoices and no card, and a plan is changed by choosing it.
- read_only_days
- integerneeded
- region
- stringneeded
- renews
- integer or null
- resets
- stringneededThe first day of the next month.
- sites
- integerneeded
- sold_by_provider
- booleanThe next checkout is sold by the payment provider as merchant of record (Stripe's Managed Payments), not by whoever runs this.
- standing
- objectneeded
- subscription
- SubscriptionView or null
- test_mode
- booleanThe provider takes no real payment: its keys are test keys.
- trial_days
- integerneededThe days of trial a card starts, for an account that has not given one.
- unset
- booleanneeded
- vat
- stringneeded
- withdraw_until
- integer or nullA consumer may withdraw from the agreement until then (§3).
- withdrawn
- integer or nullWhen a consumer withdrew, and in whose name.
- withdrawn_by
- string
Asking
curl -X POST https://tidekeeper.eu/api/v1/billing/buyer \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"buyer": "…"}'
const answer = await fetch("https://tidekeeper.eu/api/v1/billing/buyer", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({"buyer": "…"}), }).then((r) => r.json());