How it works with a card
- Create the customer with
POST /v2/customers. - Collect the card with Payment Element in
mode: "subscription". - Send the single-use
pgct_token to your backend. - Create the subscription with
POST /v2/subscriptions. - Listen to subscription webhooks for renewals, failures, updates, and cancellation.
How it works with Pix Automático
- Create the customer with
POST /v2/customers, including a CPF or CNPJ. - Create the subscription with
POST /v2/subscriptionsandpayment_method: "pix_automatic". - Show the returned QR code to the payer, who authorizes the recurring debit in their bank app.
- Listen to subscription webhooks for the authorization, each debit, failures, and cancellation.
Main surfaces
Operating rules
- Create subscriptions only from your backend.
- Store the Pagou subscription
id, customerid, and latest transactionid. - Use webhooks as the normal source of truth for lifecycle changes.
- Reconcile with
GET /v2/subscriptions/{id}when a renewal or cancellation outcome is unclear. - Move a card subscription between plans with
PATCH /v2/subscriptions/{id}; create a new subscription only to change the currency or the card. Pix Automático subscriptions cannot change plans.
Read next
- Create a Subscription
- Pix Automático Subscriptions
- Subscription Lifecycle
- Subscription Webhooks
- Subscriptions API Reference

