Subscriptions
Remove Promotion from Subscription
Ends the active promotion on a subscription. The next charge is the full price, and the promotion ends with the reason REMOVED
DELETE
/
subscriptions
/
{subscription_id}
/
promotion
Remove Promotion from Subscription
curl --request DELETE \
--url https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion', 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://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <api-key>"
],
]);
$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://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"status": "ACTIVE",
"promotion": {
"id": "8f2d6c1e-3b7a-4c55-9a1e-2f4d8b7c6a10",
"name": "Welcome 20% x3",
"discount": {
"type": "PERCENTAGE",
"value": 20
},
"cycles": {
"total": 3,
"used": 1,
"remaining": 2
},
"on_pause": "KEEP",
"status": "ENDED",
"applied_at": "2026-11-02T14:00:00Z",
"ended_at": "2026-11-10T09:00:00Z",
"end_reason": "REMOVED"
}
}{
"code": "SUBSCRIPTION_PROMOTION_NOT_ACTIVE",
"messages": [
"The subscription has no active promotion."
],
"current_status": "COMPLETED"
}Ends the active promotion on a subscription. The promotion’s
See Subscription promotion error codes for every code.
status becomes ENDED and its end_reason becomes REMOVED. The next charge is the full price.
To give the subscription a discount again, apply a promotion. The new copy starts at 0 cycles used.
Errors
| HTTP | code | When |
|---|---|---|
409 | SUBSCRIPTION_PROMOTION_NOT_ACTIVE | The subscription has no active promotion. The response includes current_status: the status of its latest promotion, COMPLETED or ENDED, or null if the subscription never had one. |
Authorizations
Response
- The subscription, with its promotion in status
ENDEDandend_reasonREMOVED.
The copy of the promotion stored on the subscription. See The Subscription Promotion Object.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Remove Promotion from Subscription
curl --request DELETE \
--url https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion', 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://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <api-key>"
],
]);
$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://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/subscriptions/{subscription_id}/promotion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"status": "ACTIVE",
"promotion": {
"id": "8f2d6c1e-3b7a-4c55-9a1e-2f4d8b7c6a10",
"name": "Welcome 20% x3",
"discount": {
"type": "PERCENTAGE",
"value": 20
},
"cycles": {
"total": 3,
"used": 1,
"remaining": 2
},
"on_pause": "KEEP",
"status": "ENDED",
"applied_at": "2026-11-02T14:00:00Z",
"ended_at": "2026-11-10T09:00:00Z",
"end_reason": "REMOVED"
}
}{
"code": "SUBSCRIPTION_PROMOTION_NOT_ACTIVE",
"messages": [
"The subscription has no active promotion."
],
"current_status": "COMPLETED"
}