Response
What each field does
You can also send
billingDetails when you create the customer; the customer is created even if Stripe refuses them.
Read them back
taxLocation is Stripe Tax’s view of the customer: supported (Stripe Tax can tax them), not_collecting (located where you aren’t registered), unrecognized_location (the address isn’t enough) or failed. billingDetails is null for a customer with no Stripe customer.
Related
- Tax: when Ledger adds tax, and what a location changes.
- Creating customers: create the customer first.
- Set billing details and Get billing details: the API reference.
Rules
- Only the fields you send change.
nullclears a field. addressandinvoiceCustomFieldsreplace the whole value. Send every part of the address you want kept.- Tax IDs are added and removed one by one.
taxIds.addandtaxIds.removetouch only the IDs they list, and adding an ID the customer already has leaves it as it is. To correct an ID, remove it and add the new value in the same call. - Saves are all or nothing. Ledger adds new tax IDs first, then the other fields, then removes tax IDs. If Stripe refuses a tax ID (
422 invalid_tax_id) or can’t locate the address for tax (422 invalid_address), nothing is saved, and any tax ID the same call added is deleted again. Stripe checks the address at once when automatic tax is on in that environment. - Saving creates the Stripe customer when there is none: the same Stripe customer Ledger creates at the first attach, with Ledger’s metadata.
- Checkout collects its own. With automatic tax on, Checkout asks for a billing address and tax ID and saves them over what you set.