Tax Authority Return Interface Layout

This section displays the tax authority return interface layout.

This table displays the column, column descriptions for tax authority return interface layout.

Name Column Mandatory Data Type Description
Fiscal Document Key FISCAL_DOC_KEY Y VARCHAR2(50) Forty-four digit fiscal document key used as the unique identifier of the fiscal document. Use the same fiscal document key informed by the Send Fiscal Document to Tax Authority process.
Fiscal Document Event Code FISCAL_DOC_EVE NT_CODE Y VARCHAR2(30)

Fiscal document event code representing the type of request made to the tax authority. Possible values are:

  • Cancellation request (Request the tax authority to cancel the fiscal document);
  • Contingency request (Request the tax authority to approve a fiscal document generated in contingency);
  • Status request (Request the approval of a fiscal document from the tax authority);
  • Voiding request (Request the tax authority to void a fiscal document number).
Tax Authority Return Code TAX_AUTH_RETURN_CODE N VARCHAR2(30)

Internal code representing the return code from

the tax authority. Standard tax authority return codes are transformed into this internal code. The return code is dependent on the request made to tax authority.

Possible values are:

  • Approved (Either a Status request or a Contingency request is approved by the tax authority.)
  • Canceled (A Cancellation request is approved by the tax authority.)
  • Errors (A request is returned with errors by the tax authority.)
  • Pending return (There is a communication issue with the tax authority and there is no response for the request. In this case, it cannot be assumed the fiscal document was received by the tax authority. Either the the tax authority did not receive any response though the fiscal document was sent, or the tax authority did not receive the fiscal document for some reason.)
  • Rejected (Either a Status request or a Contingency request is returned as denied by the tax authority.)
    • Upload failed (Partner is not able to send the request to the tax authority due to errors because the tax authority did not receive the request.)
    • Void (The tax authority approves a Voiding request.)
Event Processing Date and Time PROCESSED_DATE_TIME N TIMESTAMP(6) Date and time when a request related to a fiscal document was processed by the tax authority.
Protocol Number or Temporary Service Document Number PROTOCOL_NUMBER N NUMBER(18)

Field is used for two distinct purposes, depending if the fiscal document is for services or goods.

  • If the fiscal document is a goods fiscal document, inform the protocol number. The tax authority generates this number 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, inform the temporary service document number from the partner during the tax authority return process. Use this field to capture the temporary service document number (RPS number) when a new number is generated by the partner and communicated to the city tax authority. The partner should inform this new temporary service document number, so the original temporary service document number is replaced by the new number.
Fiscal Document Date FISCAL_DOC_DATE N DATE (YYYY- MM-DD)

For service fiscal documents, this is the date when the city tax authority issues the fiscal document.

For goods fiscal documents, this is the date when the partner actually transmits the fiscal document to SEFAZ.

Service Fiscal Document Number DOC_NUM N NUMBER(18) Service fiscal document unique number provided by the city tax authority.
Verification Code of Service Fiscal Document SRVC_INVOICE _VERIFICATION_CODE N VARCHAR2(30) 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. Certificate number provided by the municipality on payment of taxes.
Tax Settlement Certificate Number of Service Fiscal Document TAX_AUTH_DOC_NUMBER N NUMBER(18) Date of certificate provided by the municipality on the payment of taxes.
Tax Settlement Date of Service Fiscal Document TAX_SETTLEMENT_DATE N DATE (YYYY-MM-DD) Service fiscal document unique number provided by the city tax authority.
Fiscal Document Key FISCAL_DOC_KEY Y VARCHAR2(50)

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

Tax authority return message code

AUTH_MESSAGE_C ODE N VARCHAR2(30) Message code returned by the tax authority and associated to the text message sent by the tax authority to justify an error, rejection, or warning condition.

Returned Message Text

MESSAGE_TEXT N VARCHAR2(1000)

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

Service Fiscal Document Number DOC_NUM N NUMBER(18) Service fiscal document unique number provided by the city tax authority.
Verification Code of Service Fiscal Document SRVC_INVOICE _VERIFICATION_CODE N VARCHAR2(30) 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 TAX_AUTH_DOC_NUMBER N NUMBER(18) Certificate number provided by the municipality on payment of taxes
Number of Service Fiscal Documents Tax Settlement TAX_SETTLEMENT_DATE N DATE (YYYY-MM-DD) Date of certificate provided by the municipality on the payment of taxes.

Tax Authority Message Return Interface: JG_FSCL_TAX_AUTH_TAXES_INT

This table displays the column, column descriptions for tax authority message return interface JG_FSCL_TAX_AUTH_TAXES_INT.

Name Column Mandatory Data Type Description
Fiscal Document Key FISCAL_DOC_KEY Y VARCHAR2(50) Forty-four digit fiscal document key used as the unique identifier of the fiscal document. Use the same fiscal document key indicated by the Send Fiscal Document to Tax Authority process.
Tax Code TAX N VARCHAR2(30) Tax code for the classification of a charge imposed by a government through a fiscal or tax authority.
Tax Regime Code TAX_REGIME_CODE N VARCHAR2(30) Tax regime code for the set of tax rules that determines the treatment of one or more taxes administered by a tax authority.
Tax Jurisdiction Code TAX_JURISDICTION _CODE N VARCHAR2(30) Tax jurisdiction code for a geographic area where a tax is levied by a specific tax authority.
Tax Status Code TAX_STATUS_CODE N VARCHAR2(30) Tax status code for the taxable nature of a product in the context of a transaction for a tax.
Tax Rate Code TAX_RATE_CODE N VARCHAR2(30) 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 CITY_CODE N VARCHAR2(30) City code according to IBGE (Brazilian Institute of Geography and Statistics) as indicated by the city tax authority.
Taxable Amount TAXABLE_AMT N NUMBER Taxable amount on which the tax rate is applied to calculate the tax amount, as indicated by the city tax authority.
Tax Rate TAX_RATE N NUMBER Tax rate expressed as a percentage and indicated by the city tax authority.
Tax Amount TAX_AMT N NUMBER Tax amount as indicated by the city tax authority.
Tax Credit Amount TAX_CREDIT_AMOUNT N NUMBER Tax credit amount as indicated by the city tax authority. Some cities allow tax deductions based on tax credits and they can specify the current tax credit amount.

Tax Authority Message Return Interface: JG_FSCL_TAX_AUTH_MSG_INT

This table displays the column, column descriptions for tax authority message return interface JG_FSCL_TAX_AUTH_MSG_INT.
Name Column Mandatory Data Type Description
Fiscal Document Key FISCAL_DOC_KEY Y VARCHAR2(50) Forty-four digit fiscal document key used as the unique identifier of the fiscal document. Use the same fiscal document key indicated by the Send Fiscal Document to Tax Authority process.
Tax authority return message code AUTH_MESSAGE_C ODE N VARCHAR2(30) Message code returned by the tax authority and associated to the text message sent by the tax authority to justify an error, rejection, or warning condition.
Returned Message Text MESSAGE_TEXT N VARCHAR2(1000) Message text sent by the tax authority to justify an error, rejection, or warning condition.