Subscriptions
Create a Subscription
Create a recurring subscription from a single-use card token.
POST
Post Subscriptions
Documentation Index
Fetch the complete documentation index at: https://developer.pagou.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Create the customer with
POST /v2/customers— the response includes thecustomer_id(UUID) you’ll pass below. - Vault the card through the secure Payment Element flow — this returns a single-use
pgct_payment token.
customer_id returns 404.
Behavior
customer_id is the customer’s public id (UUID) returned by POST /v2/customers.
token must be a single-use pgct_ token.
When trial_end is supplied, we may charge a small amount and refund it to ensure the payment method is valid, and the subscription is created with status trialing until the trial expires. Without trial_end, the subscription is created with status active after the first charge succeeds.
amount is in cents and is also used to bill every renewal cycle.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Public customer id (UUID) returned by POST /v2/customers.
Minimum string length:
1Minimum string length:
6Available options:
day, week, month Billing amount in cents (max 100,000,000).
Required range:
0 < x <= 100000000Required range:
1 <= x <= 365Trial end timestamp (ISO 8601). Must be in the future.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Available options:
immediate_cancel, retry_then_cancel Required array length:
1 - 10 elementsRequired range:
1 <= x <= 30Available options:
BRL, MXN, COP, CLP, ARS, PEN, USD, GTQ, CRC, NIO, PYG, UYU, BOB, PHP, RUB, INR, SAR, AED, KWD, QAR, OMR, KHR, SGD, IDR, KRW, THB, MYR, HKD, CNY, EGP, EUR, GBP, BHD, MAD, AUD, CAD, CHF, NZD, PLN, KZT, UZS, JPY, GLC Required string length:
1 - 255Maximum array length:
100Post Subscriptions

