Step 1: First payment and subscription creation
To initiate the flow, you must start with a standard Pix payment that also sets up the subscription. This generates a QR code or redirect screen for the customer to authorize the recurrence. Once paid, the subscription is created and asubscription_id is returned.
You can define the frequency, availability window, and the amount type (fixed or variable) as part of the subscription payload.
| Fields for subscriptions | Description |
|---|---|
| Frequency | Define the frequency at which subscription charges will occur, whether daily, weekly, or monthly, specifying the amount that needs to be charged for the next billing cycle. |
| Availability | The start and end dates of the subscription. |
| Amount | Define the value you will use for future payments of the subscription. Could be FIXED with a minimum value defined, or VARIABLE without an amount defined for future payments. |
Example
Step 2: Future payments
As defined by the central bank, payments must be created at most 2 days before the scheduled billing date and at least 10 days after the subscription was created. Use the subscription_id to identify the recurrence in the payment creation.| Fields for future payments | |
|---|---|
subscription_id | ID of the subscription obtained in the first step. |
| billing_date | By specifying the billing_date object, the merchant can define the logic behind the exact date for the billing of the subscription. |
Example