curl "https://api.integrateledger.com/v1/customers/billing-details?customerId=acme" \
-H "Authorization: Bearer $LEDGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"address": {"line1": "1 Main St", "city": "Berlin", "postalCode": "10115", "country": "DE"}, "taxIds": {"add": [{"type": "eu_vat", "value": "DE123456789"}]}, "taxExempt": "reverse"}'
{
"customerId": "acme",
"billingDetails": {
"stripeCustomerId": "cus_TbXyZ",
"name": "Acme GmbH",
"email": null,
"address": { "line1": "1 Main St", "line2": null, "city": "Berlin", "state": null, "postalCode": "10115", "country": "DE" },
"taxIds": [{ "type": "eu_vat", "value": "DE123456789", "verification": { "status": "pending", "verifiedName": null } }],
"taxExempt": "reverse",
"taxLocation": "not_collecting",
"invoiceCustomFields": [],
"invoiceFooter": null
}
}
{
"error": "invalid_tax_id"
}
Customers
Set billing details
Save a customer’s address, tax IDs, tax exemption and invoice fields on their Stripe customer.
POST
/
v1
/
customers
/
billing-details
curl "https://api.integrateledger.com/v1/customers/billing-details?customerId=acme" \
-H "Authorization: Bearer $LEDGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"address": {"line1": "1 Main St", "city": "Berlin", "postalCode": "10115", "country": "DE"}, "taxIds": {"add": [{"type": "eu_vat", "value": "DE123456789"}]}, "taxExempt": "reverse"}'
{
"customerId": "acme",
"billingDetails": {
"stripeCustomerId": "cus_TbXyZ",
"name": "Acme GmbH",
"email": null,
"address": { "line1": "1 Main St", "line2": null, "city": "Berlin", "state": null, "postalCode": "10115", "country": "DE" },
"taxIds": [{ "type": "eu_vat", "value": "DE123456789", "verification": { "status": "pending", "verifiedName": null } }],
"taxExempt": "reverse",
"taxLocation": "not_collecting",
"invoiceCustomFields": [],
"invoiceFooter": null
}
}
{
"error": "invalid_tax_id"
}
Writes the fields you send to the customer’s Stripe customer, creating it first when there is none, and returns the details as Stripe now holds them. Billing details explains each field and the rules.
addressandinvoiceCustomFieldsreplace the whole value;nullclears any field; omitted fields stay.taxIds.addandtaxIds.removetouch only the IDs they list.- A refused tax ID (
422 invalid_tax_id) or address (422 invalid_address) changes nothing.
curl "https://api.integrateledger.com/v1/customers/billing-details?customerId=acme" \
-H "Authorization: Bearer $LEDGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"address": {"line1": "1 Main St", "city": "Berlin", "postalCode": "10115", "country": "DE"}, "taxIds": {"add": [{"type": "eu_vat", "value": "DE123456789"}]}, "taxExempt": "reverse"}'
{
"customerId": "acme",
"billingDetails": {
"stripeCustomerId": "cus_TbXyZ",
"name": "Acme GmbH",
"email": null,
"address": { "line1": "1 Main St", "line2": null, "city": "Berlin", "state": null, "postalCode": "10115", "country": "DE" },
"taxIds": [{ "type": "eu_vat", "value": "DE123456789", "verification": { "status": "pending", "verifiedName": null } }],
"taxExempt": "reverse",
"taxLocation": "not_collecting",
"invoiceCustomFields": [],
"invoiceFooter": null
}
}
{
"error": "invalid_tax_id"
}
Authorizations
Query Parameters
Body
application/json
Billing details saved on the customer's Stripe customer, which is created for them. The same fields as POST /v1/customers/billing-details.