Introducing RabbitStream⚡, earliest transaction detection from Solana Shreds with gRPC style filtering. Explore Now
shyft logo
Get API Key

Blogs

Dev Guides

How to Redeem Solana Loyalty Tokens on eCommerce Website(Part 3)

Shyft Logo

Team Shyft

· January 22, 2026

Loyalty-based eCommerce websites have grown popular in recent years. This article illustrates how to let users of an eCommerce website redeem or check their loyalty tokens on Solana.

In the previous part of this series, we have seen how we can create and reward users with tokens as loyalty points for an e-commerce website. There are a few more steps that are required to implement a fully functional loyalty system on an e-commerce website. Now, let’s see how we can get a user’s token balance using SHYFT APIs.

In case you have missed the previous part, click here.

Read the SHYFT API Documentation here.

Checking the current Token balance of one particular user

Once the user has started using the reward website and earned some tokens, he or she may want to check the current token balance for various purposes. Also, most reward-based e-com websites, display the current token balance of one particular user as a part of their user interface so that users can keep track of their token balance all the time. This feature can also be achieved with SHYFT APIs.

Endpoint for getting the current token balance:

GET https://api.shyft.to/sol/v1/wallet/token_balance

This API accepts the network, token, and wallet as parameters and displays the token balance from the wallet. For more details on the parameters, please check out our dev doc here, or you can try out our API live on the swagger UI here. You can also check out our dev guide on getting Token balances on Solana.

Deducting Tokens when the user redeems the tokens for some discounts

Once the user has earned enough points, he or she will want to redeem the coin in exchange for some services such as special discounts, or free gifts. In this case, we will have to deduct the required token balance from the user’s wallet and then provide the service. SHYFT also provides APIs for deducting token balances from the user’s wallet.

DELETE https://api.shyft.to/sol/v1/token/burn_detach

All SHYFT APIs accept the x-api-key parameter in their header, which is freely available on the SHYFT website here.

Parameters used for this API call

  • network: Selects the Solana network cluster, which can be either devnet, testnet or mainnet-beta.
  • wallet: Address from which the tokens will be removed. In this case, this will be website user’s wallet, the user who is redeeming the tokens.
  • token_address: Token address of the token that will be burned. This can be the token that the website is giving out as loyalty tokens.
  • amount: The number of tokens to be burned. This will be the amount that is being redeemed.

Once successfully executed, this API will return an encoded_transaction which requires a signature from the user wallet.

{
  "success": true,
  "message": "Token burn request created successfully",
  "result": {
    "encoded_transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEEGMqfUcVHHu2+lyU5gx9wU2rGxk2NoSXtodMSdev+DxVnPGbuL3I5sdaYYekm911jZ8FT/8OJhxhjtqU2HL3iCJ6DOOr5Uk+yylq542F14PAEHuMIrC7H+sPmLu62MSw6Bt324ddloZPZy+FGzut5rBy0he1fWzeROoz1hX7/AKla0+cMY+GCyK53DDR+5xRlgpjUmUkw0qD5Fbe4t+yhSAEDAwECAAoPAMqaOwAAAAAJ"
  }
}

To know more about Signing Transactions on Solana, you can follow our dev guide here, or you can simply follow our blog on creating and minting tokens on Solana for a step-by-step approach. You can also check our GitHub repo for all the functions required to sign encoded transactions.

Once successfully signed, the tokens will be burned from the user’s wallet and the discount(or any other service) can be provided to the user.

That’s pretty much all the functions required for implementing or integrating a token-based reward system for e-commerce websites. If you liked this blog, feel free to check out our other articles on getting paginated transactions on Solana using SHYFT APIs or building an NFT marketplace on Solana.

We hope you have a good experience while using SHYFT APIs. Happy Hacking!

In case you have missed the first part of this series, click here, or click here for part two.

Resources

SHYFT API Documentation

Shyft Website

Get API Key

GitHub

Join our Discord

Try out our APIs on Swagger UI

Cryptocurrency
Reward System
Tokens

Related Posts

How to reconnect and replay slots with Solana Yellowstone gRPC
Shyft

How to reconnect and replay slots with Solana Yellowstone gRPC

In this article you will learn how to implement a reconnect logic for your Solana gRPC streams with replay functionality...

January 24, 2026

How to modify Solana Yellowstone gRPC subscribe requests without disconnecting
Shyft

How to modify Solana Yellowstone gRPC subscribe requests without disconnecting

Learn how to modify your yellowstone gRPC Subscribe Requests on Solana without stopping your stream or losing data ...

January 24, 2026

Real-Time Solana Data Streaming with gRPC: Accounts, Transactions, Blocks
Shyft

Real-Time Solana Data Streaming with gRPC: Accounts, Transactions, Blocks

A comprehensive guide on how to stream Transactions, Accounts, and Block updates swiftly using Shyft’s gRPC Services ...

January 22, 2026

Get in touch with our discord community and keep up with the latest feature
releases. Get help from our developers who are always here to help you take off.

GithubTwitterLinked inDiscordTelegramBlogsBlogs

Products

RabbitStreamgRPC NetworkSuperIndexerSolana APIs
Contact Us|Email: genesis@shyft.to