Skip to main content
GET
/
v2
/
subscriptions
Get Subscriptions
curl --request GET \
  --url https://api.pagou.ai/v2/subscriptions \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "requestId": "<string>",
  "data": [
    {
      "id": "<string>",
      "customerId": "<string>",
      "intervalCount": 183,
      "amount": 50000000,
      "trialEnd": "2023-11-07T05:31:56Z",
      "currentPeriodStart": "2023-11-07T05:31:56Z",
      "currentPeriodEnd": "2023-11-07T05:31:56Z",
      "cancelAtPeriodEnd": true,
      "canceledAt": "2023-11-07T05:31:56Z",
      "retryOffsetsDays": [
        15
      ],
      "customerEmail": "<string>",
      "cardLast4": "<string>",
      "metadata": {},
      "products": [
        {
          "name": "<string>",
          "price": 50000000,
          "quantity": 500000,
          "tangible": true,
          "sku": "<string>"
        }
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "transactions": [
        {
          "id": "<string>",
          "status": "<string>",
          "amount": 50000000,
          "paidAmount": 50000000,
          "refundedAmount": 50000000,
          "externalRef": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "paidAt": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ],
  "next_cursor": "<string>",
  "prev_cursor": "<string>",
  "total": 4503599627370495
}

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.

Cursor metadata (next_cursor, prev_cursor) is returned under data.metadata. Use status to filter by lifecycle state, customer_email to locate a specific subscriber, and created_after / created_before for date-range reconciliation.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

cursor
string
limit
number
default:20
Required range: 1 <= x <= 100
direction
enum<string>
default:next
Available options:
next,
prev
status
enum<string>
Available options:
incomplete,
trialing,
active,
past_due,
cancel_scheduled,
canceled
customer_email
string<email>
Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
created_after
string<date-time>

Filter to subscriptions created at or after this ISO 8601 timestamp.

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)))$
created_before
string<date-time>

Filter to subscriptions created at or before this ISO 8601 timestamp.

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)))$

Response

Success

success
boolean
required
requestId
string
required
data
object[]
required
next_cursor
string | null
required
prev_cursor
string | null
required
total
integer
required
Required range: 0 <= x <= 9007199254740991