When a subscription is canceled in your billing system, you need to notify Churn Buster so that a recovery campaign can be ended (if one is active).
You may also want to call this API endpoint when a subscription is skipped, rescheduled, or paused, so that Churn Buster ends the campaign with the assertion that the payment no longer needs to be in a recovery process.
curl -X "POST" "https://api.churnbuster.io/v1/cancellations" \
-H "Content-Type: application/json" \
-u "ACCOUNT_ID:API_KEY" \
-d $'{
"subscription": {
"source": "in_house",
"source_id": "sub_abc123"
},
"customer": {
"source": "in_house",
"source_id": "cus_abc123",
"email": "sarah@example.com",
"properties": {
"first_name": "Sarah",
"last_name": "Doe"
}
}
}
Important note about "source" and "source_id":