Skip to main content
POST
/
set-cashback
Set Cashback
curl --request POST \
  --url https://tokens.shakesco.com/set-cashback \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "spend_threshold": 123,
  "currency": "<string>",
  "reward_tokens": 123
}
'
{ "tx_hash": "0xabc..." }

Documentation Index

Fetch the complete documentation index at: https://docs.shakesco.com/llms.txt

Use this file to discover all available pages before exploring further.

For the complete documentation index, see llms.txt. Sets up a cashback program: once a customer spends spend_threshold (in your chosen currency) at your business, they automatically get reward_tokens credited. Cashback resets on every threshold crossing, and any spend overflow rolls into the next cycle. Use /process-cashback to record each customer purchase.

Request Body

spend_threshold
number
required
Amount in currency that triggers cashback (e.g. 500)
currency
string
required
Currency of the threshold (e.g. "KES", "USD"). See codes
reward_tokens
number
required
Tokens awarded each time the threshold is crossed. Decimals allowed.

Response

tx_hash
string
Reference identifier for the configuration
// Award 5 tokens when a customer spends KES 500
await fetch("https://tokens.shakesco.com/set-cashback", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ spend_threshold: 500, currency: "KES", reward_tokens: 5 }),
});
{ "tx_hash": "0xabc..." }