Skip to content

Save Tax Details

POST
/api/billing/tax-details
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.

organization_id
required
Organization Id
string format: uuid
Media type application/json
TaxDetailsRequest

POST /api/billing/tax-details — billing address + optional EU VAT ID.

object
address
required
BillingAddress

Billing address as produced by Stripe’s AddressElement.

object
city
Any of:
string
<= 100 characters
country
required
Country
string
>= 2 characters <= 2 characters /^[A-Za-z]{2}$/
line1
required
Line1
string
>= 1 characters <= 200 characters
line2
Any of:
string
<= 200 characters
postal_code
Any of:
string
<= 32 characters
state
Any of:
string
<= 100 characters
name
Any of:
string
<= 255 characters
vat_id
Any of:
string
>= 2 characters <= 32 characters /^[A-Za-z0-9 .\-]+$/
Example generated
{
"address": {
"city": "example",
"country": "example",
"line1": "example",
"line2": "example",
"postal_code": "example",
"state": "example"
},
"name": "example",
"vat_id": "example"
}

Successful Response

Media type application/json
TaxDetailsResponse
object
ok
Ok
boolean
default: true
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"
}
]
}