Skip to main content

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.

Why Migrate?

If you already run a loyalty program with points stored in a database, a third-party platform, or a custom system, you can move your customers into the Shakesco managed token system without losing their accumulated balances. After migration:
  • Existing points become on-chain tokens on Polygon
  • Customers keep their balance and can immediately earn, spend, and stake
  • You get all Shakesco features: happy hours, tiers, cashback, vesting, and governance

How Migration Works

Migration is done one customer at a time. For each customer, call POST /upgrade-to-shakesco with their email and current point balance. Shakesco credits that amount as managed tokens on-chain.
await fetch("https://tokens.shakesco.com/upgrade-to-shakesco", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    email: "customer@example.com",
    amount: 250, // their legacy points balance
  }),
});

Response

{ "tx_hash": "0xabc123..." }
The transaction is submitted on-chain. Once confirmed, the customer’s managed balance is updated.

Migrating Your Customers

Loop through your customer list and call the endpoint for each one:
const customers = [
  { email: "alice@example.com", points: 500 },
  { email: "bob@example.com", points: 120 },
  { email: "carol@example.com", points: 80 },
  // ...
];

for (const customer of customers) {
  await fetch("https://tokens.shakesco.com/upgrade-to-shakesco", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      email: customer.email,
      amount: customer.points,
    }),
  });
}
Each call migrates one customer. Once a customer’s record is confirmed on-chain, you can remove them from your legacy system and keep only their Shakesco-managed balance going forward.

Cutover Process

The recommended approach is to remove your old loyalty system entirely and replace it with the Shakesco API:
  1. Call /upgrade-to-shakesco for each customer to preserve their balance
  2. Verify migration with the balance check below
  3. Once a customer’s record is confirmed in Shakesco, delete their record from your legacy system
  4. Add the Shakesco API calls to your backend to handle all future earning and redemption
This keeps things simple with one system and one source of truth.

Verifying Migration

After migrating, check a customer’s balance to confirm it was credited correctly:
const res = await fetch(
  "https://tokens.shakesco.com/balance?email=customer@example.com",
  { headers: { Authorization: `Bearer ${API_KEY}` } }
);
const { balance } = await res.json();
// balance is in wei - divide by 10^18 for human-readable value

Next Steps

Manage Rewards

Configure events, happy hours, and tiers from the dashboard

Integrate via API

Start calling the Tokens API from your backend