Pay from Balance
curl --request POST \
--url https://api.sellauth.com/v1/customer-dashboard/instant-balance/{unique_id}/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quoted_total_usd": 14.99
}
'import requests
url = "https://api.sellauth.com/v1/customer-dashboard/instant-balance/{unique_id}/pay"
payload = { "quoted_total_usd": 14.99 }
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({quoted_total_usd: 14.99})
};
fetch('https://api.sellauth.com/v1/customer-dashboard/instant-balance/{unique_id}/pay', 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/customer-dashboard/instant-balance/{unique_id}/pay",
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([
'quoted_total_usd' => 14.99
]),
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/customer-dashboard/instant-balance/{unique_id}/pay"
payload := strings.NewReader("{\n \"quoted_total_usd\": 14.99\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/customer-dashboard/instant-balance/{unique_id}/pay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quoted_total_usd\": 14.99\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sellauth.com/v1/customer-dashboard/instant-balance/{unique_id}/pay")
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 \"quoted_total_usd\": 14.99\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"url": "https://pay.sellauth.com/invoice/9f2b3c4d5e6f7"
}{
"message": "Insufficient balance."
}{
"message": "You can only pay with your own customer balance."
}{
"message": "No query results."
}{
"message": "The total changed since it was shown to you. Review the new total and try again."
}{
"message": "This order has already been submitted."
}Instant Balance
Pay from Balance
Charges a quoted invoice against the customer’s store credit and completes the order. quoted_total_usd must match the price_usd the quote returned, so a price that moved in between fails instead of overcharging.
POST
/
v1
/
customer-dashboard
/
instant-balance
/
{unique_id}
/
pay
Pay from Balance
curl --request POST \
--url https://api.sellauth.com/v1/customer-dashboard/instant-balance/{unique_id}/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quoted_total_usd": 14.99
}
'import requests
url = "https://api.sellauth.com/v1/customer-dashboard/instant-balance/{unique_id}/pay"
payload = { "quoted_total_usd": 14.99 }
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({quoted_total_usd: 14.99})
};
fetch('https://api.sellauth.com/v1/customer-dashboard/instant-balance/{unique_id}/pay', 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/customer-dashboard/instant-balance/{unique_id}/pay",
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([
'quoted_total_usd' => 14.99
]),
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/customer-dashboard/instant-balance/{unique_id}/pay"
payload := strings.NewReader("{\n \"quoted_total_usd\": 14.99\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/customer-dashboard/instant-balance/{unique_id}/pay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quoted_total_usd\": 14.99\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sellauth.com/v1/customer-dashboard/instant-balance/{unique_id}/pay")
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 \"quoted_total_usd\": 14.99\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"url": "https://pay.sellauth.com/invoice/9f2b3c4d5e6f7"
}{
"message": "Insufficient balance."
}{
"message": "You can only pay with your own customer balance."
}{
"message": "No query results."
}{
"message": "The total changed since it was shown to you. Review the new total and try again."
}{
"message": "This order has already been submitted."
}Authorizations
Authenticate with a customer token, minted server-to-server with POST /v1/shops/{shopId}/customers/{customerId}/token and sent as a Bearer token. Reseller API keys are rejected with a 403 here.
Path Parameters
The unique_id returned by the quote.
Body
application/json
The price_usd from the quote.
Example:
14.99