Customers
Customers hold the current identity and contact details of the people and businesses you invoice. Issued invoices keep their own immutable customer snapshot, so later customer updates do not rewrite invoice history.
An address is optional while creating or maintaining a customer. If supplied, it must be complete. Global accounts may issue invoices to customers without an address; Spanish accounts require the customer's address when issuing an ordinary invoice.
The Customer object
id
string
object
string
customer.live
boolean
name
string
tax_id
object
Show child propertiesHide child properties
id
string
object
string
tax_id.live
boolean
country
string
type
enum
es_nif
A Spanish NIF, including DNI and NIE identifiers for individuals and NIF identifiers for legal entities.
eu_vat
A VAT identifier issued by an EU member state and checked for intra-EU registration.
local
A domestic fiscal identifier that FiscalRail validates locally without querying a registry.
value
string
owner
object
Show child propertiesHide child properties
type
enum
account
The FiscalRail account whose legal entity uses this Tax ID.
customer
The customer associated with this Tax ID.
id
string
type.verification
object or null
Show child propertiesHide child properties
status
enum
pending
The registry check is queued, running or waiting to be retried.
completed
The registry returned a result; inspect valid for the outcome.
failed
FiscalRail could not complete the registry query; this is not evidence that the Tax ID is invalid.
valid
boolean or null
completed_at
string or null
email
string or null
phone
string or null
address
object or null
Show child propertiesHide child properties
line_1
string
line_2
string or null
city
string
postal_code
string
state
string or null
country
string
created_at
string
updated_at
string
{
"id": "cus_14Vxtqg6oXpAY5WdWoq4wW",
"object": "customer",
"live": true,
"name": "Acme SL",
"tax_id": {
"id": "tax_id_14Vxtqg6oXpAY5WdWoq4wW",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B87654323",
"owner": {
"type": "customer",
"id": "cus_14Vxtqg6oXpAY5WdWoq4wW"
},
"verification": null
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"created_at": "2026-07-31T09:30:00Z",
"updated_at": "2026-07-31T09:30:00Z"
}
Create a customer
/v1/customersCreates a customer from its current legal identity, tax ID, and contact details.
name
string
required
tax_id
object
required
Show child propertiesHide child properties
country
string
required
type
enum
required
es_nif
A Spanish NIF, including DNI and NIE identifiers for individuals and NIF identifiers for legal entities.
eu_vat
A VAT identifier issued by an EU member state and checked for intra-EU registration.
local
A domestic fiscal identifier that FiscalRail validates locally without querying a registry.
value
string
required
email
string or null
phone
string or null
address
object or null
Show child propertiesHide child properties
line_1
string
required
line_2
string or null
city
string
required
postal_code
string
required
state
string or null
country
string
required
201
A Customer object.
JSON
curl --request POST \
'https://api.fiscalrail.com/v1/customers' \
--header "Authorization: Bearer ak_test_..." \
--json '{
"name": "Acme SL",
"tax_id": {
"country": "ES",
"type": "es_nif",
"value": "B87654323"
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
}
}'
{
"id": "cus_14Vxtqg6oXpAY5WdWoq4wW",
"object": "customer",
"live": true,
"name": "Acme SL",
"tax_id": {
"id": "tax_id_14Vxtqg6oXpAY5WdWoq4wW",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B87654323",
"owner": {
"type": "customer",
"id": "cus_14Vxtqg6oXpAY5WdWoq4wW"
},
"verification": null
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"created_at": "2026-07-31T09:30:00Z",
"updated_at": "2026-07-31T09:30:00Z"
}
Retrieve a customer
/v1/customers/{id}Returns a customer by its opaque ID, including its current tax ID and contact details.
id
string
required
200
A Customer object.
JSON
curl --request GET \
'https://api.fiscalrail.com/v1/customers/cus_14Vxtqg6oXpAY5WdWoq4wW' \
--header "Authorization: Bearer ak_test_..."
{
"id": "cus_14Vxtqg6oXpAY5WdWoq4wW",
"object": "customer",
"live": true,
"name": "Acme SL",
"tax_id": {
"id": "tax_id_14Vxtqg6oXpAY5WdWoq4wW",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B87654323",
"owner": {
"type": "customer",
"id": "cus_14Vxtqg6oXpAY5WdWoq4wW"
},
"verification": null
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"created_at": "2026-07-31T09:30:00Z",
"updated_at": "2026-07-31T09:30:00Z"
}
Update a customer
/v1/customers/{id}Partially updates the supplied fields. Omitted top-level and address
fields are left unchanged.
id
string
required
name
string or null
tax_id
object
Show child propertiesHide child properties
country
string
required
type
enum
required
es_nif
A Spanish NIF, including DNI and NIE identifiers for individuals and NIF identifiers for legal entities.
eu_vat
A VAT identifier issued by an EU member state and checked for intra-EU registration.
local
A domestic fiscal identifier that FiscalRail validates locally without querying a registry.
value
string
required
email
string or null
phone
string or null
address
object or null
Show child propertiesHide child properties
line_1
string or null
line_2
string or null
city
string or null
postal_code
string or null
state
string or null
country
string or null
200
A Customer object.
JSON
curl --request PATCH \
'https://api.fiscalrail.com/v1/customers/cus_14Vxtqg6oXpAY5WdWoq4wW' \
--header "Authorization: Bearer ak_test_..." \
--json '{
"address": {
"city": "Barcelona"
}
}'
{
"id": "cus_14Vxtqg6oXpAY5WdWoq4wW",
"object": "customer",
"live": true,
"name": "Acme SL",
"tax_id": {
"id": "tax_id_14Vxtqg6oXpAY5WdWoq4wW",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B87654323",
"owner": {
"type": "customer",
"id": "cus_14Vxtqg6oXpAY5WdWoq4wW"
},
"verification": null
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"created_at": "2026-07-31T09:30:00Z",
"updated_at": "2026-07-31T09:30:00Z"
}
Delete a customer
/v1/customers/{id}Deletes a customer that has not been used by an invoice. A customer
referenced by an invoice cannot be deleted.
id
string
required
204
The customer was deleted. The response has no body.
curl --request DELETE \
'https://api.fiscalrail.com/v1/customers/cus_14Vxtqg6oXpAY5WdWoq4wW' \
--header "Authorization: Bearer ak_test_..."
List customers
/v1/customersReturns the account's customers in reverse chronological ID order.
Use only one cursor parameter at a time. starting_after moves toward
older customers; ending_before moves toward newer customers.
q
string
% and _ are treated literally.country
string
limit
integer
25.starting_after
string
ending_before.ending_before
string
starting_after.
200
A list of Customer objects.
JSON
curl --request GET \
'https://api.fiscalrail.com/v1/customers?q=Acme&country=ES&limit=25' \
--header "Authorization: Bearer ak_test_..."
{
"object": "list",
"has_more": true,
"data": [
{
"id": "cus_14Vxtqg6oXpAY5WdWoq4wW",
"object": "customer",
"live": true,
"name": "Acme SL",
"tax_id": {
"id": "tax_id_14Vxtqg6oXpAY5WdWoq4wW",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B87654323",
"owner": {
"type": "customer",
"id": "cus_14Vxtqg6oXpAY5WdWoq4wW"
},
"verification": null
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"created_at": "2026-07-31T09:30:00Z",
"updated_at": "2026-07-31T09:30:00Z"
}
]
}