Tax Authority Return Interface

After submitting the fiscal document information to the tax authority, the third party receives the tax authority return, and populates the Tax Authority Return interface tables using the Load Interface File for Import Process or the Financial Utilities Service web service.

To prepare the data for loading into the interface tables, the third party uses the Fiscal Document Tax Authority Return Interface XLSM template.

The Tax Authority Return interface tables contain the following information for goods and services fiscal documents:

Fiscal Document Key

Forty-four digit fiscal document key used as the unique identifier of the fiscal document. Use the same fiscal document key indicated in the extract file by the Send Fiscal Document to Tax Authority process.

Fiscal Document Event Code

Fiscal document event code representing the type of request made to the tax authority. Possible values are:
  • Cancellation request: Request to cancel the fiscal document.

  • Contingency request: Request to approve a fiscal document generated in contingency.

  • Status request: Request to approve a fiscal document.

  • Voiding request: Request to void a fiscal document number.

Tax Authority Return Code

Internal code representing the return code from the tax authority. Standard tax authority return codes will be transformed into this internal code. The return code is dependent on the request made to the tax authority. Possible values are:
  • Approved: Represents either a Status request or a Contingency request that is approved.

  • Canceled: Indicates that a cancellation request is approved.

  • Errors: Indicates that a request is returned with errors.

  • Pending return: Indicates an issue in communicating with the tax authority where there is no response for the request or the response has timed out. In this case, you cannot assume that the tax authority had received the fiscal document. Either the fiscal document was sent but no response was received from the tax authority, or the tax authority did not receive the fiscal document for some reason.

  • Rejected: Indicates that either a Status request or a Contingency request is returned as denied.

  • Upload failed: Indicates that the partner failed to send the request due to errors.

  • Void: Indicates that a voiding request is approved.

Approved: Represents either a Status request or a Contingency request that is approved. Canceled: Indicates that a cancellation request is approved. Errors: Indicates that a request is returned with errors. Pending return: Indicates an issue in communicating with the tax authority where there is no response for the request or the response has timed out. In this case, you cannot assume that the fiscal document was received by the tax authority. Either the fiscal document was sent but no response was received from the tax authority, or the fiscal document was not received by the tax authority for some reason. Rejected: Indicates that either a Status request or a Contingency request is returned as denied. Upload failed: Indicates that the partner failed to send the request due to errors. Void: Indicates that a voiding request is approved.

Event Processing Date and Time

The date and time when the tax authority processed a request related to a fiscal document.

Protocol Number or Temporary Service Document Number

Use this field for the these purposes:
  • If the fiscal document is a goods fiscal document, indicate the protocol number. The protocol number is generated by the tax authority to uniquely identify the transactions of authorization, cancellation, and void related to a goods fiscal document.
  • If the fiscal document is a service fiscal document, indicate the temporary service document number provided by the partner during the tax authority return process. Use this field to indicate the temporary service document number (RPS number) if the partner generates a new number and communicates it to the city tax authority. The partner must inform this new temporary service document number, so that the original temporary service document number is replaced by the new number.

Service Fiscal Document Date

The date when the service fiscal document is issued by the city tax authority.

Service Fiscal Document Number

The service fiscal document unique number provided by the city tax authority.

Verification Code of Service Fiscal Document

The verification code of the service fiscal document provided by the city tax authority when the fiscal document is generated. This code is used to verify the authenticity of the service fiscal document.

Tax Settlement Certificate Number of Service Fiscal Document

The certificate number provided by the municipality on the payment of taxes.

Tax Settlement Date of Service Fiscal Document

The date of the certificate provided by the municipality when taxes are paid.

For service fiscal documents, the tax information is returned by the city tax authority, and it can be different from the tax calculated previously in the temporary service document (RPS). This information is populated in the Tax Authority Return interface tables.

Tax Code

The tax code for the classification of a charge imposed by a government through a fiscal or tax authority.

Tax Regime Code

The tax regime code for the set of tax rules that determine the treatment of one or more taxes administered by a tax authority.

Tax Jurisdiction Code

The tax jurisdiction code for a geographic area where a tax is levied by a specific tax authority.

Tax Status Code

The tax status code for the taxable nature of a product in the context of a transaction for a tax.

Tax Rate Code

The tax rate code specified for a tax status for an effective time period, expressed as a percentage or a value per unit quantity.

City Code

The city code according to IBGE (Brazilian Institute of Geography and Statistics) as informed by the city tax authority.

Taxable Amount

The taxable amount on which the tax rate is applied to calculate the tax amount, as indicated by the city tax authority.

Tax Rate

The tax rate expressed as a percentage, and indicated by the city tax authority. Tax Amount.

The tax amount as indicated by the city tax authority.

Tax Credit Amount

The tax credit amount as indicated by the city tax authority. Some cities allow tax deductions based on tax credits and they can state the current tax credit amount.

For both goods and services fiscal documents, the tax authority can return error, rejection, or warning messages, which are populated in the Tax Authority Return interface tables.

Tax Authority Return Message Code

The message code returned by the tax authority, and associated to the text message to justify an error, rejection, or warning condition.

Returned Message Text

The message text sent by the tax authority to justify an error, rejection, or warning condition.