Giter Club home page Giter Club logo

payrobot-python's Introduction

Payrobot Python SDK

Introduction

Accept, store, send or forward Bitcoin, Litecoin and Bitcoin Cash for your website or app and protect your privacy.

Supported crytocurrencies:

  • BTC Bitcoin
  • LTC Litecoin
  • BCH Bitcoin Cash

Benefits

  • Anonymous No personal details are required and transactions are mixed among all payments. You can forward your payments so as soon payrobot.io receives it forwards it to another address under your control.

  • No Registration No registration, sign-up, application or form required to use payrobot.io

  • Easy Integration Integrate your web / app through our simple RESTful API, you can accept payments with just one line of code!

  • Instant Payment Notification Our servers notify your web / app the status of your payments. No polling, daemons or cronjobs required on your side!

  • Secure Payrobot.io works with SSL and bank-level security protocols. Your transactions are safe!

Features

Payment Forward Generate one-time addresses to recieve payments. Payrobot will notify your web /app through callbacks (webhooks) the status of the payment. As soon as it's confirmed the payment is forwarded to your desired address.

Wallet Receive, send payments and store your coins in a secure, private and anonymous wallet. All events are notified to your web / app through callbacks (webhooks). You can generate wallets with just one line of code without registration or further information

Fees

Only 0.90% per inbound transaction (receive payments), NO HIDDEN FEES. All outbound transactions (send funds) are totally free.

Minimum fees applies, therefore the largest amount is going to be considered as fee either: (inboundAmount*feePct) or the minimum fee

Inbound Fees (Receive payments)

  • Bitcoin 0.90% (Minimum fee 0.00005 BTC)
  • Litecoin 0.90% (Minimum fee 0.0005 LTC)
  • Bitcoin Cash 0.90% (Minimum fee 0.0005 BCH)

Outbound Fees (Send funds)

  • Bitcoin 0.00%
  • Litecoin 0.00%
  • Bitcoin Cash 0.00%

Rate Limit

To guarantee the good performance of the service and its fair use. The API is limited to receiving 120 requests per minute per IP, which is sufficient for most use cases.

Payrobot.io is asynchronous in most API methods to communicate with your application through callbacks (webhooks), thus reducing unnecessary calls to the service.

If the limit is exceeded, the IP will be banned for 1 minute.

If you require an upper limit for your application, do not hesitate to contact us

Considerations

  • Amounts in responses are expresed as strings

  • Wallets are not multi-currency, you have to create a different wallet per cryptocurrency (You can't store Litecoin in a Bitcoin wallet and vice-versa)

  • Payment forwarding has to be of the same type of currency (You can't forward a Bitcoin Cash payment to a Bitcoin address and vice-versa)

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/payrobot/payrobot-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/payrobot/payrobot-python.git)

Then import the package:

import payrobot

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import payrobot

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function

import time
import payrobot
from payrobot.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.payrobot.io
# See configuration.py for a list of all supported configuration parameters.
configuration = payrobot.Configuration(
    host = "https://api.payrobot.io"
)



# Enter a context with an instance of the API client
with payrobot.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = payrobot.PaymentApi(api_client)
    currency = 'btc' # str | Object Currency:   * `btc`: Bitcoin   * `ltc`: Litecoin   * `bch`: Bitcoin Cash 
    type = 0 # int | * `0: Receive and forward` payment is forwarded to a desired coin address once it's confirmed  * `1: Receive and store` payment is stored in a payrobot.io wallet 
    destination = 'bc1qzlza4ke65fa2sqacjfu5vtwy8ar6x8xttgk999' # str | * For `Receive and forward` payment is the `ADDRESS` where the payment is going to be forwarded as soon as it's confirmed. **ADDRESS HAS TO BE OF THE SAME TYPE OF CURRENCY**  * For `Receive and store` payment is the payrobot.io `WALLET ID` where the payment is going to be stored as soon as it's confirmed. **WALLET HAS TO BE OF THE SAME TYPE OF CURRENCY** 
    amount = 0.0129 # float | Amount of the payment
    param_callback = 'https://your-callback-url.com' # str | Your URL where payrobot.io will send the status of the payment (Webhook)
    reference = 'Bill123' # str | Optional custom reference to identify the payment (optional)

    try:
        # Generate a new one-use address to receive a payment
        api_response = api_instance.create_payment(currency, type, destination, amount, param_callback, reference=reference)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling PaymentApi->create_payment: %s\n" % e)
    

Documentation for API Endpoints

All URIs are relative to https://api.payrobot.io

Class Method HTTP request Description
PaymentApi create_payment POST /{currency}/payments Generate a new one-use address to receive a payment
PaymentApi get_payment GET /{currency}/payments/{paymentId} Get detailed information about a payment
WalletApi create_wallet POST /{currency}/wallets Create new wallet
WalletApi create_wallet_send_request POST /{currency}/wallets/{walletId}/send-requests Send funds from a wallet
WalletApi get_wallet GET /{currency}/wallets/{walletId} Get Wallet information
WalletApi get_wallet_history GET /{currency}/wallets/{walletId}/history Get last transactions of wallet
WalletApi get_wallet_send_request GET /{currency}/wallets/{walletId}/send-requests/{requestId} Obtain information of a send request

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

[email protected]

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.