Skip to main content
Use subscriptions when you need to charge the same customer on a recurring schedule. Two payment methods are available:

How it works with a card

  1. Create the customer with POST /v2/customers.
  2. Collect the card with Payment Element in mode: "subscription".
  3. Send the single-use pgct_ token to your backend.
  4. Create the subscription with POST /v2/subscriptions.
  5. Listen to subscription webhooks for renewals, failures, updates, and cancellation.

How it works with Pix Automático

  1. Create the customer with POST /v2/customers, including a CPF or CNPJ.
  2. Create the subscription with POST /v2/subscriptions and payment_method: "pix_automatic".
  3. Show the returned QR code to the payer, who authorizes the recurring debit in their bank app.
  4. 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, customer id, and latest transaction id.
  • 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.

Runnable examples

See working, testable code for the card flow in the Subscriptions examples — runnable in seven languages against the sandbox.