Create and update tax information

Creates or updates the account's tax information used to issue Service Invoices (NFS-e).

Use this operation after checking the municipality's requirements in List municipal configurations. The required data and credentials vary according to the city hall linked to the account's CNPJ.

⚠️

Conditional fields

Send only the credentials corresponding to the authenticationType returned for the municipality.

When usesSpecialTaxRegimes indicates that a special tax regime is required, provide specialTaxRegime using a value available in specialTaxRegimesList. When usesServiceListItem indicates this requirement, provide serviceListItem.

Invoice series

Provide the issuing series in rpsSerie. In Campinas/SP, Campo Grande/MS, João Pessoa/PB, Sorocaba/SP and Teresina/PI, the city hall requires a series between 10001 and 49999. Invoices issued with a series outside this range are rejected.

Default municipality of service provision

Use serviceProvisionCityDefaultType to define which city will be used by default when issuing NFS-e. The field is optional, so integrations that do not send it continue to work without changes.

ValueCity used
MY_ACCOUNT_CITYCity of the Asaas account, corresponding to the service provider
CUSTOMER_CITYCity of the customer, corresponding to the service recipient
CUSTOMER_CITY_WHEN_ISS_IS_RETAINEDCity of the customer when ISS is withheld. Otherwise, uses the city of the Asaas account

When updating the tax information, if serviceProvisionCityDefaultType is not sent in the payload, the value already registered is kept.

⚠️

An invalid value rejects the entire request

The field accepts only the values defined in the enum. Invalid values, including an empty string or values with different uppercase/lowercase letters, such as my_account_city, return HTTP 400.

In this case, the entire request is rejected and no field in the payload is saved, including other valid fields sent in the same request.

Example response for an invalid value:

{
  "errors": [
    {
      "code": "parse_error",
      "description": "O campo 'serviceProvisionCityDefaultType' informado é inválido."
    }
  ]
}

After saving the configuration, use Retrieve tax information to view the tax data currently registered in the account.

Related content

Guides

Body Params
string
required

Email used by Asaas to send invoice notifications and alerts

string

Company municipal registration

boolean
required
Defaults to true

Indicates whether the company opts for the simple national system

boolean
Defaults to true

Identifies whether the company is classified as a cultural promoter

string

CNAE code

string

Special taxation regime identifier

string
string

NBS Code (Brazilian Nomenclature of Services). It must be included on the NFS-e (Electronic Service Invoice) when required by the municipal government and/or for import or export services. Check with your local government or your accounting department to determine whether this information is necessary.

string

Serial Number used by your company to issue invoices. For NFSe on the national standard, the series must follow the authentication method: Digital certificate (00001 to 49999) or Username and password (80000 to 89999). For municipal issuance, in most cities the serial number used is '1' or 'E'. Exception: in Belém/PA, Campinas/SP, Campo Grande/MS, João Pessoa/PB, Sorocaba/SP and Teresina/PI, the series must be between 10001 and 49999

int32

RPS number used on the last invoice issued by your company. If your last NF issued has an RPS equal to '100', this field must be filled in with '101'. If you have never issued invoices through your city hall's website, enter '1' in this field

int32

Batch number used on the last invoice issued by your company. If the last lot used in your city hall is '25', this field must be filled in with '26'. Only enter this field if your city hall requires the use of lots

string

User to access your city's city hall website

string

Password to access the city hall website

string

Token for access to the city hall website (If access to your city hall website is via Token)

file

File

string

Password for the digital certificate sent (If access to your city hall website through a digital certificate)

string

Identifier of the tax calculation regime. It must only be completed by companies classified as ME or EPP opting for Simples Nacional. Consult the need for this information with your city hall or accounting department.

string
enum

Defines which city will be used as the default for issuing a service invoice. MY_ACCOUNT_CITY uses the city of your own Asaas account (the service provider); CUSTOMER_CITY uses your customer's city (the service recipient); CUSTOMER_CITY_WHEN_ISS_IS_RETAINED uses your customer's city only when ISS is retained, otherwise it uses the city of your own account

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json