> ## Documentation Index
> Fetch the complete documentation index at: https://cakto-dece4a15.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagamento Recorrente

> Webhook disparado quando uma cobrança de assinatura é aprovada.

## Evento

<ParamField body="event" type="string">
  `purchase_approved`
</ParamField>

<Info>
  Pagamentos recorrentes usam o mesmo evento `purchase_approved`, mas incluem o objeto `subscription` com detalhes da assinatura. Use o campo `product.type` (`subscription`) para distinguir.
</Info>

## Exemplo de payload

```json theme={null}
{
  "secret": "8402b43f-c839-4090-bbd1-186725d185c7",
  "event": "purchase_approved",
  "data": {
    "id": "1f1c81d2-088a-412d-8bb7-3d5269d64f58",
    "refId": "6HngVo6",
    "customer": {
      "name": "Tulio sabino",
      "birthDate": null,
      "email": "tokipi8246@gamebcs.com",
      "phone": "5534991462388",
      "docNumber": "59089477098"
    },
    "affiliate": "",
    "offer": {
      "id": "jbwjmis",
      "name": "Subscription [Stg]",
      "price": 5
    },
    "offer_type": "main",
    "product": {
      "name": "Subscription [Stg]",
      "id": "f947c21c-d8f0-41a1-a0a6-fede9f27b3b7",
      "short_id": "6dRMZ6z",
      "supportEmail": "teste@teste.com",
      "type": "subscription",
      "invoiceDescription": ""
    },
    "parent_order": "PEtfqq3",
    "subscription": {
      "id": "d464132a-fcfa-4693-a6aa-a99483f06740",
      "status": "active",
      "current_period": 8,
      "recurrence_period": 2,
      "quantity_recurrences": -1,
      "trial_days": 0,
      "max_retries": 2,
      "amount": "5.00",
      "retry_interval": 2,
      "paid_payments_quantity": 8,
      "paymentMethod": "credit_card",
      "next_payment_date": "2025-04-08T14:43:39.724743-03:00",
      "createdAt": "2025-04-08T14:41:42.247628-03:00",
      "canceledAt": null
    },
    "subscription_period": 2,
    "status": "paid",
    "amount": 5,
    "commissions": [
      {
        "user": "tulio.ax@hotmail.com",
        "totalAmount": 2.36,
        "percentage": 100,
        "type": "producer"
      }
    ],
    "fees": 2.64,
    "paymentMethod": "credit_card",
    "paymentMethodName": "Cartão de Crédito",
    "installments": 1,
    "paidAt": "2025-04-08T14:43:43.575271-03:00",
    "createdAt": "2025-04-08T14:43:43.022292-03:00",
    "card": {
      "holderName": "Tulio sabino",
      "lastDigits": "4242",
      "brand": null
    }
  }
}
```

## Campo subscription

O objeto `subscription` está presente apenas em eventos de produtos recorrentes. Consulte a [referência completa dos campos de assinatura](/webhooks/campos-assinatura).
