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.
As mentioned before, have in mind that the information defined in the subscription creation will restrict the dates and values to be used 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.Example