Prerequisites
Before you can send Cello purchase events, make sure you are already:If you are providing discounts to new users, they need to be applied at the point of creating a subscription in your subscription platform
Track purchase events with Webhooks
Depending on which payment gateway you’re using, we offer webhooks for the following:Stripe Webhook
Send events using Stripe Webhook
Chargebee Webhook
Send events using Chargebee Webhook
Track purchase events with Cello API
If you’re not using any of the gateways listed above, you can also send purchase events using Cello APIPOST /events API endpoint. Here are the 2 events you will need to send:
invoice-paid
This event is sent every time a transaction based on the provided subscription is successful or a new user buys a one-time plan, a license or something similar.
invoice-paid event:
Full API referrence for
POST /events API endpoint can be found here.
charge-refunded
This event is sent if the payment of the new user was refunded. When Cello receives this event, it automatically cancels any pending reward for that transaction.
charge-refunded event:
Full API referrence for
POST /events API endpoint can be found here.