Create configuration for issuing invoices

Creates the automatic NFS-e issuance configuration for a subscription.

After configuration, new payments generated by the subscription use these rules to issue invoices. Existing payments may also be included when they meet the configured conditions.

When effectiveDatePeriod is BEFORE_PAYMENT_DUE_DATE, also provide daysBeforeDueDate. Accepted values are 5, 10, 15, 30, or 60.

When effectiveDatePeriod is ON_NEXT_MONTH, receivedOnly can restrict issuance to paid payments. If not provided, the default value is false.

⚠️

Filling in taxes

The taxes object must represent the complete desired state of the tax configuration.

Fields omitted within this object are interpreted with their default value, usually null, and not as values to be preserved.

⚠️

PIS and COFINS

For accounts under the Regime Normal (standard tax regime) that issue NFS-e through the Portal Nacional, provide taxes.pisCofinsTaxStatus, taxes.operationPis, and taxes.operationCofins according to the applicable tax status.

Do not send taxes.pisCofinsRetentionType. The value is calculated automatically by Asaas.

Simples Nacional customers have no payload changes related to NT-007.

See the PIS/COFINS withholding and tax status settings.

The automatic configuration does not mean the NFS-e has been authorized by the city government. Use the invoice Webhooks to track issuance, especially the INVOICE_AUTHORIZED and INVOICE_ERROR events.

Related content

Guides

Path Params
string
required

Unique subscription identifier in Asaas

Body Params
string

Unique municipal service identifier

string

Municipal Service Code

string

Name of municipal service

boolean

Update the Payment amount with the invoice taxes already deducted.

number

Deductions. Deductions do not change the total value of the invoice, but they do change the ISS calculation basis.

string
enum

When the invoice will be issued

Allowed:
boolean

Issue only for paid charges

int32

Number of days before billing due date

string

Additional notes on the invoice

taxes
object
required

Invoice taxes

Responses

404

Not found

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