Redeem coupons
curl --request POST \
--url https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem \
--header 'Content-Type: application/json' \
--data '[
"<string>"
]'import requests
url = "https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem"
payload = ["<string>"]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(['<string>'])
};
fetch('https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem"
payload := strings.NewReader("[\n \"<string>\"\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem")
.header("Content-Type", "application/json")
.body("[\n \"<string>\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n \"<string>\"\n]"
response = http.request(request)
puts response.read_body{
"couponIds": [
"<string>"
]
}{
"name": "<string>",
"message": "<string>",
"details": null
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Redeem coupons
deprecated
If any of the provided coupons is not found, the error will be returned, but existing coupons will still be redeemed. The error will contain coupons that were not found.
We recommend to always pass idempotency key, but keep it as optional for compatibility. Purchase Id is recommended as idempotency key, and required if async redemption flow is used (using Purchase Load). Idempotency key is required to use Redemption Cancellation feature. Without the idempotency key, multi-redeem coupons will not work properly in many cases.
POST
/
api
/
v1
/
customers
/
{customerId}
/
coupons
/
redeem
Redeem coupons
curl --request POST \
--url https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem \
--header 'Content-Type: application/json' \
--data '[
"<string>"
]'import requests
url = "https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem"
payload = ["<string>"]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(['<string>'])
};
fetch('https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem"
payload := strings.NewReader("[\n \"<string>\"\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem")
.header("Content-Type", "application/json")
.body("[\n \"<string>\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/coupon/api/v1/customers/{customerId}/coupons/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n \"<string>\"\n]"
response = http.request(request)
puts response.read_body{
"couponIds": [
"<string>"
]
}{
"name": "<string>",
"message": "<string>",
"details": null
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Headers
Identifier for request used to determine if it is a retry, or a new request
Path Parameters
Customer Id
Body
application/jsontext/jsonapplication/*+json
List of coupon ids to redeem
Response
OK
Ids of Coupons that were successfully processed
Last modified on August 10, 2026