TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/NemonInvocash/verifactu-php/llms.txt
Use this file to discover all available pages before exploring further.
Tercero model identifies a third party or recipient that issues an invoice on behalf of the primary Emisor. This corresponds to the self-billing and third-party issuance scenario defined in the VeriFactu specification, and is used in conjunction with the emitidaPorTercODestinatario flag (lista L6) on RegistroAlta. Like Destinatario, a Tercero instance is passed into RegistroAlta via its objects array. When no third party is involved, pass Tercero::empty() or simply omit the key.
Construction
Use
tercNIF for Spanish third parties. For foreign third parties, populate tercOtroCodPais, tercOtroIDType, and tercOtroID instead, and leave tercNIF empty.Fields
Legal name (nombre-razón social) of the third-party issuer. Maps to API field
TercNombreRazon.Spanish NIF of the third-party issuer. Maps to API field
TercNIF. Use for third parties registered with AEAT in Spain.ISO 3166-1 alpha-2 country code for a foreign third party (e.g.
"DE", "FR"). Maps to API field TercOtroCodPais.Foreign identification type for the third party, from lista L7. Both the integer ID and the string code are accepted. Maps to API field
TercOtroIDType.Foreign identification number of the third party in their country of residence. Maps to API field
TercOtroID.Getters and Setters
| Method | Description |
|---|---|
getTercNombreRazon(): string | Returns the third party’s legal name. |
setTercNombreRazon(string $v): void | Sets the third party’s legal name. |
getTercNIF(): string | Returns the third party’s Spanish NIF. |
setTercNIF(string $v): void | Sets the third party’s Spanish NIF. |
getTercOtroCodPais(): string | Returns the third party’s country code. |
setTercOtroCodPais(string $v): void | Sets the third party’s country code. |
getTercOtroIDType(): int|string | Returns the foreign ID type (lista L7). |
setTercOtroIDType(int|string $v): void | Sets the foreign ID type (lista L7). |
getTercOtroID(): string | Returns the third party’s foreign ID number. |
setTercOtroID(string $v): void | Sets the third party’s foreign ID number. |
getArrayData()
getArrayData(): array returns an associative array containing only the non-empty fields, ready for embedding inside the Tercero key of the RegistroAlta payload.
PHP property names differ from the API field names used in the payload:
| PHP property | API field key |
|---|---|
tercNombreRazon | TercNombreRazon |
tercNIF | TercNIF |
tercOtroCodPais | TercOtroCodPais |
tercOtroIDType | TercOtroIDType |
tercOtroID | TercOtroID |
RegistroAlta::getArrayData() wraps the result in a single-element array under the key Tercero when the Tercero model is non-empty.empty()
Tercero::empty(): Tercero returns a Tercero with all string fields set to '' and tercOtroIDType set to 0. Because getArrayData() skips empty values, an empty Tercero produces no output in the API payload. Use it as a placeholder in RegistroAlta when no third party is involved in the invoice issuance.

