Create Invoice
curl --request POST \
--url https://payments.shakesco.com/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>",
"items": [
{
"description": "<string>",
"unit": 123,
"price": 123,
"image": "<string>"
}
],
"payer_email": "<string>",
"payer_name": "<string>",
"tax_rate": 123,
"store_item_ids": [
{
"id": 123,
"quantity": 123
}
],
"asset": "<string>",
"redirect_url": "<string>"
}
'import requests
url = "https://payments.shakesco.com/invoices"
payload = {
"currency": "<string>",
"items": [
{
"description": "<string>",
"unit": 123,
"price": 123,
"image": "<string>"
}
],
"payer_email": "<string>",
"payer_name": "<string>",
"tax_rate": 123,
"store_item_ids": [
{
"id": 123,
"quantity": 123
}
],
"asset": "<string>",
"redirect_url": "<string>"
}
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({
currency: '<string>',
items: [{description: '<string>', unit: 123, price: 123, image: '<string>'}],
payer_email: '<string>',
payer_name: '<string>',
tax_rate: 123,
store_item_ids: [{id: 123, quantity: 123}],
asset: '<string>',
redirect_url: '<string>'
})
};
fetch('https://payments.shakesco.com/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://payments.shakesco.com/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([
'currency' => '<string>',
'items' => [
[
'description' => '<string>',
'unit' => 123,
'price' => 123,
'image' => '<string>'
]
],
'payer_email' => '<string>',
'payer_name' => '<string>',
'tax_rate' => 123,
'store_item_ids' => [
[
'id' => 123,
'quantity' => 123
]
],
'asset' => '<string>',
'redirect_url' => '<string>'
]),
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://payments.shakesco.com/invoices"
payload := strings.NewReader("{\n \"currency\": \"<string>\",\n \"items\": [\n {\n \"description\": \"<string>\",\n \"unit\": 123,\n \"price\": 123,\n \"image\": \"<string>\"\n }\n ],\n \"payer_email\": \"<string>\",\n \"payer_name\": \"<string>\",\n \"tax_rate\": 123,\n \"store_item_ids\": [\n {\n \"id\": 123,\n \"quantity\": 123\n }\n ],\n \"asset\": \"<string>\",\n \"redirect_url\": \"<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://payments.shakesco.com/invoices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"<string>\",\n \"items\": [\n {\n \"description\": \"<string>\",\n \"unit\": 123,\n \"price\": 123,\n \"image\": \"<string>\"\n }\n ],\n \"payer_email\": \"<string>\",\n \"payer_name\": \"<string>\",\n \"tax_rate\": 123,\n \"store_item_ids\": [\n {\n \"id\": 123,\n \"quantity\": 123\n }\n ],\n \"asset\": \"<string>\",\n \"redirect_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://payments.shakesco.com/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 \"currency\": \"<string>\",\n \"items\": [\n {\n \"description\": \"<string>\",\n \"unit\": 123,\n \"price\": 123,\n \"image\": \"<string>\"\n }\n ],\n \"payer_email\": \"<string>\",\n \"payer_name\": \"<string>\",\n \"tax_rate\": 123,\n \"store_item_ids\": [\n {\n \"id\": 123,\n \"quantity\": 123\n }\n ],\n \"asset\": \"<string>\",\n \"redirect_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"user_id": 42,
"invoice_number": "INV-2026-A1B2C3D4",
"status": "pending",
"currency": "USD",
"tax_rate": "0.00",
"is_business": true,
"from_store": false,
"receiver": "business@example.com",
"receiver_country": "US",
"payer_name": "Jane Doe",
"payer_email": "customer@example.com",
"payer_country": null,
"asset": null,
"amount": null,
"rate": null,
"tx_hash_link": null,
"receipt_number": null,
"payment_url": "https://pay.shakesco.com/@business/a1b2c3...",
"redirect_url": "https://yourstore.com/order/complete",
"expires_at": "2026-05-23T10:00:00.000000Z",
"scanned_at": null,
"paid_at": null,
"store_item_ids": null,
"created_at": "2026-05-16T10:00:00.000000Z",
"updated_at": "2026-05-16T10:00:00.000000Z",
"transaction_items": [
{
"id": 1,
"crypto_transaction_id": 1,
"description": "Platform Services",
"unit": "1",
"price": "1400",
"image": null,
"created_at": "2026-05-16T10:00:00.000000Z",
"updated_at": "2026-05-16T10:00:00.000000Z"
}
]
}
{
"error": "\"items\" must contain at least 1 items"
}
{
"error": "Unknown asset"
}
{
"error": "You have no loyalty token"
}
{
"error": "payer_email cannot be the business being paid"
}
{
"error": "Failed to check the asset"
}
Invoices
Create Invoice
Create a new invoice and return a payment URL the customer opens to pay
POST
/
invoices
Create Invoice
curl --request POST \
--url https://payments.shakesco.com/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>",
"items": [
{
"description": "<string>",
"unit": 123,
"price": 123,
"image": "<string>"
}
],
"payer_email": "<string>",
"payer_name": "<string>",
"tax_rate": 123,
"store_item_ids": [
{
"id": 123,
"quantity": 123
}
],
"asset": "<string>",
"redirect_url": "<string>"
}
'import requests
url = "https://payments.shakesco.com/invoices"
payload = {
"currency": "<string>",
"items": [
{
"description": "<string>",
"unit": 123,
"price": 123,
"image": "<string>"
}
],
"payer_email": "<string>",
"payer_name": "<string>",
"tax_rate": 123,
"store_item_ids": [
{
"id": 123,
"quantity": 123
}
],
"asset": "<string>",
"redirect_url": "<string>"
}
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({
currency: '<string>',
items: [{description: '<string>', unit: 123, price: 123, image: '<string>'}],
payer_email: '<string>',
payer_name: '<string>',
tax_rate: 123,
store_item_ids: [{id: 123, quantity: 123}],
asset: '<string>',
redirect_url: '<string>'
})
};
fetch('https://payments.shakesco.com/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://payments.shakesco.com/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([
'currency' => '<string>',
'items' => [
[
'description' => '<string>',
'unit' => 123,
'price' => 123,
'image' => '<string>'
]
],
'payer_email' => '<string>',
'payer_name' => '<string>',
'tax_rate' => 123,
'store_item_ids' => [
[
'id' => 123,
'quantity' => 123
]
],
'asset' => '<string>',
'redirect_url' => '<string>'
]),
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://payments.shakesco.com/invoices"
payload := strings.NewReader("{\n \"currency\": \"<string>\",\n \"items\": [\n {\n \"description\": \"<string>\",\n \"unit\": 123,\n \"price\": 123,\n \"image\": \"<string>\"\n }\n ],\n \"payer_email\": \"<string>\",\n \"payer_name\": \"<string>\",\n \"tax_rate\": 123,\n \"store_item_ids\": [\n {\n \"id\": 123,\n \"quantity\": 123\n }\n ],\n \"asset\": \"<string>\",\n \"redirect_url\": \"<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://payments.shakesco.com/invoices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"<string>\",\n \"items\": [\n {\n \"description\": \"<string>\",\n \"unit\": 123,\n \"price\": 123,\n \"image\": \"<string>\"\n }\n ],\n \"payer_email\": \"<string>\",\n \"payer_name\": \"<string>\",\n \"tax_rate\": 123,\n \"store_item_ids\": [\n {\n \"id\": 123,\n \"quantity\": 123\n }\n ],\n \"asset\": \"<string>\",\n \"redirect_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://payments.shakesco.com/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 \"currency\": \"<string>\",\n \"items\": [\n {\n \"description\": \"<string>\",\n \"unit\": 123,\n \"price\": 123,\n \"image\": \"<string>\"\n }\n ],\n \"payer_email\": \"<string>\",\n \"payer_name\": \"<string>\",\n \"tax_rate\": 123,\n \"store_item_ids\": [\n {\n \"id\": 123,\n \"quantity\": 123\n }\n ],\n \"asset\": \"<string>\",\n \"redirect_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"user_id": 42,
"invoice_number": "INV-2026-A1B2C3D4",
"status": "pending",
"currency": "USD",
"tax_rate": "0.00",
"is_business": true,
"from_store": false,
"receiver": "business@example.com",
"receiver_country": "US",
"payer_name": "Jane Doe",
"payer_email": "customer@example.com",
"payer_country": null,
"asset": null,
"amount": null,
"rate": null,
"tx_hash_link": null,
"receipt_number": null,
"payment_url": "https://pay.shakesco.com/@business/a1b2c3...",
"redirect_url": "https://yourstore.com/order/complete",
"expires_at": "2026-05-23T10:00:00.000000Z",
"scanned_at": null,
"paid_at": null,
"store_item_ids": null,
"created_at": "2026-05-16T10:00:00.000000Z",
"updated_at": "2026-05-16T10:00:00.000000Z",
"transaction_items": [
{
"id": 1,
"crypto_transaction_id": 1,
"description": "Platform Services",
"unit": "1",
"price": "1400",
"image": null,
"created_at": "2026-05-16T10:00:00.000000Z",
"updated_at": "2026-05-16T10:00:00.000000Z"
}
]
}
{
"error": "\"items\" must contain at least 1 items"
}
{
"error": "Unknown asset"
}
{
"error": "You have no loyalty token"
}
{
"error": "payer_email cannot be the business being paid"
}
{
"error": "Failed to check the asset"
}
For the complete documentation index, see llms.txt.
Creates an invoice and returns the full invoice object together with a
payment_url the customer opens to complete payment.
Request Body
Currency code for the invoice amount (e.g.
"USD", "KES"). See all codesCustomer’s email address. Omit or pass
null for walk-in customers. It cannot be an email of your own business account. An invoice that names you as the payer is refused with a 422.The asset you want to be paid in. Leave it out to let the payer choose. See all assets
"BTC","ETH","USDT", or"SATS""LOYALTY"for your own loyalty token. Your business must have one.- A stock symbol such as
"AAPLon". Case sensitive.
"BTC", "ETH", "USDT", "SATS", your loyalty token if you have one, or any stock on your watchlist in the Shakesco app. A stock that is not on your watchlist can still be paid if you name it here.We recommend receiving "USDT" or "SATS". Both settle fast and cheap.Optional URL the customer is sent to after they finish paying. Must be a valid URL. Use it to return the payer to your own confirmation or order page.
Response
Returns the full invoice object with line items.Whether the transaction originated from the Shakesco store.
true for store transactions, false for a standard invoice you created through the API, and null when it does not apply. Use this to tell store sales apart from your own invoices.const response = await fetch("https://payments.shakesco.com/invoices", {
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
currency: "USD",
payer_email: "customer@example.com",
payer_name: "Jane Doe",
items: [{ description: "Platform Services", unit: 1, price: 1400 }],
}),
});
const invoice = await response.json();
{
"id": 1,
"user_id": 42,
"invoice_number": "INV-2026-A1B2C3D4",
"status": "pending",
"currency": "USD",
"tax_rate": "0.00",
"is_business": true,
"from_store": false,
"receiver": "business@example.com",
"receiver_country": "US",
"payer_name": "Jane Doe",
"payer_email": "customer@example.com",
"payer_country": null,
"asset": null,
"amount": null,
"rate": null,
"tx_hash_link": null,
"receipt_number": null,
"payment_url": "https://pay.shakesco.com/@business/a1b2c3...",
"redirect_url": "https://yourstore.com/order/complete",
"expires_at": "2026-05-23T10:00:00.000000Z",
"scanned_at": null,
"paid_at": null,
"store_item_ids": null,
"created_at": "2026-05-16T10:00:00.000000Z",
"updated_at": "2026-05-16T10:00:00.000000Z",
"transaction_items": [
{
"id": 1,
"crypto_transaction_id": 1,
"description": "Platform Services",
"unit": "1",
"price": "1400",
"image": null,
"created_at": "2026-05-16T10:00:00.000000Z",
"updated_at": "2026-05-16T10:00:00.000000Z"
}
]
}
{
"error": "\"items\" must contain at least 1 items"
}
{
"error": "Unknown asset"
}
{
"error": "You have no loyalty token"
}
{
"error": "payer_email cannot be the business being paid"
}
{
"error": "Failed to check the asset"
}