Coder Social home page Coder Social logo

solutio's Introduction

Solutio

Solutio is suite of tools that make it easy to accept USDC payments for any product of service offered online.

Features

  • Third party payments provider that manages all blockchain interaction
  • Typescript SDK for easy integration with any node js application
  • Forkable demo application that shows how to anyone can interat with the payments provider in their own application

Getting Started

Note

This guide assumes that your users are making payments through a node js compatible website. If you are hoping to implement decentralized payments through any other platform/medium please send an email to [email protected] with details. I will try to accomodate you as best and as quickly as I can.

Steps:

  1. Visit this website and follow the steps to generate your API key
  2. Create your .env file with your generated API key and your wallet address
SOLUTIO_API_KEY="..." # API for interacting with payments api
PAYMENT_RECEIPT_WALLET_ADDRESS="..." # Wallet address you want payments deposited to
APP_NAME="Example App" # Name of your application to be displayed to user on payment screen
  1. Install the Solutio typescript sdk package to interact with the payments provider
yarn add @solutio/sdk

or

npm install @solutio/sdk
  1. Start generating payment links for your users
import { generateNewPaymentLink } from "@solutio/sdk";
let paymentLink: string;
...

const createPayment = async (amount: number) => {
    const data = await generateNewPaymentLink(
        process.env.SOLUTIO_API_KEY,
        process.env.APP_NAME,
        process.env.PAYMENT_RECEIPT_WALLET_ADDRESS,
        amount
    );

    paymentLink = data.url;
}
  1. Open a window for the user to use to make the payment
...
window.open(
    paymentLink,
    "Popup",
    "width=400, height=500"
);
  1. Query the payments API to check the status of the created payment
import { checkPaymentStatus } from "@solutio/sdk";
...

// Function returns the signature of the successful Solana transaction
const paymentTxSig = await checkPaymentStatus(apiKey, paymentId);

if (paymentTxSig) {
    // Handle payment success logic
} else {
    // Means payment failed or is yet to be completed.
    // Handle fail case
}

Support

For help getting set up or any questions about implementing Solutio in your application please contact [email protected].

solutio's People

Contributors

broskicodes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.