Pular para o conteúdo principal
GET
/
v2
/
subscriptions
/
{id}
Get Subscriptions By ID
curl --request GET \
  --url https://api.pagou.ai/v2/subscriptions/{id} \
  --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"
      }
    ]
  }
}

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.

O parâmetro de rota id é o identificador público da assinatura retornado na criação. A resposta inclui um array transactions com todas as transações cobradas sob a assinatura, ordenadas por createdAt decrescente.

Autorizações

Authorization
string
header
obrigatório

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

Parâmetros de caminho

id
string<uuid>
obrigatório

Public subscription id (UUID).

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Resposta

Success

success
boolean
obrigatório
requestId
string
obrigatório
data
object
obrigatório