Accounts
An account owns its customers, invoice series, API keys and invoices. Every account is isolated in either the live or test environment; resources cannot be shared between environments.
The account exposes the invoice, credit-note, and amendment series used when an operation omits an explicit series under default_series. It also controls invoice numbering for every series through invoice_numbering_scope.
default_payment_instructions is an ordered array of Payment Instruction IDs. When invoice issuance omits payment_terms.options, FiscalRail snapshots those instructions onto the invoice in that order. Set the array to [] to disable account defaults.
The live boolean identifies whether the account contains live or test data. Updating default_series replaces all three defaults atomically, so the object must include invoice, credit_note, and amendment. Use null for an optional default that is not configured.
account numbering uses one sequence per configured series. customer numbering appends the customer's invoice prefix to generated codes and keeps an independent sequence for each series and customer; customerless invoices continue on the base sequence. This changes future numbering only and applies to every series in the account.
An account API key has access to exactly one account, so the list endpoint currently returns one item. The collection shape leaves room for credentials that can access multiple accounts in the future.
The Account object
id
string
object
string
account.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
Show child propertiesHide child properties
line_1
string
line_2
string or null
city
string
postal_code
string
state
string or null
country
string
tax_regime
string
timezone
string
invoice_locale
enum
en
English.
es
Spanish.
invoice_numbering_scope
enum
account.account
customer
default_series
object
Show child propertiesHide child properties
invoice
string
series.credit_note
object or null
amendment
object or null
default_payment_instructions
array of strings
payment_terms.options. The first instruction is preferred.created_at
string
updated_at
string
{
"id": "acct_14Vxtqg2nwvPR75TpsGH8N",
"object": "account",
"live": true,
"name": "Example supplier",
"tax_id": {
"id": "tax_id_14Vxtqg2nwvPR75TpsGH8N",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B02850360",
"owner": {
"type": "account",
"id": "acct_14Vxtqg2nwvPR75TpsGH8N"
},
"verification": {
"status": "completed",
"valid": true,
"completed_at": "2026-08-09T10:24:00Z"
}
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"tax_regime": "es",
"timezone": "Europe/Madrid",
"invoice_locale": "es",
"invoice_numbering_scope": "account",
"default_series": {
"invoice": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"credit_note": "inv_ser_14Vxtqj7HFs2pM9cXwL6eR",
"amendment": "inv_ser_14Vxtqk8JGt3qN2dYxM7fS"
},
"default_payment_instructions": [
"pay_ins_14Vxtqm9KHu4rP3eZyN8gT"
],
"created_at": "2026-07-31T09:00:00Z",
"updated_at": "2026-07-31T09:00:00Z"
}
Retrieve an account
/v1/accounts/{id}Returns an account accessible to the API key and its current invoicing configuration.
id
string
required
200
An Account object.
JSON
import os
from fiscalrail import FiscalRail
client = FiscalRail(os.environ["FISCALRAIL_API_KEY"])
account = client.accounts.retrieve(
"acct_14Vxtqg2nwvPR75TpsGH8N",
)
curl --request GET \
'https://api.fiscalrail.com/v1/accounts/acct_14Vxtqg2nwvPR75TpsGH8N' \
--header "Authorization: Bearer ak_test_..."
{
"id": "acct_14Vxtqg2nwvPR75TpsGH8N",
"object": "account",
"live": true,
"name": "Example supplier",
"tax_id": {
"id": "tax_id_14Vxtqg2nwvPR75TpsGH8N",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B02850360",
"owner": {
"type": "account",
"id": "acct_14Vxtqg2nwvPR75TpsGH8N"
},
"verification": {
"status": "completed",
"valid": true,
"completed_at": "2026-08-09T10:24:00Z"
}
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"tax_regime": "es",
"timezone": "Europe/Madrid",
"invoice_locale": "es",
"invoice_numbering_scope": "account",
"default_series": {
"invoice": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"credit_note": "inv_ser_14Vxtqj7HFs2pM9cXwL6eR",
"amendment": "inv_ser_14Vxtqk8JGt3qN2dYxM7fS"
},
"default_payment_instructions": [
"pay_ins_14Vxtqm9KHu4rP3eZyN8gT"
],
"created_at": "2026-07-31T09:00:00Z",
"updated_at": "2026-07-31T09:00:00Z"
}
Update account invoicing settings
/v1/accounts/{id}Updates invoice numbering or atomically replaces account invoicing defaults.
id
string
required
invoice_numbering_scope
enum
account.account
customer
default_series
object
Show child propertiesHide child properties
invoice
string
required
series.credit_note
object or null
required
amendment
object or null
required
default_payment_instructions
array of strings
200
The updated Account object.
JSON
import os
from fiscalrail import FiscalRail
client = FiscalRail(os.environ["FISCALRAIL_API_KEY"])
account = client.accounts.update(
"acct_14Vxtqg2nwvPR75TpsGH8N",
invoice_numbering_scope="customer",
default_series={
"invoice": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"credit_note": "inv_ser_14Vxtqj7HFs2pM9cXwL6eR",
"amendment": "inv_ser_14Vxtqk8JGt3qN2dYxM7fS",
},
default_payment_instructions=[
"pay_ins_14Vxtqm9KHu4rP3eZyN8gT",
],
)
curl --request PATCH \
'https://api.fiscalrail.com/v1/accounts/acct_14Vxtqg2nwvPR75TpsGH8N' \
--header "Authorization: Bearer ak_test_..." \
--json '{
"invoice_numbering_scope": "customer",
"default_series": {
"invoice": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"credit_note": "inv_ser_14Vxtqj7HFs2pM9cXwL6eR",
"amendment": "inv_ser_14Vxtqk8JGt3qN2dYxM7fS"
},
"default_payment_instructions": [
"pay_ins_14Vxtqm9KHu4rP3eZyN8gT"
]
}'
{
"id": "acct_14Vxtqg2nwvPR75TpsGH8N",
"object": "account",
"live": true,
"name": "Example supplier",
"tax_id": {
"id": "tax_id_14Vxtqg2nwvPR75TpsGH8N",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B02850360",
"owner": {
"type": "account",
"id": "acct_14Vxtqg2nwvPR75TpsGH8N"
},
"verification": {
"status": "completed",
"valid": true,
"completed_at": "2026-08-09T10:24:00Z"
}
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"tax_regime": "es",
"timezone": "Europe/Madrid",
"invoice_locale": "es",
"invoice_numbering_scope": "account",
"default_series": {
"invoice": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"credit_note": "inv_ser_14Vxtqj7HFs2pM9cXwL6eR",
"amendment": "inv_ser_14Vxtqk8JGt3qN2dYxM7fS"
},
"default_payment_instructions": [
"pay_ins_14Vxtqm9KHu4rP3eZyN8gT"
],
"created_at": "2026-07-31T09:00:00Z",
"updated_at": "2026-07-31T09:00:00Z"
}
List accounts
/v1/accountsReturns the accounts accessible to the API key. Account keys currently return exactly one account.
200
A list of Account objects.
JSON
import os
from fiscalrail import FiscalRail
client = FiscalRail(os.environ["FISCALRAIL_API_KEY"])
accounts = client.accounts.list()
curl --request GET \
'https://api.fiscalrail.com/v1/accounts' \
--header "Authorization: Bearer ak_test_..."
{
"object": "list",
"has_more": null,
"data": [
{
"id": "acct_14Vxtqg2nwvPR75TpsGH8N",
"object": "account",
"live": true,
"name": "Example supplier",
"tax_id": {
"id": "tax_id_14Vxtqg2nwvPR75TpsGH8N",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B02850360",
"owner": {
"type": "account",
"id": "acct_14Vxtqg2nwvPR75TpsGH8N"
},
"verification": {
"status": "completed",
"valid": true,
"completed_at": "2026-08-09T10:24:00Z"
}
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"tax_regime": "es",
"timezone": "Europe/Madrid",
"invoice_locale": "es",
"invoice_numbering_scope": "account",
"default_series": {
"invoice": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"credit_note": "inv_ser_14Vxtqj7HFs2pM9cXwL6eR",
"amendment": "inv_ser_14Vxtqk8JGt3qN2dYxM7fS"
},
"default_payment_instructions": [
"pay_ins_14Vxtqm9KHu4rP3eZyN8gT"
],
"created_at": "2026-07-31T09:00:00Z",
"updated_at": "2026-07-31T09:00:00Z"
}
]
}