International customers
Every cross-border scenario — intra-EU B2B, B2C with OSS, exports, services to non-EU — with the exact request shape BeeL accepts.
International invoices need the right combination of exemption_reason, main_tax.regime_key, and alternative_id. The wrong combination is almost always rejected by AEAT — and the right one is rarely obvious. This page walks every common scenario.
Identifying foreign customers
You can't use recipient.nif for non-Spanish customers — that field is reserved for Spanish NIFs. Use alternative_id instead:
{
"recipient": {
"legal_name": "Tech Europe GmbH",
"alternative_id": {
"type": "NIF_IVA",
"number": "DE123456789",
"country_code": "DE"
}
}
}alternative_id.type | Meaning | Allowed countries |
|---|---|---|
NIF_IVA | VAT-ID (intra-community VIES) | Non-ES only |
PASSPORT | Passport | Any country (including ES) |
COUNTRY_ID | National ID in country of residence | Non-ES only |
RESIDENCE_CERTIFICATE | Residence certificate | Non-ES only |
OTHER_DOCUMENT | Any other identifier | Non-ES only |
NOT_REGISTERED | Customer not registered in AEAT census | ES only |
The numeric codes ("02", "03", …, "07") are also accepted for backward compatibility but are deprecated. Prefer the descriptive names.
For type: NIF_IVA, BeeL validates the VAT-ID against VIES before submission. If VIES says the ID is inactive, BeeL refuses the invoice — fall back to COUNTRY_ID or OTHER_DOCUMENT and treat the operation as B2C.
B2B intra-EU — goods (E5)
EU-to-EU sales of goods between two businesses with valid VIES VAT-IDs are exempt under Art. 25 LIVA. The buyer self-assesses IVA in their country.
curl -X POST "https://app.beel.es/api/v1/invoices" \
-H "Authorization: Bearer beel_sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"type": "STANDARD",
"issue_date": "2026-05-18",
"recipient": {
"legal_name": "Acme NV",
"alternative_id": { "type": "NIF_IVA", "number": "BE0404621642", "country_code": "BE" },
"address": { "street": "Hauptstraße", "number": "456", "postal_code": "1000", "city": "Brussels", "province": "Brussels", "country": "Bélgica" }
},
"lines": [
{
"description": "Hardware supply",
"quantity": 1,
"unit": "unit",
"unit_price": 200,
"discount_percentage": 0,
"main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" },
"exemption_reason": "EXENTA_ART_25"
}
]
}'B2B intra-EU — services (N2)
Services to an EU business follow the general localisation rule (Art. 69 LIVA): they're deemed supplied where the customer is, so the operation is not subject to Spanish IVA. Use NO_SUJETA_LOCALIZACION (N2), not EXENTA_ART_25.
curl -X POST "https://app.beel.es/api/v1/invoices" \
-H "Authorization: Bearer beel_sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"type": "STANDARD",
"issue_date": "2026-05-18",
"recipient": {
"legal_name": "Acme NV",
"alternative_id": { "type": "NIF_IVA", "number": "BE0404621642", "country_code": "BE" }
},
"lines": [
{
"description": "B2B consulting service",
"quantity": 1,
"unit": "service",
"unit_price": 200,
"discount_percentage": 0,
"main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" },
"exemption_reason": "NO_SUJETA_LOCALIZACION"
}
]
}'B2C intra-EU — below the OSS threshold
When you sell goods or services to an EU consumer and your total annual cross-border B2C sales are under 10 000 €, the operation tributes in origin. The invoice carries Spanish IVA just like a domestic B2C sale.
Identify the consumer with PASSPORT, COUNTRY_ID, or OTHER_DOCUMENT. Omit exemption_reason (default S1).
curl -X POST "https://app.beel.es/api/v1/invoices" \
-H "Authorization: Bearer beel_sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"type": "STANDARD",
"issue_date": "2026-05-18",
"recipient": {
"legal_name": "Hans Müller",
"alternative_id": { "type": "PASSPORT", "number": "F8624KW3J6", "country_code": "DE" }
},
"lines": [
{
"description": "Digital subscription",
"quantity": 1,
"unit": "month",
"unit_price": 200,
"discount_percentage": 0,
"main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" }
}
]
}'B2C intra-EU — above the OSS threshold
Above 10 000 €/year aggregated cross-border B2C sales, you must apply the destination country's IVA and file via the OSS (One-Stop Shop) regime. From AEAT's perspective the operation is not subject to Spanish IVA — use NO_SUJETA_LOCALIZACION and main_tax.regime_key: "17".
curl -X POST "https://app.beel.es/api/v1/invoices" \
-H "Authorization: Bearer beel_sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"type": "STANDARD",
"issue_date": "2026-05-18",
"recipient": {
"legal_name": "Hans Müller",
"alternative_id": { "type": "PASSPORT", "number": "F8624KW3J6", "country_code": "DE" }
},
"lines": [
{
"description": "Digital subscription — OSS",
"quantity": 1,
"unit": "month",
"unit_price": 200,
"discount_percentage": 0,
"main_tax": { "type": "IVA", "percentage": 0, "regime_key": "17" },
"exemption_reason": "NO_SUJETA_LOCALIZACION"
}
]
}'BeeL doesn't track the 10 000 € threshold for you. Switching from "below" to "OSS" is a fiscal decision; once you've registered for OSS, set regime_key: "17" on every cross-border B2C line.
Exports of goods (non-EU)
Goods leaving the EU customs territory are exempt under Art. 21 LIVA regardless of who the buyer is. Pair EXENTA_ART_21 with regime_key: "02".
curl -X POST "https://app.beel.es/api/v1/invoices" \
-H "Authorization: Bearer beel_sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"type": "STANDARD",
"issue_date": "2026-05-18",
"recipient": {
"legal_name": "Acme Inc.",
"alternative_id": { "type": "PASSPORT", "number": "M76543210", "country_code": "US" }
},
"lines": [
{
"description": "Export of goods",
"quantity": 1,
"unit": "unit",
"unit_price": 200,
"discount_percentage": 0,
"main_tax": { "type": "IVA", "percentage": 0, "regime_key": "02" },
"exemption_reason": "EXENTA_ART_21"
}
]
}'Services to non-EU customers
By the general localisation rule, services to non-EU customers are not subject to Spanish IVA. Use NO_SUJETA_LOCALIZACION. The customer can be B2B or B2C — same classification.
curl -X POST "https://app.beel.es/api/v1/invoices" \
-H "Authorization: Bearer beel_sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"type": "STANDARD",
"issue_date": "2026-05-18",
"recipient": {
"legal_name": "Acme Inc.",
"alternative_id": { "type": "PASSPORT", "number": "M76543210", "country_code": "US" }
},
"lines": [
{
"description": "Professional services to US client",
"quantity": 1,
"unit": "project",
"unit_price": 200,
"discount_percentage": 0,
"main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" },
"exemption_reason": "NO_SUJETA_LOCALIZACION"
}
]
}'Cheat sheet (international scenarios only)
This page is about cross-border scenarios. ISP (ISP_ART_84_2_*, S2) is a domestic Spanish mechanism for reverse charge on specific operations (construction, gold, etc.) — it does not apply to intra-EU or non-EU buyers. For ISP, see Tax classification > ISP.
| Customer | Selling | exemption_reason | main_tax.regime_key | alternative_id.type |
|---|---|---|---|---|
| EU B2B (VIES) | Goods | EXENTA_ART_25 (E5) | 01 | NIF_IVA |
| EU B2B (VIES) | Services | NO_SUJETA_LOCALIZACION (N2) | 01 | NIF_IVA |
| EU B2C (under OSS) | Anything | omit (S1) | 01 | PASSPORT / COUNTRY_ID / OTHER_DOCUMENT |
| EU B2C (OSS) | Anything | NO_SUJETA_LOCALIZACION (N2) | 17 | PASSPORT / COUNTRY_ID / OTHER_DOCUMENT |
| Non-EU | Goods | EXENTA_ART_21 (E2) | 02 | PASSPORT / COUNTRY_ID / OTHER_DOCUMENT |
| Non-EU | Services | NO_SUJETA_LOCALIZACION (N2) | 01 | PASSPORT / COUNTRY_ID / OTHER_DOCUMENT |
Common confusion: intra-EU B2B services are NO_SUJETA_LOCALIZACION (N2, Art. 69 LIVA), never ISP/S2 (Art. 84 LIVA). ISP is reserved for domestic Spanish operations — never for cross-border.
Related
- Tax classification — full
exemption_reason↔ AEAT mapping - Regime keys —
02,17, and the rest - NIF Validation API — how BeeL verifies tax IDs against AEAT
- createInvoice API reference — full request schema
Equivalence surcharge (recargo de equivalencia)
When to add `equivalence_surcharge_rate` on B2B lines, the surcharge values BeeL accepts, and how the line is sent to AEAT.
Territorial taxes (IVA, IGIC, IPSI)
When to use IVA, IGIC (Canary Islands), or IPSI (Ceuta & Melilla) — and which `main_tax.type` value to send.