Skip to content

LuismiLabs/Cumbi

Repository files navigation

Cumbi Crypto Gateway API

A brief description of your project.

Table of Contents

Prerequisites

Before you begin, ensure that you have the following prerequisites installed on your machine:

  • Nodejs
  • nodemon
  • Xamp
  • Postman

Installation

  1. Clone the repository to your local machine using
  2. Start your local xamp server
  3. Create a new database "cumbi-crypto-api.sql"
  4. Import the database file in /config/cumbi-crypto-api.sql
  5. Run nodemon start

Documentation

API Documentation

Introduction

This API provides endpoints to interact with the Cumbi Crypto API. It allows users to create new deposit objects and retrieve existing deposit information on ETH AND TRON network

Base URL

http://localhost:3000/api

Authentication

To authenticate API requests, include the Authorization header with the Bearer token.

Create a New Deposit

Create a new deposit object by sending a POST request to the ${baseurl}/deposit/create endpoint.

Request

  • Method: POST
  • URL: ${baseurl}/deposit/create
  • Headers:
    • Content-Type: application/json
    • Authorization: Bearer <token>

Request Body

{
    "deposit_id": "test1",
    "amount" : 10,
    "network": "ethereum",
    "coin": "usdt"
}
Parameter Type Required Description
deposit_id string yes deposit unique id to attached to this deposit
amount number(double) yes deposit amount in USD
network string yes the crypto network you wont to interact with supported: ethereum || tron
coin string yes the crypto coin you want to interact with on the selected network supported: USDT || USDC

Request Response

{
    "status": "success",
    "depositObj": {
        "address": "...address", //the deposit address
        "coin_price": "1.00",
        "deposit_id": "test1",
        "balance": 0, //address balance on chain
        "amount_usd": 8,
        "status": "pending",
        "amount": 8,
        "coin": "USDT",
        "network": "ETHEREUM"
    }
}

Check Deposit Status

Check a deposit status by sending a POST request to the ${baseurl}/deposit/status endpoint.

Request

  • Method: POST
  • URL: ${baseurl}/deposit/status
  • Headers:
    • Content-Type: application/json
    • Authorization: Bearer <token>

Request Body

{
    "deposit_id": "test1"
}
Parameter Type Required Description
deposit_id string yes unique id attached to the deposit

Request Response

{
    "status": "success",
    "depositObj": {
        "address": "...address",  //the deposit address
        "deposit_id": "test1",
        "balance": 8,
        "amount_usd": 8,
        "status": "success", //pending || success : when address balance  >= amount
        "amount": 8,
        "coin": "USDT",
        "network": "ETHEREUM"
    }
}

About

Cumbi is a payment gateway that bridges the gap between traditional finance and the blockchain world.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors