Learn how to track purchase events with Cello
payload.newUserId
POST /events
API endpoint. Here are the 2 events you will need to send:
invoice-paid
invoice-paid
event:
Property | Required | Description |
---|---|---|
ucc | yes | A referral code (ucc ) identifying the referrer. You can retrieve this code using attribution script getUcc () method, you have installed as a prerequisite to this guide |
newUserId | yes | A unique ID in your system, identifying the new user who just signed up. Can also be organization ID, if your referrers can refer organizations and you want to reward them for organization account expansion |
price | yes | Amount on the invoice |
currency | yes | Currency of the amount |
newUser.id | yes | A unique ID of the new user (not the organization, if you are rewarding on organization level). This should be the same ID (productUserId ) you will use to boot the Referral component, when this user logs into your app |
newUser.email | yes | New user email |
newUser.organizationId | no | Organization ID. Add this field if your referrers can refer an organization and you want to reward them for organization account expansion |
event.trigger | yes | invoice-paid |
event.timestamp | yes | Event timestamp in ISO8601 format |
subscription.invoiceId | yes | ID of the invoice that was paid or refunded |
subscription.interval | yes | Interval of the payment. Available options: one-time , monthly , quarterly , yearly , biennial , triennial , lifetime , bi-weekly , semi-annual |
subscription.productKey | yes | Name of the product or plan purchased |
POST /events
API endpoint can be found here.
charge-refunded
charge-refunded
event:
Property | Required | Description |
---|---|---|
ucc | yes | A referral code (ucc ) identifying the referrer. You can retrieve this code using attribution script getUcc () method, you have installed as a prerequisite to this guide |
newUserId | yes | A unique ID in your system, identifying the new user who just signed up. Can also be organization ID, if your referrers can refer organizations and you want to reward them for organization account expansion |
price | yes | Amount refunded |
currency | yes | Currency of the amount |
newUser.id | yes | A unique ID of the new user (not the organization, if you are rewarding on organization level). This should be the same ID (productUserId ) you will use to boot the Referral component, when this user logs into your app |
newUser.email | yes | New user email |
newUser.organizationId | no | Organization ID. Add this field if your referrers can refer an organization and you want to reward them for organization account expansion |
event.trigger | yes | charge-refunded |
event.timestamp | yes | Event timestamp in ISO8601 format |
subscription.invoiceId | yes | ID of the invoice that was paid or refunded |
POST /events
API endpoint can be found here.