Skip to main content

Cancelled

When a subscription is cancelled by a transaction or request. If the plan has auto-cancellation configured and a Chargeback/RDR is sent to Macropay for a subscription transaction associated with that plan, this event is also sent with cancellation reason as dispute.

EVENT EXAMPLE - CANCELLED SUBSCRIPTION BY TRANSACTION
{
"eventId": "01902a79-663b-7f88-ad98-eedeaddec964",
"eventType": "subscription.cancelled",
"occurredAt": "2024-04-12T11:24:55.637846Z",
"originator": {
"type": "payment",
"data": {
"paymentId": "01902a68-add8-77c2-8e39-b3ebcc603293",
"type": "renewal",
"status": "failed",
"cycle": 2,
"attempt": 1,
"money": {
"amount": 9.98,
"currency": "USD"
},
"transactions": [
{
"transactionId": "9d884812-1d28-4747-aef6-07df6b02a28f",
"transactionCreationDate": "2024-04-12T11:24:55.637846Z",
"transactionStatus": "failed",
"isFallback": false
}
]
}
},
"data": {
"subscriptionId": "01902a79-663b-7f18-ad18-eedeaddec964",
"planId": "95a70946-1b6f-46db-b3ab-b31edc240556",
"status": "cancelled",
"cycle": 4,
"cancellation": {
"reason": "merchant_api",
"detail": "Testing cancellation",
"requestedAt": "2025-02-17T15:07:14.095549Z"
},
"createdAt": "2024-04-12T11:24:55.637846Z",
"modifiedAt": "2024-04-12T11:24:55.637846Z"
}
}
EVENT EXAMPLE - CANCELLED SUBSCRIPTION BY CHARGEBACK/RDR WITH AUTO-CANCEL PLAN
{
"eventId": "0198090e-9768-77e7-b279-3b653a053269",
"eventType": "subscription.cancelled",
"occurredAt": "2025-07-14T13:10:07Z",
"originator": {
"type": "payment_disputed",
"data": {
"paymentId": "019808a5-5ae9-7db4-b99a-9e25f05440aa",
"type": "renewal",
"status": "accepted",
"cycle": 1,
"attempt": 0,
"money": {
"currency": "EUR",
"amount": 30
},
// This example is about one payment with multiple disputes
"transactions": [
{
"transactionId": "0ace71ad-ec94-4cfe-9a4f-75f39eb6fe7d",
"transactionCreationDate": "2025-07-14T13:03:23Z",
"transactionStatus": "success",
"transactionType": "chargeback",
"money": {
"currency": "EUR",
"amount": 30
},
"chargebackInfo": {
"reasonCode": "10.1",
"description": "Chip Liability Shift",
"category": "category"
}
},
{
"transactionId": "427e50fe-cf23-4506-85cc-a5853b923b7a",
"transactionCreationDate": "2025-07-14T13:03:53Z",
"transactionStatus": "success",
"transactionType": "rdr",
"money": {
"currency": "EUR",
"amount": 30
},
"chargebackInfo": {
"reasonCode": "10.1",
"description": "Chip Liability Shift",
"category": "category"
}
},
{
"transactionId": "0ace71ad-ec94-4cfe-9a4f-75f39eb6fe7d",
"transactionCreationDate": "2025-07-14T13:03:23Z",
"transactionStatus": "failed",
"transactionType": "chargeback",
"money": {
"currency": "EUR",
"amount": 30
},
"error": {
"code": "0001",
"message": "Error message"
}
},
]
}
},
"data": {
"subscriptionId": "019808a5-0820-76b6-be77-c2f931886e93",
"planId": "4aa7c1e4-cf8c-4d1c-a6ad-451dd07411ee",
"status": "cancelled",
"cycle": 5,
"cancellation": {
"reason": "dispute",
"requestedAt": "2025-02-17T15:07:14.095549Z"
},
"createdAt": "2025-07-14T13:10:07Z",
"modifiedAt": "2025-07-14T13:10:07Z"
}
}