Skip to main content
POST
/
process-cashback
Process Cashback
curl --request POST \
  --url https://tokens.shakesco.com/process-cashback \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_ref": "<string>",
  "spent_amount": 123,
  "currency": "<string>"
}
'
{ "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. Adds spent_amount to the customer’s cashback progress. If the cumulative spend reaches the configured threshold, reward_tokens are credited automatically and the counter rolls over (overflow carries into the next cycle). Call this after every customer purchase. Returns 404 if you haven’t set up a cashback program yet via /set-cashback.
Treat this as a transaction. If you don’t get a response, check /cashback-progress before retrying. Duplicate calls will inflate the customer’s progress.

Request Body

customer_ref
string
required
Your unique identifier for this customer
spent_amount
number
required
Amount the customer just spent, in currency
currency
string
required
Currency of the spent amount. See codes

Response

tx_hash
string
Reference identifier for this purchase
await fetch("https://tokens.shakesco.com/process-cashback", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    customer_ref: "customer-123",
    spent_amount: 600,
    currency: "KES",
  }),
});
{ "tx_hash": "0xabc..." }