Postman collection of the APIs

Nector Custom Checkout APIs (Prod).postman_collection.json

The idea is to allow users with loyalty coins to redeem their loyalty coins and purchase at discounted rate directly at checkout instead of generating a coupon.

Initial Setup:

  1. Make sure the custom checkout integration is initialized from here: https://merchant.nector.io/integration?identifier=custom_checkout
  2. Setup the redemption rule
  3. The secret webhook id can be found in the above link after the integration is initialized.

Here is a simple API that you can use to get the eligible discount for a customer based on the rules defined by you and the customer’s available coins.

<aside> ⚠️ Don’t call this API from frontend

</aside>

Request

POST - platform.nector.io/api/open/integrations/customcheckoutwebhook/:webhook_id

{
customer_id: "this needs to be the prefixed customer id (Ex. custom_website-10001), one of customer_id or mobile is required",
mobile: "this is 10 digit mobile number, one of customer_id or mobile is required",
action: "list, perform, revert",
amount: "this is final cart amount based on which the discount will be calculated"
}

Response

{
	meta: {
		... other props
	}
	data: {
		... other props
	}
}

Explanation: Call this API with action = ‘list’ to get the text how much discount can be applied.