Skip to main content
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 Shakesco managed tokens with the same balance
  • 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 customer_ref and current point balance. Shakesco credits that amount to the customer’s managed balance.
customer_ref is your own unique identifier for this customer (UUID, account number, phone, email, your primary key). Whatever you pick here is what you must keep passing on every subsequent call for the same customer. See the Tokens API overview for guidance.
await fetch("https://tokens.shakesco.com/upgrade-to-shakesco", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    customer_ref: "customer-123",
    amount: 250, // their legacy points balance
  }),
});

Response

{ "tx_hash": "0xabc123..." }
Once Shakesco records the credit, the customer’s managed balance is updated and they can start earning, spending, or staking immediately.

Migrating Your Customers

Loop through your customer list and call the endpoint for each one. Use whatever stable internal ID you already have as the customer_ref:
const customers = [
  { ref: "user-alice-001", points: 500 },
  { ref: "user-bob-002", points: 120 },
  { ref: "user-carol-003", 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({
      customer_ref: customer.ref,
      amount: customer.points,
    }),
  });
}
Each call migrates one customer. Once Shakesco returns a tx_hash for that customer, 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. Pick a stable customer_ref for each customer (your DB primary key is usually a good choice)
  2. Call /upgrade-to-shakesco for each customer to preserve their balance
  3. Verify migration with the balance check below
  4. Once a customer’s record is confirmed in Shakesco, delete their record from your legacy system
  5. Add the Shakesco API calls to your backend to handle all future earning and redemption, always sending the same customer_ref
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?customer_ref=customer-123",
  { headers: { Authorization: `Bearer ${API_KEY}` } }
);
const { balance } = await res.json();
// balance is a plain decimal string like "250.0"

Next Steps

Manage Rewards

Configure events, happy hours, and tiers from the dashboard

Integrate via API

Start calling the Tokens API from your backend