Loyalty Integration
Redeem loyalty points for a reward
Allows a customer to redeem their loyalty points for a specific reward option. This deducts points from their balance and generates a discount code or applies the reward.
What happens:
- Validates customer has enough points
- Deducts points from customer’s balance
- Generates discount code (for discount rewards)
- Records redemption in customer’s history
- Returns discount code or confirmation
Reward Types:
- Discount codes: Generates unique code customer can use at checkout
- Auto-apply discounts: Automatically applied to next order
- Free products: Adds free product to next order
- Free shipping: Waives shipping on next order
Important Notes:
- Points are deducted immediately and cannot be refunded
- Discount codes typically expire after 30 days
- Some rewards have minimum purchase requirements
- Rewards cannot be combined with other discounts (depends on configuration)
Use Cases:
- Customer clicks ‘Redeem’ button in customer portal
- Apply points at checkout
- Redeem points for subscription discount
Authentication: Customer must be logged in via Shopify customer session
POST
/
subscriptions
/
cp
/
api
/
loyalty-integration
/
redeem
Redeem loyalty points for a reward
curl --request POST \
--url https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeemimport requests
url = "https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem';
const options = {method: 'POST'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body"LOYALTY500-ABC123""<string>""<string>"⌘I
Redeem loyalty points for a reward
curl --request POST \
--url https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeemimport requests
url = "https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem';
const options = {method: 'POST'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://www.myshop.com/apps/subscriptions/cp/api/loyalty-integration/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body"LOYALTY500-ABC123""<string>""<string>"