Upcoming Annual Renewals API Endpoint

  1. 30 days before an annual subscription renews, you can use this API endpoint to notify Churn Buster of the upcoming invoice, and to trigger a branded email to be immediately sent to your customer.
  2. You can preview your sandbox API requests in the debugger here if using your test-mode API key, or here if using your live-mode API key.

Emails will only be sent when using your live-mode API key, and this feature is only available to enterprise accounts who've requested access via the Churn Buster team.

curl -X "POST" "https://api.churnbuster.io/v1/upcoming_annual_renewals" \
    -H "Content-Type: application/json" \
    -u "ACCOUNT_ID:API_KEY" \
    -d $'{
 "invoice": {
   "source": "stripe",
   "source_id": "sub_abc123",
   "amount_in_cents": 4999,
    "currency": "USD",
    "renews_at": 1601586083
 },
 "customer": {
   "source": "stripe",
   "source_id": "cus_abc123",
   "email": "sarah@example.com",
   "properties": {
     "first_name": "Sarah",      
     "last_name": "Doe"
   }
 }
}

A note about invoice.source_id:
It's possible the upcoming invoice doesn't yet have an ID assigned. In that case, you can use the Subscription ID as the invoice.source_id.

A note about source  and source_id :
In most cases, you should use IDs from your payment processor. If you're using Stripe, source would be "stripe" and source_id would be "cus_sampleID".

If that's not possible, you can use IDs from your in-house billing system. source would be "in_house" and source_id  would be "yourInternalId".

IDs should be unique to customers, subscriptions, invoices, payment methods, and payments.