Skip to main content

Configure the export of Model 238 (DAC7) from Avantio

Generate an XML file in the VRMS containing the data required by Model 238 (DAC7) for your tourist rental activity and prepare the information for submission to the Spanish Tax Agency.

Written by Ana R.
Updated over 3 months ago

Prepare and generate the Model 238 export in the VRMS

Model 238 in Spain is a mandatory annual informative return for certain digital platform operators. Its purpose is to provide the Spanish State Tax Administration Agency (AEAT) with detailed information on economic transactions carried out through these platforms, particularly in the tourist rental sector. This model replaces the former Model 179 and, unlike it, the obligation to report lies with the digital platforms rather than with property owners, in application of the European DAC7 Directive to strengthen tax control.

Avantio has developed the Model 238 export in XML format, allowing you to extract directly from the VRMS the data required to submit the return.

This export is intended for Property Managers whose registered office is in Spain and who are required to submit Model 238. If this applies to you, the VRMS helps you prepare the file, although the ultimate responsibility for submission to the Tax Agency remains yours.

Please note the timeline: the Model 238 XML file cannot be uploaded to the Tax Agency website until 2026, to report data corresponding to the 2025 financial year. Nevertheless, the export functionality, together with the newly required fields, will be deployed in production before the end of the year so that you can start preparing all the information.

Complete the tax details of the company, owners and properties

To generate the XML file, the VRMS uses information from your company details, property owners and accommodations. Some fields are mandatory and have specific validations; if any required data is missing or does not meet the format, the export will display errors based on this validation table.

Complete the tax details of your company details

In the company details section, you must review and complete the following fields:

Field

Mandatory

Format / value

Validation

Name

Yes

Max. 200 characters

The name is mandatory and cannot exceed 200 characters.

Tax ID (CIF)

Yes

Max. 200 characters

The CIF is mandatory and cannot exceed 200 characters.

IN

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Intra-community VAT

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Address type

Yes

OECD301, OECD302, OECD303, OECD304 or OECD305

Address type is mandatory.

Country

Yes

ISO3166 code

Country of residence is mandatory.

Street

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Number

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Door

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Postcode

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Province

No

Max. 200 characters

If completed, it must be verified.

City

Yes

Max. 200 characters

City is mandatory and must be verified.

Review the owner’s identification and birth details

Each owner record must contain sufficient identification and address information so that the system can include it in Model 238. The fields and validations are as follows:

Field

Mandatory

Format / value

Validation

NIF / TIN

Yes

Max. 200 characters

Document number is mandatory and cannot exceed 200 characters.

First name

Yes

Max. 200 characters

Mandatory and cannot exceed 200 characters.

Surname(s)

Yes

Max. 200 characters (combined)

Mandatory and cannot exceed 200 characters.

IN

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Intra-community VAT

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Address type

Yes

OECD301, OECD302, OECD303, OECD304 or OECD305

Mandatory.

Country

Yes

ISO3166 code

Country of residence is mandatory.

Street

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Number

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Door

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Postcode

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Province

No

Max. 200 characters

If completed, it must be verified.

City

Yes

Max. 200 characters

Mandatory and must be verified.

Date of birth

Yes

Date

Mandatory.

City of birth

Yes

Max. 200 characters

Mandatory and must be verified.

Province of birth

No

Max. 200 characters

If completed, it must be verified.

Country of birth

Yes

ISO3166 code

Mandatory.

IBAN

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Account holder

Yes, if IBAN is completed

Max. 200 characters

Mandatory if IBAN is provided.

GVS jurisdiction

Yes, if owner model is GVS

ISO3166 code

Mandatory for GVS model.

GVS reference

Yes, if owner model is GVS

Max. 200 characters

Mandatory for GVS model.

Verify the property address details

Each accommodation record also uses several address fields for Model 238:

Field

Mandatory

Format / value

Validation

Address type

Yes

OECD301, OECD302, OECD303, OECD304 or OECD305

Mandatory.

Country

Yes

ISO3166 code

Mandatory.

Street

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Number

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Door

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Postcode

No

Max. 200 characters

If completed, it cannot exceed 200 characters.

Province

No

Max. 200 characters

If completed, it must be verified.

City

Yes

Max. 200 characters

Mandatory and must be verified.

Cadastral reference

Yes

Max. 200 characters

Mandatory and cannot exceed 200 characters.

Identify the new fields enabled in the VRMS

To support Model 238, additional fields have been enabled in different sections of the VRMS. These fields allow you to complete the information required by the AEAT under DAC7.

Section

Field

Details

Property record

Address type

Values: Residential, Commercial, Registered office, Not specified.

Owner record

Identification type

Values: Standard, GVS. Selecting GVS displays additional fields.

Owner record

Document number

Free field for additional identification information.

Owner record

City, province and country of birth

Specific birth data fields.

Owner record

Address type

Residential, Commercial, Registered office, Not specified.

Owner record

Number, block or door, floor or door

Detailed address fields.

Company details

Document number

Free field for additional company information.

Company details

Address type

Residential, Commercial, Registered office, Not specified.

Before launching the export, it is important to review these records and complete all mandatory fields to avoid errors.

Generate the Model 238 XML file from the VRMS

Once company, owner and property data are complete, you can launch the export from the VRMS export module.

Follow these steps:

  1. Go to Exports → DAC7. You will see two sections: New export and Completed exports.

  2. In New export, use the available filters to narrow down the information to include.

  3. Click Export. The system will generate the file and add it to Completed exports.

  4. Download the Model 238 XML file.

  5. Access the Tax Agency intranet enabled for Model 238 and upload the XML file.

Available filters in New export:

Filter

Options

Year

List of available years.

Company

List of companies configured in the VRMS.

Status

Pre-booking, Confirmed, Paid, Guarantee, Cancelled.

Portal

Portal list, “No portal assigned” and “Web bookings”.

Owner

List of owners.

Export type

Draft*, Normal.

If errors are detected, they will be displayed according to the validation table. You must correct the data and repeat the export.

If the submission type is Draft*, submitting the XML will not register any data with the Tax Agency. This option is intended for error detection before final submission and is recommended prior to filing the definitive XML.

Review quarterly DAC7 activity and amount information

Model 238 requires activity information to be grouped by quarters. The XML generated by the VRMS includes key concepts populated from booking and settlement data.

XML concept

Description

VRMS source

Consideration

Net compensation paid to the seller after fees, commissions or taxes withheld.

Owner settlement payments.

Fees

Commissions, deposits, charges and similar amounts retained by the platform operator.

Total booking amount minus owner payment.

Number of activities

Number of activities carried out in the quarter.

Number of nights sold.

Taxes

Taxes collected quarterly by the platform operator.

VAT on the intermediation contract.

Example of DAC7 calculation for a transaction

The document includes an example for a single transaction in a quarter, subject to 21% VAT.

  • Sale value: €1,000

  • Platform commission: €100

  • Both subject to 21% VAT

Reported values:

  • Quarterly consideration: €1,000 + €210 VAT − €100 − €21 VAT = €1,089

  • Number of activities: 1

  • Fees: €100

  • Taxes: €21

Equivalent VRMS example:

  • Total booking amount: €1,210 (VAT included).

  • Portal commission: €10.

  • Agency commission: 20% (VAT included) on rental amount minus portal commission.

Quarterly amounts:

  • Consideration: €1,210 − ((€1,210 − €10) × 0.2) = €970

  • Fees: €1,210 − €970 = €240

  • Taxes: (€240 / 1.21) × 0.21 = €41.65

These calculations are performed quarterly for all bookings included in the export, following Model 238 logic.

Manage exclusions and relevant activities in DAC7 calculations

The VRMS includes options to control what information is sent and how it is calculated.

You can exclude properties or individual bookings from Model 238 at both accommodation and booking level. You can also customise the amount considered for Model 238 within each booking if alignment with specific tax criteria is required.

Only bookings with completed owner settlements are considered relevant activities. If a booking is not included in an owner settlement, it will not be included in the XML.

If a booking is missing from the XML, check that a completed owner settlement exists and that neither the property nor the booking is marked as excluded.

Before completing the process, ensure all mandatory fields are updated, settlements reviewed and the XML generated with the correct export type. This will leave the file ready for upload to the Tax Agency’s electronic office when the Model 238 (DAC7) filing period opens.

Frequently asked questions

What information is included in the Model 238 (DAC7) export generated from the VRMS?

The Model 238 export generated from the VRMS creates an XML file containing the tax details of your company, property owners and accommodations, together with the quarterly activity information required under DAC7: net consideration payable to the owner, commissions and other amounts withheld, number of activities, and taxes charged per quarter. Only bookings considered relevant activities according to the system’s criteria are included.

Who should use the Model 238 export in the VRMS to submit the return to the Tax Agency?

This functionality is intended for Property Managers whose registered office is in Spain and who, due to the nature of their activity, are required to submit Model 238 to the Spanish Tax Agency. The VRMS facilitates generation of the XML file, but responsibility for reviewing the information and submitting the return remains with the platform operator.

How do you generate and download the Model 238 XML file from the VRMS?

Go to Exports → DAC7, open New export, select the filters for year, company, status, portal, owner and export type, and click Export. Then, under Completed exports, you can download the generated XML file and upload it to the Tax Agency intranet enabled for Model 238.

What happens if mandatory data is missing or errors are detected when exporting Model 238 from the VRMS?

If the system detects that mandatory data is missing or that a field does not meet validation requirements—such as unverified country or city, incomplete dates of birth, or address fields exceeding the maximum length—it will display errors in line with the validation table. In this case, you must correct the information in the company, owner or accommodation records and repeat the export until the file is generated without issues.

How are consideration, commissions and taxes for your bookings calculated in the quarterly DAC7 information of Model 238?

Consideration is the net compensation received by the owner after deducting fees, commissions and taxes withheld by the platform. Commissions and other withheld amounts (Fees) are calculated as the difference between the total booking amount and the payment made to the owner. The number of activities is based on nights sold, and taxes (Taxes) are taken from the VAT on the intermediation contract. The document includes a detailed example using a €1,210 booking, portal and agency commissions, and the resulting calculation of consideration, fees and taxes.

Did this answer your question?