Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.resellers.setBalance("RESELLER_ID", {
mode: "add",
amount: 50,
});<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->resellers->setBalance('RESELLER_ID', [
'mode' => 'add',
'amount' => 50,
]);
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.resellers.setBalance("RESELLER_ID", mode="add", amount=50)
curl --request POST \
--url https://api.shoply.gg/v1/stores/{storeId}/resellers/{resellerId}/balance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 50,
"note": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/resellers/{resellerId}/balance"
payload := strings.NewReader("{\n \"amount\": 50,\n \"note\": \"<string>\"\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.shoply.gg/v1/stores/{storeId}/resellers/{resellerId}/balance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 50,\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/resellers/{resellerId}/balance")
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 \"amount\": 50,\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"id": "5802fdf5-5c97-40bb-b505-29a900c278e4",
"name": "keydepot.example.com",
"website": "keydepot.example.com",
"email": "team@keydepot.example.com",
"tierId": "53272267-b8de-4f7f-9c0e-00f69122b91e",
"tierName": "Gold",
"tierDiscount": 12.5,
"discount": null,
"paysOff": 12.5,
"balance": 50,
"status": "active",
"members": 2,
"spent30": 0,
"lastOrderAt": null,
"joinedAt": "2026-11-09 11:32:36.157",
"removedAt": null,
"inviteName": null,
"team": [
{
"id": "5b6557ec-e06f-4923-bcc1-65addbaf6234",
"email": "team@keydepot.example.com",
"owner": true,
"permissions": [
"products.view",
"products.buy"
],
"access": {
"buy": true,
"topup": true,
"keys": true,
"api": true
},
"twoFactor": false,
"verified": true,
"lastSeenAt": null,
"joinedAt": "2026-11-09 11:32:36.157"
},
{
"id": "84709052-59e9-4607-b5f8-07bd5f107eac",
"email": "sam@keydepot.example.com",
"owner": false,
"permissions": [],
"access": {
"buy": false,
"topup": false,
"keys": false,
"api": false
},
"twoFactor": false,
"verified": true,
"lastSeenAt": null,
"joinedAt": "2026-11-09 11:32:37.157"
}
],
"catalogue": [
{
"id": "buy",
"label": "Buying",
"permissions": [
{
"key": "products.view",
"label": "View Products",
"about": "The products on Buy, with their prices and stock.",
"needs": []
},
{
"key": "products.buy",
"label": "Buy",
"about": "Buy from the panel with the balance.",
"needs": [
"products.view",
"balance.view"
]
}
]
},
{
"id": "orders",
"label": "Orders",
"permissions": [
{
"key": "orders.view",
"label": "View Orders",
"about": "Every order and what it cost, and the spending and profit on the Overview.",
"needs": []
},
{
"key": "orders.keys",
"label": "See Delivered Keys",
"about": "The keys and items an order handed over. Without it an order says what was bought, not what was delivered.",
"needs": [
"orders.view"
]
}
]
}
]
},
"meta": {
"panel": {
"enabled": true,
"currency": "USD",
"minTopup": 25
},
"history": [
{
"id": 2051,
"kind": "manual",
"amount": 50,
"balanceAfter": 50,
"orderId": null,
"note": "Paid by bank transfer on 1 November",
"actor": "owner@example.com",
"createdAt": "2026-11-09 11:32:36.266"
}
],
"tiers": [
{
"id": "53272267-b8de-4f7f-9c0e-00f69122b91e",
"name": "Gold",
"discount": 12.5,
"resellers": 1,
"spent30": 0
}
],
"limits": {
"members": 2
}
}
}{
"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": {}
}Resellers
Change a reseller's balance
Adds to, takes from or sets a reseller’s balance, which never goes below zero or past 1,000,000. Shoply moves no money: this is for what you settled with them yourself. The note is what they read in their own history. A removed reseller’s balance does not move. Send an Idempotency-Key with this request.
Needs the resellers.balance permission (Change Reseller Balances).
POST
/
stores
/
{storeId}
/
resellers
/
{resellerId}
/
balance
Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.resellers.setBalance("RESELLER_ID", {
mode: "add",
amount: 50,
});<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->resellers->setBalance('RESELLER_ID', [
'mode' => 'add',
'amount' => 50,
]);
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.resellers.setBalance("RESELLER_ID", mode="add", amount=50)
curl --request POST \
--url https://api.shoply.gg/v1/stores/{storeId}/resellers/{resellerId}/balance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 50,
"note": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/resellers/{resellerId}/balance"
payload := strings.NewReader("{\n \"amount\": 50,\n \"note\": \"<string>\"\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.shoply.gg/v1/stores/{storeId}/resellers/{resellerId}/balance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 50,\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/resellers/{resellerId}/balance")
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 \"amount\": 50,\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"id": "5802fdf5-5c97-40bb-b505-29a900c278e4",
"name": "keydepot.example.com",
"website": "keydepot.example.com",
"email": "team@keydepot.example.com",
"tierId": "53272267-b8de-4f7f-9c0e-00f69122b91e",
"tierName": "Gold",
"tierDiscount": 12.5,
"discount": null,
"paysOff": 12.5,
"balance": 50,
"status": "active",
"members": 2,
"spent30": 0,
"lastOrderAt": null,
"joinedAt": "2026-11-09 11:32:36.157",
"removedAt": null,
"inviteName": null,
"team": [
{
"id": "5b6557ec-e06f-4923-bcc1-65addbaf6234",
"email": "team@keydepot.example.com",
"owner": true,
"permissions": [
"products.view",
"products.buy"
],
"access": {
"buy": true,
"topup": true,
"keys": true,
"api": true
},
"twoFactor": false,
"verified": true,
"lastSeenAt": null,
"joinedAt": "2026-11-09 11:32:36.157"
},
{
"id": "84709052-59e9-4607-b5f8-07bd5f107eac",
"email": "sam@keydepot.example.com",
"owner": false,
"permissions": [],
"access": {
"buy": false,
"topup": false,
"keys": false,
"api": false
},
"twoFactor": false,
"verified": true,
"lastSeenAt": null,
"joinedAt": "2026-11-09 11:32:37.157"
}
],
"catalogue": [
{
"id": "buy",
"label": "Buying",
"permissions": [
{
"key": "products.view",
"label": "View Products",
"about": "The products on Buy, with their prices and stock.",
"needs": []
},
{
"key": "products.buy",
"label": "Buy",
"about": "Buy from the panel with the balance.",
"needs": [
"products.view",
"balance.view"
]
}
]
},
{
"id": "orders",
"label": "Orders",
"permissions": [
{
"key": "orders.view",
"label": "View Orders",
"about": "Every order and what it cost, and the spending and profit on the Overview.",
"needs": []
},
{
"key": "orders.keys",
"label": "See Delivered Keys",
"about": "The keys and items an order handed over. Without it an order says what was bought, not what was delivered.",
"needs": [
"orders.view"
]
}
]
}
]
},
"meta": {
"panel": {
"enabled": true,
"currency": "USD",
"minTopup": 25
},
"history": [
{
"id": 2051,
"kind": "manual",
"amount": 50,
"balanceAfter": 50,
"orderId": null,
"note": "Paid by bank transfer on 1 November",
"actor": "owner@example.com",
"createdAt": "2026-11-09 11:32:36.266"
}
],
"tiers": [
{
"id": "53272267-b8de-4f7f-9c0e-00f69122b91e",
"name": "Gold",
"discount": 12.5,
"resellers": 1,
"spent30": 0
}
],
"limits": {
"members": 2
}
}
}{
"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
Headers
Path Parameters
Body
application/json

