GithubHelp home page GithubHelp logo

rampaul770 / restful-api-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from caffeineking/restful-api-client

0.0 0.0 0.0 193 KB

Integrate cryptocurrency payments into applications and games with a powerful, yet secure API environment

Home Page: https://atomicpay.io

License: MIT License

PHP 100.00%

restful-api-client's Introduction

AtomicPay

AtomicPay REST API

AtomicPay provides a standard HTTP RESTful interface which enables application developers to programmatically interact with their account in a powerful, yet secure environment. Using the AtomicPay API, clients can create and manage invoices, retrieve transaction information, access features, retrieve real-time currency rates, manage bills, and much more.

This Git repository contains code examples on how to make requests to AtomicPay RESTful API for various programming languages, including C#, Go, Java, JavaScript, NodeJS, PHP, Python, Ruby and Shell scripting. Future updates include easy-to-use code library for each programming languages.

Develop with C#? AtomicPay has it's C# .NET SDK for .Net Core, .NET Framework, Xamarin developments. The library is developed and maintained by contributor MSiccDev, https://github.com/MSiccDev/AtomicPay.NET

If you are interested to develop open source library for any of the languages, please read our guidelines for contributing or contact us via Telegram or email to [email protected]

Follow us on our developments

We develop in lightning speed! If you would like to keep up with what we are building or our upcoming cool features, please follow us on AtomicPay Official Channels:

Meanwhile, here is a short deck to learn more about AtomicPay: https://www.slideshare.net/atomicpay/atomicpay-decentralized-noncustodial-payment-gateway-126944216

What Can You Built?

Endless imagination! With your choice of programming language, you can integrate AtomicPay cryptocurrency payment solution into Vending Machines, Smart TV apps, Point-of-Sale Systems, Games, Mobile Apps with in-store purchases, Paywalls for media sites and lots more. Do share with us, if you are building anything with AtomicPay API.

Here are some Open Source ecommerce plugins that we built with AtomicPay API: WooCommerce, PrestaShop, OpenCart

Documentation

Full & Comprehensive API Documentation is available on the AtomicPay website.

Getting Started

Developers do not need to install additional libraries or softwares. Developers may call the API directly over HTTPS via protocol methods GET, PUT, POST and DELETE to perform operations, using the language of their choice.

In order to use AtomicPay Restful interface, you will need to sign up for an API key. More information at https://atomicpay.io/api/en

Getting Access

Authorization in AtomicPay's API utilizes a set of revocable API Keys. Each API call must be accompanied by an Authorization header that include either a public or private API Key which grants access to perform specific operations.

You can retrieve the API keys by login to merchant control panel -> API Integration page. If your key becomes compromised, you may revoke the keys by regenerating new set of keys.

To access any resource URI, an API Key will need to be sent within the HTTP headers Authorization: BASIC {AccountID}:{APIKey} encoded in base64 over SSL along with the API body request.

Making Requests

Requests to the AtomicPay REST API follow the RESTful convention using standard HTTP protocols against AtomicPay resources URI to return JSON formatted responses. IMPORTANT: (AccountID:APIKey) must be encoded in base64

Except for Authorization endpoint, each request MUST include in the HTTP headers:

  • Authorization: BASIC {AccountID}:{APIKey}
  • Content-Type: application/json

To make an API request, simply send an HTTP request with a HTTP method to a resource URI and include in the body JSON parameters of any additional parameters required.

IPN / Webhooks

Instant Payment Notification (IPN) or webhook is a message service that automatically notifies merchants of events related to AtomicPay transactions. Merchants can use it to automate back-end and administrative functions, including automatically fulfilling orders and providing customers with order status. For more information about IPN / Webhooks, please visit our API IPN/Webhooks Documentation.

Here is an example of the JSON data in the IPN message: { "invoice_id":"DBVZzHMxjjfdRZYeignEZC", "order_id":"1235425", "fiat_price":"1.00", "fiat_currency":"USD", "payment_currency":"BTC", "payment_rate":"4,192.00", "payment_address":"bc1qmtyax97phenvvs3sdg5r45kdcphd", "payment_total":"0.00023855", "payment_paid":"0.00023855", "payment_due":"0.00000000", "payment_txid":"14edecbf114f2b2e73cf7470916122286506de5", "payment_confirmation":"At least 6", "status":"complete" "statusException":"null" }

Resources URI

Below is a list of resources URI endpoints. For more information about specific resource URIs, please visit our API Resource Documentation.

Authorization

Authorization endpoint URI allows client to validate the authentication of API Keys.

Method URI Endpoint
POST https://merchant.atomicpay.io/api/v1/authorization

For detailed schema, parameters, code snippet and returned responses, read Authorization Resource Documentation

Account

Account endpoint URI allows client to retrieve or update account details of merchant's AtomicPay account.

Method URI Endpoint
GET https://merchant.atomicpay.io/api/v1/account
PUT https://merchant.atomicpay.io/api/v1/account

For detailed schema, parameters, code snippet and returned responses, read Account Resource Documentation

Billing

Billing endpoint URI allows client to retrieve details of a specific bill or a list of bills for the merchant account filtered by query.

Method URI Endpoint
GET https://merchant.atomicpay.io/api/v1/billing
GET https://merchant.atomicpay.io/api/v1/billing/:bill_id

For detailed schema, parameters, code snippet and returned responses, read Billing Resource Documentation

Currencies

Currencies endpoint URI allows client to retrieve fiat currencies that are supported by AtomicPay

Method URI Endpoint
GET https://merchant.atomicpay.io/api/v1/currencies
GET https://merchant.atomicpay.io/api/v1/currencies/:currency

For detailed schema, parameters, code snippet and returned responses, read Currencies Resource Documentation

Invoices

Invoices are time-sensitive payment requests. An invoice has a fixed price, typically denominated in fiat currency. AtomicPay will automatically convert this fiat amount into cryptocurrency of equivalent value, based on real-time average cryptocurrency market rate, along with a preset time period for payment expiration.

Method URI Endpoint
GET https://merchant.atomicpay.io/api/v1/invoices
GET https://merchant.atomicpay.io/api/v1/invoices/:invoice_id
POST https://merchant.atomicpay.io/api/v1/invoices

For detailed schema, parameters, code snippet and returned responses, read Invoices Resource Documentation

PayURL

PayURL endpoint URI allows client to retrieve, create, update and delete PayURLs of merchant account.

Method URI Endpoint
GET https://merchant.atomicpay.io/api/v1/payurl
GET https://merchant.atomicpay.io/api/v1/payurl/:url_id
POST https://merchant.atomicpay.io/api/v1/payurl
PUT https://merchant.atomicpay.io/api/v1/payurl/:url_id
DELETE https://merchant.atomicpay.io/api/v1/payurl/:url_id

For detailed schema, parameters, code snippet and returned responses, read PayURL Resource Documentation

Rates

Rates endpoint URI allows client to retrieve real-time exchange rates between a base fiat currency and merchant's supported cryptocurrencies.

Method URI Endpoint
GET https://merchant.atomicpay.io/api/v1/rates/:base_currency

For detailed schema, parameters, code snippet and returned responses, read Rates Resource Documentation

Transactions

Transactions endpoint URI allows client to retrieve a list of transactions for the merchant account filtered by query.

Method URI Endpoint
GET https://merchant.atomicpay.io/api/v1/transactions

For detailed schema, parameters, code snippet and returned responses, read Transactions Resource Documentation

Contributions & Developments

Anyone and everyone is welcome to contribute or develop libraries for the programming languages. Please take a moment to review the guidelines for contributing to AtomicPay API Client.

License

AtomicPay is released under the MIT License. Please refer to the License file that accompanies this project for more information including complete terms and conditions.

restful-api-client's People

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.