Checkout Checkbox Redemption

Single step redemption for the checkout checkbox flow, i.e. a "Use my coins" checkbox on the cart or checkout. The discount is always the maximum the customer can get for the cart, there is no step selection.

  • The offer used is the published or active offer with classification action_checkoutcheckbox. If the customer has a membership (or else a tier) and an offer restricted to that membership (or tier) exists, that offer is used instead of the universal one
  • The discount is capped by the offer fiat_range, the customer's coin balance, the cart amount and the minimum cart configured on the offer
  • Requires the Checkout Checkbox action to be active on the dashboard, otherwise the API fails
  • Calls for the same customer are serialised, so concurrent calls from multiple tabs are safe

Actions

  • list: returns points_balance and a promotions entry describing the discount that can be applied (coin_value to deduct, fiat_value discount, delta_amount payable after discount). If a valid coupon was already generated for this cart amount, it returns that coupon in coupons instead
  • perform: generates the discount coupon and returns it in coupons. Use coupons[0].value as the discount code on the checkout (it starts with neccbox). The coins are deducted when the order is placed with the code, not at generation. The coupon expires in 24 hours if unused. Calling perform again with the same amount returns the existing coupon, calling it with a different amount cancels the old coupon and generates a new one
  • revert: cancels the coupon generated earlier (status becomes unavailable and the discount code is removed from the store). Call this when the customer unticks the checkbox or removes the code

Errors are returned with a message such as "No discount is available" when the cart is below the minimum cart, the customer has no coins, or the offer is not configured.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string

(One of leadid, customer_id is required, unless x-leadtoken header is passed) (This needs to be leads id value)

string

(One of lead_id, customer_id is required, unless x-leadtoken header is passed) (Minimum length is 8) (Maximum length is 128) (This needs to be leads customer_id value)

string
enum
required

(Required) (This can only be one of list,perform,revert) (list returns the discount the customer can get for this cart, perform generates the discount coupon, revert cancels the coupon generated earlier)

Allowed:
number
required

(Required) (Minimum is 1) (This needs to be the cart total amount in your store currency, before the loyalty discount)

Headers
string
enum
required

(Required) (This can only be one of mobile,web) (web for browsers and servers, mobile for native apps)

Allowed:
string
required

(Required) (This needs to be your apikey)

string
required

(Required) (This needs to be your workspaceid)

string

(Required when using a storefront read only api key, not needed with a server api key) (This needs to be the lead_token of the customer, a 1 hour JWT returned by Get User via the x-leaddigest flow or generated on your server with your api signing secret) (When passed, the customer is taken from the token and any lead_id or customer_id in the request is ignored) (Learn more about authentication here)

Responses

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json