Pular para o conteúdo principal
PATCH
/
v2
/
subscriptions
/
{id}
Patch Subscriptions By ID
curl --request PATCH \
  --url https://api.pagou.ai/v2/subscriptions/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {},
  "retry_offsets_days": [
    15
  ]
}
'
{
  "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.

Apenas metadata, failure_policy e retry_offsets_days são editáveis. Outros campos (intervalo, valor, moeda, cartão) são imutáveis — crie uma nova assinatura para alterá-los. Um webhook subscription.updated é disparado quando a assinatura é alterada.

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

Corpo

application/json
metadata
object
failure_policy
enum<string>
Opções disponíveis:
immediate_cancel,
retry_then_cancel
retry_offsets_days
integer[]
Required array length: 1 - 10 elements
Intervalo obrigatório: 1 <= x <= 30

Resposta

Success

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