smile-io / code-samples

A repo to help developers get started with Smile.io
11 stars 5 forks source link

purchasePoints #18

Closed maxisam closed 7 years ago

maxisam commented 7 years ago

In the document, there is a way to purchase points directly.

However, I can't find the corresponding API. I only see purchasePointsProduct under SweetTooth object.

Is it possible to have this kinda API?

kingscott commented 7 years ago

Hey @maxisam, thanks for stopping by! Sorry for the delayed response.

There is no way to just purchase points directly.

The SweetTooth.purchasePointsProducts() method would be used when you are buying a PointsProduct (on behalf of a logged in customer), as shown in the documentation you linked. These are rewards that customers can redeem with points they have earned on your store.

What it sounds like you're looking for is our custom Activity API. Custom Activities are ways to give a customer points for any action of your choice.

Let me know if you have any more questions!