Node.js
import { ShoplyCustomer } from "@shoplygg/node";
const buyer = new ShoplyCustomer({ storeId: "YOUR_STORE_ID", token });
const result = await buyer.affiliate.payouts.cancel("PAYOUT_ID");<?php
require 'vendor/autoload.php';
$buyer = new Shoply\Customer(['storeId' => 'YOUR_STORE_ID', 'token' => $token]);
$result = $buyer->affiliate->payouts->cancel('PAYOUT_ID');
import shoply
buyer = shoply.Customer("YOUR_STORE_ID", token=token)
result = buyer.affiliate.payouts.cancel("PAYOUT_ID")
curl --request DELETE \
--url https://api.shoply.gg/v1/stores/{storeId}/customer/affiliate/payouts/{payoutId} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/customer/affiliate/payouts/{payoutId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.shoply.gg/v1/stores/{storeId}/customer/affiliate/payouts/{payoutId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/customer/affiliate/payouts/{payoutId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"member": true,
"canJoin": false,
"offered": {
"commission": 10,
"discount": 5
},
"active": true,
"code": "ada-keys",
"link": "https://northwind.myshoply.gg/?ref=ada-keys",
"linkStart": "https://northwind.myshoply.gg/?ref=",
"commission": 20,
"discount": 5,
"clicks": 0,
"orders": 0,
"earned": {
"amount": 0,
"currencyCode": "USD"
},
"balance": {
"amount": 12.5,
"currencyCode": "USD"
},
"paidOut": {
"amount": 0,
"currencyCode": "USD"
},
"can": {
"editLink": true,
"toStore": true,
"payouts": true
},
"payout": null,
"payouts": [
{
"id": "76868d15-1286-4aa1-9181-1034971e5bf9",
"amount": 5,
"currencyCode": "USD",
"details": "PayPal: ada@example.com",
"status": "cancelled",
"note": "",
"dateRequested": "2026-10-22T16:20:19Z",
"dateResolved": "2026-10-22T16:20:19Z"
}
],
"changes": [
{
"id": "b62b44da-fd66-4e5c-a1e0-4c7fa260fbd6",
"kind": "payout_back",
"amount": 5,
"balanceAfter": 12.5,
"currencyCode": "USD",
"dateCreated": "2026-10-22T16:20:19Z"
},
{
"id": "22405d5e-68b8-45a2-88c7-87cd881975c1",
"kind": "payout",
"amount": -5,
"balanceAfter": 7.5,
"currencyCode": "USD",
"dateCreated": "2026-10-22T16:20:19Z"
}
],
"limits": {
"codeMin": 2,
"codeMax": 40,
"details": 300
}
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Customer API
Take back a payout request
Takes back a request the seller has not answered, and puts its amount back on the affiliate balance. One already answered is payout_answered.
Needs the buyer’s token: Authorization: Bearer shoply_ct_..., from Sign in with the code.
It is counted for the buyer’s token: 30 changes in ten minutes.
DELETE
/
stores
/
{storeId}
/
customer
/
affiliate
/
payouts
/
{payoutId}
Node.js
import { ShoplyCustomer } from "@shoplygg/node";
const buyer = new ShoplyCustomer({ storeId: "YOUR_STORE_ID", token });
const result = await buyer.affiliate.payouts.cancel("PAYOUT_ID");<?php
require 'vendor/autoload.php';
$buyer = new Shoply\Customer(['storeId' => 'YOUR_STORE_ID', 'token' => $token]);
$result = $buyer->affiliate->payouts->cancel('PAYOUT_ID');
import shoply
buyer = shoply.Customer("YOUR_STORE_ID", token=token)
result = buyer.affiliate.payouts.cancel("PAYOUT_ID")
curl --request DELETE \
--url https://api.shoply.gg/v1/stores/{storeId}/customer/affiliate/payouts/{payoutId} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/customer/affiliate/payouts/{payoutId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.shoply.gg/v1/stores/{storeId}/customer/affiliate/payouts/{payoutId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/customer/affiliate/payouts/{payoutId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"member": true,
"canJoin": false,
"offered": {
"commission": 10,
"discount": 5
},
"active": true,
"code": "ada-keys",
"link": "https://northwind.myshoply.gg/?ref=ada-keys",
"linkStart": "https://northwind.myshoply.gg/?ref=",
"commission": 20,
"discount": 5,
"clicks": 0,
"orders": 0,
"earned": {
"amount": 0,
"currencyCode": "USD"
},
"balance": {
"amount": 12.5,
"currencyCode": "USD"
},
"paidOut": {
"amount": 0,
"currencyCode": "USD"
},
"can": {
"editLink": true,
"toStore": true,
"payouts": true
},
"payout": null,
"payouts": [
{
"id": "76868d15-1286-4aa1-9181-1034971e5bf9",
"amount": 5,
"currencyCode": "USD",
"details": "PayPal: ada@example.com",
"status": "cancelled",
"note": "",
"dateRequested": "2026-10-22T16:20:19Z",
"dateResolved": "2026-10-22T16:20:19Z"
}
],
"changes": [
{
"id": "b62b44da-fd66-4e5c-a1e0-4c7fa260fbd6",
"kind": "payout_back",
"amount": 5,
"balanceAfter": 12.5,
"currencyCode": "USD",
"dateCreated": "2026-10-22T16:20:19Z"
},
{
"id": "22405d5e-68b8-45a2-88c7-87cd881975c1",
"kind": "payout",
"amount": -5,
"balanceAfter": 7.5,
"currencyCode": "USD",
"dateCreated": "2026-10-22T16:20:19Z"
}
],
"limits": {
"codeMin": 2,
"codeMax": 40,
"details": 300
}
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Authorizations
A buyer's token, from Sign in with the code: Authorization: Bearer shoply_ct_.... It reaches that buyer's own orders at one store, and no route that takes a key.
Path Parameters
The store's ID, from Settings, General in its dashboard. It is not a secret: a page may show it.
The waiting request, payout on the affiliate page.

