Skip to main content
JavaScript
This method is deprecated and will be removed on August 1, 2026. Specify includeSdk: true when initializing Smile UI, and then use the Smile.pointsProducts.purchase() method from the JavaScript SDK instead.
This method exchanges the currently logged-in customer’s points for a specified reward.

Parameters

id
integer
required
The unique identifier of the points product to be purchased.
options
object

Returns

This method returns a Promise that:
  • On success, resolves with a points purchase object.
  • On failure, resolves with an error object.
If the method is improperly invoked (e.g. missing required parameters) or no customer is currently logged-in, the Promise will be rejected.