Giter Site home page Giter Site logo

dimondevceo / coinpact Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 102 KB

CoinPact is a freemium P2P crypto payment gateway with 0 fees

Home Page: https://coinpact.ch

crypto crypto-payment crypto-payment-api crypto-payment-gateway crypto-payments cryptocurrency cryptopayments payment-gateway payments

coinpact's Introduction

CoinPact REST API Docs

https://github.com/dimondevceo/coinpact/blob/main/banner.png

Overview

CoinPact is a crypto payment gateway that allows businesses to accept payments with zero commissions and provides full control over the address to which customers send funds. This documentation outlines the REST API endpoints that users can utilize to interact with CoinPact.

Base URL

The base URL for all API endpoints is: https://coinpact.ch/api

Endpoints

1. Generate Checkout

Endpoint

  • URL: /generate_checkout
  • Method: GET

Parameters (url path)

  • product_uuid (UUID): The UUID of the product for which the checkout is being generated (get it in dashboard > products).
  • user_wallet (string): The user's crypto wallet address.
  • uid (string): The unique external identifier of the user (eg. Telegram ID, User ID in your database).
  • params (JSON): Additional parameters for checkout configuration.

Example

{
  "product_uuid": "123e4567-e89b-12d3-a456-426614174001",
  "user_wallet": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
  "uid": "user123",
  "params": "{\"param1\": \"value1\", \"param2\": \"value2\"}"
}

Response

  • Success:
    • Status: 200 OK
    • JSON: { "status": "success", "checkout_token": "token123", "checkout_url": "https://coinpact.ch/api/checkout/token123" }
  • Error:
    • Status: 404 Not Found
    • JSON: {"status": "error", "message": "Error message"}

2. Generate Onboarding

Endpoint

  • URL: /generate_onboarding
  • Method: GET

Parameters (url path)

  • product_uuid (UUID): The UUID of the product for which onboarding is being generated (get it in dashboard > products).
  • uid (string): The unique identifier of the user (eg. Telegram ID, User ID in your database).
  • params (JSON): Additional parameters for onboarding configuration.

Example

{
  "product_uuid": "123e4567-e89b-12d3-a456-426614174001",
  "uid": "user123",
  "params": "{\"param1\": \"value1\", \"param2\": \"value2\"}"
}

Response

  • Success:
    • Status: 200 OK
    • JSON: { "status": "success", "onboarding_token": "token456", "onboarding_url": "https://coinpact.ch/api/onboarding/token456" }
  • Error:
    • Status: 404 Not Found
    • JSON: {"status": "error", "message": "Error message"}

3. Check User Subscription

Endpoint

  • URL: /check_subscription
  • Method: GET

Parameters (url path)

  • product_uuid (UUID): The UUID of the product for which onboarding is being generated (get it in dashboard > products).
  • uid (string): The unique identifier of the user (eg. Telegram ID, User ID in your database).

Example

{
  "product_uuid": "123e4567-e89b-12d3-a456-426614174001",
  "uid": "user123",
}

Response

  • Success:
    • Status: 200 OK
    • JSON: { "status": "success", "is_subscriber": true, "is_paid": true, "subscribed_until": 1704056400.00000 }
  • Error:
    • Status: 404 Not Found
    • JSON: {"status": "error", "message": "Error message"}

4. Generate Checkout from Frontend

Endpoint

  • URL: /generate_checkout_f
  • Method: GET

Parameters (url path)

  • token (string): The checkout token generated in endpoint 1.
  • user_wallet (string): The user's crypto wallet address.

Example

{
  "token": "token789",
  "user_wallet": "bc1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response

  • Success:
    • Status: 200 OK
    • JSON: { "status": "success", "checkout_token": "token789", "checkout_url": "https://coinpact.ch/api/checkout/token789" }
  • Error:
    • Status: 404 Not Found
    • JSON: {"status": "error", "message": "Error message"}

Rate Limiting

  • Rate limiting is enforced to prevent abuse and server overloading.
  • Requests are limited to 1 per second per IP address.

Example

{
  "status": "ratelimit",
  "message": "Too many requests, please try again in 30 seconds."
}

Future Updates

  • Add Payment Status endpoint
  • Add inline and modal checkouts
  • Add custom callbacks
  • Create Paylink service
  • Add url shortening to onboarding and checkout
  • Add Litecoin support
  • Add Solana support
  • Add Dash support
  • Add XRP support
  • Add Monero support

coinpact's People

Contributors

dimondevceo avatar

Stargazers

 avatar  avatar  avatar  avatar  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.