How to Generate New Charges from a Subscription
In the Sandbox environment, it is possible to test the generation of new charges from a subscription using the installment booklet generation feature.
This mechanism allows future charges linked to the subscription to be created in advance, making it easier to homologate integrations that depend on the existence of these charges to validate financial flows, notifications, webhooks, and billing processes.
When to use
This feature is recommended when your integration needs to:
- validate future subscription charges;
- test webhooks related to generated charges;
- homologate recurring billing flows;
- validate business rules that depend on subscription charges;
- test reports and financial reconciliations involving recurring charges.
How it works
A subscription creates its charges gradually over time according to the configured recurrence.
When generating the subscription installment booklet, Asaas creates those future charges in advance up to an end date defined in the request.
Simplified flow:
Subscription created
↓
Generate installment booklet
↓
Provide end date
↓
Create future charges
↓
Validate integrationInstallment booklet end date
The installment booklet generation depends on the end date provided in the request.
This date determines up to which period the charges will be created.
Example:
- installment booklet generated until December → creates charges until December;
- installment booklet generated until June of next year → creates charges until June of next year.
The longer the period provided, the greater the number of charges generated.
Expected behavior
When generating the installment booklet:
- future subscription charges are created automatically;
- the charges become available for API queries;
- subscription-related flows can be homologated in advance;
- the original subscription remains active and continues following its recurrence normally.
Generating the installment booklet does not represent a payment and does not change the status of the generated charges.
Homologation example
A typical homologation may follow the flow below:
Create subscription
↓
Generate installment booklet
until December
↓
Create future charges
↓
Query charges
↓
Validate webhooks
↓
Validate integrationThis process allows you to test the entire recurring billing journey without needing to wait for the natural generation of future charges.
Best practices
Recommended
- Use the feature only to homologate the required flows.
- Validate that the number of generated charges matches the informed period.
- Test the webhooks related to the created charges.
- Query the generated charges after executing the operation.
- Perform testing in Sandbox before using the feature in production.
Operational impacts
Generating the installment booklet can significantly increase the number of charges available in the account.
For this reason, integrations that perform:
- charge queries;
- periodic synchronizations;
- financial reports;
- reconciliations;
- webhook processing;
should consider that multiple charges may be created simultaneously after the operation is executed.
This behavior is especially useful for validating high-volume scenarios during homologation.
Possible difficulties
If the expected charges are not generated, verify:
- whether the subscription is active;
- whether the informed end date is later than the existing charges;
- whether authentication is being performed correctly;
- whether the subscription belongs to the Sandbox environment.
API Reference
See the request to generate the subscription installment booklet:
Generate subscription installment booklet
