Skip to main content
Save a customer’s address, tax IDs, tax exemption and invoice fields with one call, and Stripe Tax and every invoice Stripe makes for them use them. Ledger writes them to the customer’s Stripe customer and reads them back. Save them when a customer fills in your billing form, before they first pay on a saved card.
The response is the details as Stripe now holds them:
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

The response has the same fields as above. 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.

Rules

  • Only the fields you send change. null clears a field.
  • address and invoiceCustomFields replace the whole value. Send every part of the address you want kept.
  • Tax IDs are added and removed one by one. taxIds.add and taxIds.remove touch 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.