We provide few events that can be used via Webhook to interact with subscription flow, see details below:
Subscription events
Here's a list of subscription events you can track using Webhooks
Event | Description |
---|---|
subscription.activated | Triggered when a subscription is successfully activated |
subscription.canceled | Triggered when a subscription is canceled by the user or due to payment failure. |
subscription.completed | Triggered when a subscription reaches its natural end date without being renewed. |
subscription.renewed | Triggered when a subscription is successfully renewed for another billing cycle. |
JSON Example
{
"id": "53371ef0-9071-45b3-bc8e-a047e3442c5a",
"event": "subscription.canceled",
"signature": "391769440cc4770ce457a3002a3ac7caf240469b58bf4fab9bca08a423698eb5",
"object": {
"id": "468d6832-cee2-4798-af82-a5680a3cca13",
"type": "Subscription"
},
"data": {
"id": "468d6832-cee2-4798-af82-a5680a3cca13",
"payer": {
"name": "Jason",
"taxId": "1234567890",
"id": "d9605279-5fb6-4d4e-828d-2abde6c0b1a1"
},
"items": [
{
"id": "0193029d-7f59-745d-9d8d-7d59b0f9752b",
"description": "Item 1",
"createDate": "2024-11-06T17:54:56.473Z",
"amount": 100
}
],
"periods": [
{
"id": "0193029d-7f60-7109-89de-c7af75d1b54b",
"subscriptionId": "0193029d-7f59-745d-9d8d-7a0551a54cc5",
"startDate": "2024-11-06T17:54:56.473Z",
"endDate": "2024-11-07T17:54:55.473Z",
"status": "CREATED"
},
{
"id": "0193029d-7f60-7109-89de-caf4dc804511",
"subscriptionId": "0193029d-7f59-745d-9d8d-7a0551a54cc5",
"startDate": "2024-11-07T17:54:56.473Z",
"endDate": "2024-11-08T17:54:55.473Z",
"status": "CREATED"
}
],
"interval": {
"type": "MONTH",
"intervalCount": 3,
"duration": 12
},
"createDate": "2024-11-06T17:54:56.473Z",
"description": "Test subscription",
"status": "CANCELED",
"method": "RECURRENT_PIX",
"autoRenew": true
}
}
{
"id": "53371ef0-9071-45b3-bc8e-a047e3442c5a",
"event": "subscription.activated",
"signature": "391769440cc4770ce457a3002a3ac7caf240469b58bf4fab9bca08a423698eb5",
"object": {
"id": "468d6832-cee2-4798-af82-a5680a3cca13",
"type": "Subscription"
},
"data": {
"id": "468d6832-cee2-4798-af82-a5680a3cca13",
"payer": {
"name": "Jason",
"taxId": "1234567890",
"id": "d9605279-5fb6-4d4e-828d-2abde6c0b1a1"
},
"items": [
{
"id": "0193029d-7f59-745d-9d8d-7d59b0f9752b",
"description": "Item 1",
"createDate": "2024-11-06T17:54:56.473Z",
"amount": 100
}
],
"periods": [
{
"id": "0193029d-7f60-7109-89de-c7af75d1b54b",
"subscriptionId": "0193029d-7f59-745d-9d8d-7a0551a54cc5",
"startDate": "2024-11-06T17:54:56.473Z",
"endDate": "2024-11-07T17:54:55.473Z",
"status": "CREATED"
},
{
"id": "0193029d-7f60-7109-89de-caf4dc804511",
"subscriptionId": "0193029d-7f59-745d-9d8d-7a0551a54cc5",
"startDate": "2024-11-07T17:54:56.473Z",
"endDate": "2024-11-08T17:54:55.473Z",
"status": "CREATED"
}
],
"interval": {
"type": "MONTH",
"intervalCount": 3,
"duration": 12
},
"createDate": "2024-11-06T17:54:56.473Z",
"description": "Test subscription",
"status": "ACTIVATED",
"method": "RECURRENT_PIX",
"autoRenew": true
}
}
Charge events
Here's a list of charge events you can track using Webhooks
Event | Description |
---|---|
subscription.charge.pending | Triggered when a charge for a subscription is initiated but not yet completed. |
subscription.charge.failed | Triggered when a charge attempt for a subscription fails due to insufficient funds, expired card, or other reasons. |
subscription.charge.scheduled | Triggered when a future charge for a subscription is scheduled. |
subscription.charge.paid | Triggered when a charge for a subscription is successfully completed and payment is received. |