Provision a new merchant (tenant)
Creates the account/tenant root. Operator-only — this is the bootstrap step that cannot use
X-Operate-As because the merchant does not yet exist. Audit-logged with operator identity.
Also provisions the merchant’s entry-level (self_serve) Stripe subscription with a 30-day,
no-payment-method trial — a merchant account never exists without one — so this call fails
as a whole if billing provisioning fails.
/operator/merchantsAuthorizationBearer token (JWT) · headerrequiredJWT issued by the external IdP via the OAuth 2.0 authorization-code flow (Kinde in
production; a simulator in test). The client obtains it and sends it as a Bearer token on
every authenticated call. Sarvex's services verify it — issuer, audience, signature
(IdP JWKS), expiry — and read identity and tenant from its claims. Sarvex does not issue
or revoke these tokens. merchant_id/store_id are read from the verified claims (and the
merchant→store mapping), never from the URL. The operator scope is required for
/operator/*. Operators acting on a specific merchant pass the X-Operate-As header,
which is recorded in the audit log.
operatorIdempotency-KeystringClient-generated key; replays return the original result.
application/jsonnamestringrequiredowner_emailstring<email>requiredUsed to invite the account owner and to pre-fill the entry-level trial's Stripe customer.
business_factsobjectOptional initial business facts: legal entity, support contact, etc.
Merchant created.
merchant_idstringnamestringtimezonestringcountry_codestringISO 3166-1 alpha-2 country code
business_factsbusiness_factsFacts Google requires downstream; collected at onboarding.
Show propertiesHide properties
legal_entity_namestringsupport_emailstring<email>support_phonestringfulfillment_regionsstring[]created_atstring<date-time>locale_optionslocale_optionsReference data for the console's timezone/country selection — countries and their selectable IANA timezones. The client relies entirely on this list rather than validating country/timezone pairs itself.
Show propertiesHide properties
countriescountry_locale[]Show propertiesHide properties
country_localecodestringISO 3166-1 alpha-2 country code
namestringtime_zonesstring[]Authenticated but not permitted (e.g. non-operator on an operator route).
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequireddetailsobject | null