Pular para o conteúdo principal
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.

Os metadados de cursor (next_cursor, prev_cursor) são retornados em data.metadata. Use status para filtrar pelo estado do ciclo de vida, customer_email para localizar um assinante específico, e created_after / created_before para reconciliação por intervalo de datas.

Autorizações

Authorization
string
header
obrigatório

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

Parâmetros de consulta

cursor
string
limit
number
padrão:20
Intervalo obrigatório: 1 <= x <= 100
direction
enum<string>
padrão:next
Opções disponíveis:
next,
prev
status
enum<string>
Opções disponíveis:
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)))$

Resposta

Success

success
boolean
obrigatório
requestId
string
obrigatório
data
object[]
obrigatório
next_cursor
string | null
obrigatório
prev_cursor
string | null
obrigatório
total
integer
obrigatório
Intervalo obrigatório: 0 <= x <= 9007199254740991