When a recurring payment fails in your billing system, notify Churn Buster so that a recovery campaign can be started.
2-step setup
- Add a trigger in your in-house logic, or subscribe to a webhook from your payment processor or subscription management tool, when recurring payments fail. You won't need to make this API request for one-off payments.
- When that trigger occurs or the webhook is received, submit the following API request to Churn Buster.
curl -X "POST" "https://api.churnbuster.io/v1/failed_payments" \
-H "Content-Type: application/json" \
-u "ACCOUNT_ID:API_KEY" \
-d $'{
"payment": {
"source": "in_house",
"source_id": "ch_abc123",
"amount_in_cents": 2900,
"currency": "USD"
},
"customer": {
"source": "in_house",
"source_id": "cus_abc123",
"email": "sarah@example.com",
"properties": {
"first_name": "Sarah",
"last_name": "Doe",
"phone_number": "1111111111"
}
}
}
During development, view test API requests here.
When using the live API you can view recent requests here.
---
Important note about "source" and "source_id":
- Wherever you see source in the API docs, set it to "in_house" or another consistent name that references your in-house subscription management system.
- Wherever you see source_id in the API docs, set it to the ID from within your in-house system, with unique ID's for the Customer, Subscription, Payment Method, etc.