Create Invoice
curl --request POST \
--url https://api.sellauth.com/v1/reseller/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"product_id": 1,
"variant_id": 1,
"quantity": 1
}
],
"coupon": "REPLACE-1790223704085"
}
'import requests
url = "https://api.sellauth.com/v1/reseller/invoices"
payload = {
"items": [
{
"product_id": 1,
"variant_id": 1,
"quantity": 1
}
],
"coupon": "REPLACE-1790223704085"
}
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({
items: [{product_id: 1, variant_id: 1, quantity: 1}],
coupon: 'REPLACE-1790223704085'
})
};
fetch('https://api.sellauth.com/v1/reseller/invoices', 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.sellauth.com/v1/reseller/invoices",
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([
'items' => [
[
'product_id' => 1,
'variant_id' => 1,
'quantity' => 1
]
],
'coupon' => 'REPLACE-1790223704085'
]),
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.sellauth.com/v1/reseller/invoices"
payload := strings.NewReader("{\n \"items\": [\n {\n \"product_id\": 1,\n \"variant_id\": 1,\n \"quantity\": 1\n }\n ],\n \"coupon\": \"REPLACE-1790223704085\"\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.sellauth.com/v1/reseller/invoices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"product_id\": 1,\n \"variant_id\": 1,\n \"quantity\": 1\n }\n ],\n \"coupon\": \"REPLACE-1790223704085\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sellauth.com/v1/reseller/invoices")
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 \"items\": [\n {\n \"product_id\": 1,\n \"variant_id\": 1,\n \"quantity\": 1\n }\n ],\n \"coupon\": \"REPLACE-1790223704085\"\n}"
response = http.request(request)
puts response.read_body{
"id": 2,
"unique_id": "9f2b3c4d5e6f7",
"status": "completed",
"fulfillment_status": null,
"currency": "USD",
"total": 9,
"total_usd": 9,
"coupon": null,
"coupon_discount": 0,
"source": "api",
"url": "https://pay.sellauth.com/invoice/9f2b3c4d5e6f7",
"created_at": "2026-07-23T12:00:00.000000Z",
"completed_at": "2026-07-23T12:00:01.000000Z",
"items": [
{
"product_id": 1,
"product_name": "Example Product",
"variant_id": 1,
"variant_name": "1 Month",
"quantity": 1,
"status": "completed",
"total_price": 9,
"total_price_usd": 9,
"reseller_discount": 1,
"coupon_discount": 0,
"delivered": [
"EXAMPLE-KEY-1"
]
}
]
}{
"message": "Insufficient reseller balance. Balance: $1.00, order total: $9.00. Top up your balance on the shop's customer panel."
}{
"message": "This request is still being processed. Retry shortly."
}{
"message": "Product \"Example Product\" has a mismatched currency. Order products with different currencies separately."
}Invoices
Create Invoice
Creates an invoice charged to your reseller balance and delivered from stock. Serial and dynamic deliverables are returned synchronously; check pending items via Get Invoice. Every item in one invoice must share the same currency, so products priced in different currencies have to be ordered as separate invoices. Optionally send an Idempotency-Key header (unique per invoice, reused on retries): if a request times out, retrying with the same key returns the original invoice instead of charging you twice.
POST
/
v1
/
reseller
/
invoices
Create Invoice
curl --request POST \
--url https://api.sellauth.com/v1/reseller/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"product_id": 1,
"variant_id": 1,
"quantity": 1
}
],
"coupon": "REPLACE-1790223704085"
}
'import requests
url = "https://api.sellauth.com/v1/reseller/invoices"
payload = {
"items": [
{
"product_id": 1,
"variant_id": 1,
"quantity": 1
}
],
"coupon": "REPLACE-1790223704085"
}
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({
items: [{product_id: 1, variant_id: 1, quantity: 1}],
coupon: 'REPLACE-1790223704085'
})
};
fetch('https://api.sellauth.com/v1/reseller/invoices', 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.sellauth.com/v1/reseller/invoices",
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([
'items' => [
[
'product_id' => 1,
'variant_id' => 1,
'quantity' => 1
]
],
'coupon' => 'REPLACE-1790223704085'
]),
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.sellauth.com/v1/reseller/invoices"
payload := strings.NewReader("{\n \"items\": [\n {\n \"product_id\": 1,\n \"variant_id\": 1,\n \"quantity\": 1\n }\n ],\n \"coupon\": \"REPLACE-1790223704085\"\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.sellauth.com/v1/reseller/invoices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"product_id\": 1,\n \"variant_id\": 1,\n \"quantity\": 1\n }\n ],\n \"coupon\": \"REPLACE-1790223704085\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sellauth.com/v1/reseller/invoices")
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 \"items\": [\n {\n \"product_id\": 1,\n \"variant_id\": 1,\n \"quantity\": 1\n }\n ],\n \"coupon\": \"REPLACE-1790223704085\"\n}"
response = http.request(request)
puts response.read_body{
"id": 2,
"unique_id": "9f2b3c4d5e6f7",
"status": "completed",
"fulfillment_status": null,
"currency": "USD",
"total": 9,
"total_usd": 9,
"coupon": null,
"coupon_discount": 0,
"source": "api",
"url": "https://pay.sellauth.com/invoice/9f2b3c4d5e6f7",
"created_at": "2026-07-23T12:00:00.000000Z",
"completed_at": "2026-07-23T12:00:01.000000Z",
"items": [
{
"product_id": 1,
"product_name": "Example Product",
"variant_id": 1,
"variant_name": "1 Month",
"quantity": 1,
"status": "completed",
"total_price": 9,
"total_price_usd": 9,
"reseller_discount": 1,
"coupon_discount": 0,
"delivered": [
"EXAMPLE-KEY-1"
]
}
]
}{
"message": "Insufficient reseller balance. Balance: $1.00, order total: $9.00. Top up your balance on the shop's customer panel."
}{
"message": "This request is still being processed. Retry shortly."
}{
"message": "Product \"Example Product\" has a mismatched currency. Order products with different currencies separately."
}Authorizations
Body
application/json