Revoke buyer access
curl --request POST \
--url https://api.salesive.com/api/v1/digital-access/{id}/revoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Chargeback"
}
'import requests
url = "https://api.salesive.com/api/v1/digital-access/{id}/revoke"
payload = { "reason": "Chargeback" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Chargeback'})
};
fetch('https://api.salesive.com/api/v1/digital-access/{id}/revoke', 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.salesive.com/api/v1/digital-access/{id}/revoke",
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([
'reason' => 'Chargeback'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.salesive.com/api/v1/digital-access/{id}/revoke"
payload := strings.NewReader("{\n \"reason\": \"Chargeback\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.salesive.com/api/v1/digital-access/{id}/revoke")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Chargeback\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/digital-access/{id}/revoke")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Chargeback\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Access revoked",
"data": {
"_id": "6702d3f0e1b3a40012cd3001",
"email": "ada@example.com",
"user": "66f0aa11e1b3a40012ef0001",
"scope": "product",
"product": {
"_id": "6702c1a4e1b3a40012cd2001",
"name": "The Lagos Cookbook"
},
"kind": "pass",
"status": "revoked",
"source": "granted",
"startsAt": "2026-10-12T08:00:00.000Z",
"accessUntil": "2026-11-11T08:00:00.000Z",
"daysLeft": null,
"autoRenew": {
"enabled": false,
"cardLast4": null,
"cardBrand": null
},
"revokedAt": "2026-10-13T10:00:00.000Z",
"revokedReason": "Chargeback",
"createdAt": "2026-10-12T08:00:00.000Z",
"updatedAt": "2026-10-12T08:00:00.000Z"
}
}{
"status": 400,
"success": false,
"message": "A one-time price is required",
"data": {}
}{
"status": 401,
"success": false,
"message": "App token expired or invalid.",
"data": {}
}{
"status": 403,
"success": false,
"message": "This app is missing the required permission(s): WRITE_INVENTORY",
"data": {}
}{
"status": 404,
"success": false,
"message": "Product not found",
"data": {}
}Digital access
Revoke buyer access
Removes a buyer’s access to a product or the all-access pass.
POST
/
digital-access
/
{id}
/
revoke
Revoke buyer access
curl --request POST \
--url https://api.salesive.com/api/v1/digital-access/{id}/revoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Chargeback"
}
'import requests
url = "https://api.salesive.com/api/v1/digital-access/{id}/revoke"
payload = { "reason": "Chargeback" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Chargeback'})
};
fetch('https://api.salesive.com/api/v1/digital-access/{id}/revoke', 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.salesive.com/api/v1/digital-access/{id}/revoke",
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([
'reason' => 'Chargeback'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.salesive.com/api/v1/digital-access/{id}/revoke"
payload := strings.NewReader("{\n \"reason\": \"Chargeback\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.salesive.com/api/v1/digital-access/{id}/revoke")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Chargeback\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/digital-access/{id}/revoke")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Chargeback\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Access revoked",
"data": {
"_id": "6702d3f0e1b3a40012cd3001",
"email": "ada@example.com",
"user": "66f0aa11e1b3a40012ef0001",
"scope": "product",
"product": {
"_id": "6702c1a4e1b3a40012cd2001",
"name": "The Lagos Cookbook"
},
"kind": "pass",
"status": "revoked",
"source": "granted",
"startsAt": "2026-10-12T08:00:00.000Z",
"accessUntil": "2026-11-11T08:00:00.000Z",
"daysLeft": null,
"autoRenew": {
"enabled": false,
"cardLast4": null,
"cardBrand": null
},
"revokedAt": "2026-10-13T10:00:00.000Z",
"revokedReason": "Chargeback",
"createdAt": "2026-10-12T08:00:00.000Z",
"updatedAt": "2026-10-12T08:00:00.000Z"
}
}{
"status": 400,
"success": false,
"message": "A one-time price is required",
"data": {}
}{
"status": 401,
"success": false,
"message": "App token expired or invalid.",
"data": {}
}{
"status": 403,
"success": false,
"message": "This app is missing the required permission(s): WRITE_INVENTORY",
"data": {}
}{
"status": 404,
"success": false,
"message": "Product not found",
"data": {}
}Revokes a buyer’s access. Download links stop working and the title leaves the buyer’s library. The optional
reason is stored with the record. Revoking twice keeps the first reason and time. Granting the same access again reactivates the record. Requires the WRITE_INVENTORY scope.
These endpoints only work on a store whose type is
digital. On any other store they return 403 with This is only available on digital stores. See Digital stores.curl -X POST https://api.salesive.com/api/v1/digital-access/6702d3f0e1b3a40012cd3001/revoke \
-H "Authorization: Bearer app_<your-app-access-token>" \
-H "Content-Type: application/json" \
-d '{"reason":"Chargeback"}'
Authorizations
Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side , never send a shop id.
Path Parameters
The access record's ObjectId.
Body
application/json
Why access was removed. Optional.
Maximum string length:
500Response
Revoke buyer access: success.
Example:
200
Example:
true
Example:
"Access revoked"
One buyer's access record. There is one record per buyer, product (or the all-access pass) and kind, so buying a pass again extends the same record.
Show child attributes
Show child attributes
Example:
{
"_id": "6702d3f0e1b3a40012cd3001",
"email": "ada@example.com",
"user": "66f0aa11e1b3a40012ef0001",
"scope": "product",
"product": {
"_id": "6702c1a4e1b3a40012cd2001",
"name": "The Lagos Cookbook"
},
"kind": "pass",
"status": "revoked",
"source": "granted",
"startsAt": "2026-10-12T08:00:00.000Z",
"accessUntil": "2026-11-11T08:00:00.000Z",
"daysLeft": null,
"autoRenew": {
"enabled": false,
"cardLast4": null,
"cardBrand": null
},
"revokedAt": "2026-10-13T10:00:00.000Z",
"revokedReason": "Chargeback",
"createdAt": "2026-10-12T08:00:00.000Z",
"updatedAt": "2026-10-12T08:00:00.000Z"
}
Was this page helpful?

