DEV Community

Cover image for How to integrate Unispend to enable Users spend crypto on everyday items
Uchi Uchibeke
Uchi Uchibeke

Posted on • Edited on

How to integrate Unispend to enable Users spend crypto on everyday items

Super excited to share that we just publicly launched Unispend on Product Hunt and I wanted to share how Developers can integrate Unispend.

Unispend is a crypto-to-commerce protocol that enables users to spend their digital assets on everyday items directly from their wallets. With Unispend, users can pay for over 500 million products, 1,000+ gift cards, mobile money, and airtime in 20 countries. Unispend is live on Ethereum, Polygon, BNB, Celo, and XRP Ledger chains.

Developers, Wallets, Apps and everyone in-between that wants to enable their users to spend Crypto on everyday items can integrate Unispend in their Wallets, dApps, Chains and so much more.

Developers have several options to integrate Unispend into their apps, including:

  • Full API integration
  • SDK using the Chimoney SDKs on Node, Python, Flutter
  • Low-code option to copy a single line of code and embed

Let's take a closer look at each of these options:

Full API Integration

API integration is a powerful option for developers who want to integrate Unispend with their existing software. Unispend leverages Chimoney's API which provides a comprehensive API that developers can use to programmatically buy products and gift cards. Developers can easily access the API documentation and begin integrating right away.

Pros:

  • Provides full control over the purchasing process
  • Allows for custom integrations with existing codebase and UI
  • API documentation is available to assist with integration
  • Provides flexibility to use any programming language

Cons:

  • Requires developer expertise to integrate
  • Potential for errors or bugs in the integration process
  • Must handle and secure user's sensitive information
  • Potentially needs more time investment

Here's an example of how to programmatically buy a product from Amazon with the ChiConnect API:

// Initiate chimoney with this endpoint

const data = {
  chimoneys: [
    {
      valueInUSD: 100,
      type: "ryProducts",
      email: "user@mail.com",
      redeemData: {
        marketplace: "AMAZON", 
        productId: "B08F5MXVYL",
        productName: "Amazon Fire HD 10 Kids Pro tablet, 10.1",
      },
    }
  ],
};

// Set enabledToRedeem array to ryProducts details including productId and name.
// This will allow you to buy a Unispend product.

// Call the payouts/chimoney endpoint to complete the process.

chimoney.readme.io/reference/post_v0-2-payouts-chimoney


Enter fullscreen mode Exit fullscreen mode

SDK Using the Chimoney SDKs on Node, Python, Flutter

Developers can also integrate Unispend using Chimoney SDKs on Node, Python, and Flutter. These SDKs make it easy for developers to integrate Unispend into their applications without having to worry about the complexities of the blockchain. Unispend SDKs provide pre-built functions and tools that developers can use to integrate Unispend quickly and easily.

Pros:

  • Provides a more straightforward integration process compared to the API
  • Pre-built functions and tools simplify development
  • SDK documentation is available to assist with integration

Cons:

  • May require some familiarity with the programming language
  • Limited to the supported programming languages
  • Must handle and secure user's sensitive information

The Chimoney community built some SDKs that simplify the process of integrating Unispend. They include:

For Node, install the Chimoney Node.js module using npm install chimoneyjs. Then, import Chimoney and initialize it with your Chimoney API key.

Here's an example of how to create an order with Chimoney Node.js module:

// Install the Chimoney SDK

npm install chimoneyjs

// Import the SDK

const Chimoney = require('chimoneyjs')

// Set your API key

const apiKey = 'YOUR_API_KEY'

// Initialize the Chimoney SDK with your API key

const chimoney = new Chimoney(apiKey)

// Use the SDK to buy a Unispend product

chimoney.payouts.chimoney({
  valueInUSD: 100,
  marketplace: 'AMAZON',
  productId: 'B08F5MXVYL',
  productName: 'Amazon Fire HD 10 Kids Pro tablet, 10.1',
  email: 'user@mail.com'
})


Enter fullscreen mode Exit fullscreen mode

Low-code Option to Copy a Single Line of Code and Embed

For those who want a quicker integration option, Unispend offers a low-code integration solution.

With the low-code option, you only need to copy and embed a single line of code to your website or application. This solution is perfect for those who want to quickly offer Unispend as a payment option to their customers without much hassle.

The Unispend Examples repo on Github include examples of low-code integration for:

Pros and Cons of Low-Code Integration

The low-code integration solution is perfect for those who want a quick and easy integration with Unispend and to potentially earn some commission from purchases. However, there are some pros and cons to consider before choosing this option.

Pros:

  • Quick and easy to implement
  • Minimal coding required
  • No need to worry about server-side logic

Cons:

  • Limited flexibility
  • May not be suitable for complex applications
  • Not customizable beyond the options provided by Unispend

Why Developers Should Integrate Unispend

Unispend is the easiest way for digital asset holders to spend their assets in real life. As such, integrating Unispend into your Wallet, App or dApp can provide your users with a fast, secure, and easy way to spend their digital assets. With Unispend, users can preserve their self-sovereignty, pay directly from their non-custodial wallets, and eliminate the cumbersome steps of sending crypto to exchanges and converting to fiat.

Integrating Unispend also enables your users to spend most tokens on a supported chain, including block rewards, DeFi earnings, and yield farming gains. With Unispend's wide selection of localized products and services, your users can spend their digital assets on the products and services they need, right where they are.

Conclusion

Unispend is a great solution for those who want to offer their customers the ability to spend their cryptocurrencies on everyday items. Whether you choose to integrate with the full API, the Chimoney SDKs, or the low-code integration solution, Unispend offers a variety of options to suit your needs.

I hope this article has been helpful in guiding you through the integration process with Unispend. If you have any questions or need further assistance, be sure to check out the Chimoney's API documentation or contact me directly.

Happy integrating!

Top comments (4)

Collapse
 
parth51199 profile image
parth51199

It seems that Unispend offers a comprehensive solution for those who want to integrate cryptocurrency spending into their business.

Collapse
 
uu profile image
Uchi Uchibeke

that's correct

Collapse
 
icolomina profile image
Nacho Colomina Torregrosa

Congrats for Unispend !!

Collapse
 
uu profile image
Uchi Uchibeke • Edited

thanks @icolomina