Save Tax Details
POST
/api/billing/tax-details
const url = 'https://example.com/api/billing/tax-details?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"address":{"city":"example","country":"example","line1":"example","line2":"example","postal_code":"example","state":"example"},"name":"example","vat_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://example.com/api/billing/tax-details?organization_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "address": { "city": "example", "country": "example", "line1": "example", "line2": "example", "postal_code": "example", "state": "example" }, "name": "example", "vat_id": "example" }'Store the billing address (+ optional EU VAT ID) Stripe Tax needs.
Called by the console BEFORE checkout when GET /billing/config reports
stripe_tax_enabled. 404 when the flag is off so nothing can depend on it
before the Stripe dashboard is configured. The address goes onto the Stripe
customer; a VAT ID becomes customer.tax_ids (eu_vat, or gb_vat/ch_vat/no_vat by prefix), which is what
turns on EU reverse charge for a valid B2B ID. A VAT ID Stripe refuses is
a 422 with a user-facing message; nothing is half-saved by that — the
address update has already succeeded and is harmless to keep.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “ Query Parameters ” organization_id
required
Organization Id
string format: uuid
Request Bodyrequired
Section titled “ Request Bodyrequired ” Media type application/json
TaxDetailsRequest
POST /api/billing/tax-details — billing address + optional EU VAT ID.
object
address
required
Example generated
{ "address": { "city": "example", "country": "example", "line1": "example", "line2": "example", "postal_code": "example", "state": "example" }, "name": "example", "vat_id": "example"}Responses
Section titled “ Responses ”Successful Response
Media type application/json
TaxDetailsResponse
object
ok
Ok
boolean
vat_id_saved
Vat Id Saved
boolean
Example
{ "ok": true, "vat_id_saved": false}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}