Skip to main content

TON Rocket Pay API

Project description

RocketPay Client

This API based on @tonRocketBot (@ton_rocket_test_bot for testnest) Payment System. In order to use it, you need to get API key from bot. Open it and go to Rocket Pay > Create App > API token.

API token must be specified in header of each request. Header name is Rocket-Pay-Key. Only exception is /version endpoint

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.3
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

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

Then import the package:

import rocketpay 

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 rocketpay

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import rocketpay
from rocketpay.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = rocketpay.Configuration()
# Uncomment below to setup testnet
# configuration.is_testnet = True
configuration.api_key['Rocket-Pay-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Rocket-Pay-Key'] = 'Bearer'

# create an instance of the API class
api_instance = rocketpay.AppApi(rocketpay.ApiClient(configuration))

try:
    # Returns information about your application
    api_response = api_instance.apps_controller_get_app_info()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppApi->apps_controller_get_app_info: %s\n" % e)

# Configure API key authorization: api-key
configuration = rocketpay.Configuration()
configuration.api_key['Rocket-Pay-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Rocket-Pay-Key'] = 'Bearer'

# create an instance of the API class
api_instance = rocketpay.AppApi(rocketpay.ApiClient(configuration))
body = rocketpay.CreateTransferDto() # CreateTransferDto | 

try:
    # Make transfer of funds to another user
    api_response = api_instance.apps_controller_transfer(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppApi->apps_controller_transfer: %s\n" % e)

# Configure API key authorization: api-key
configuration = rocketpay.Configuration()
configuration.api_key['Rocket-Pay-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Rocket-Pay-Key'] = 'Bearer'

# create an instance of the API class
api_instance = rocketpay.AppApi(rocketpay.ApiClient(configuration))
body = rocketpay.CreateWithdrawalDto() # CreateWithdrawalDto | 

try:
    # Make withdrawal of funds to external wallet
    api_response = api_instance.apps_controller_withdrawal(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppApi->apps_controller_withdrawal: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://pay.ton-rocket.com/

Class Method HTTP request Description
AppApi apps_controller_get_app_info GET /app/info Returns information about your application
AppApi apps_controller_transfer POST /app/transfer Make transfer of funds to another user
AppApi apps_controller_withdrawal POST /app/withdrawal Make withdrawal of funds to external wallet
CurrenciesApi currencies_controller_get_coins GET /currencies/available Returns available currencies
CurrenciesApi currencies_controller_get_rates GET /currencies/rate Returns rates from simple simple-order
MultiChequesApi cheques_controller_create_cheque POST /multi-cheques Create multi-cheque
MultiChequesApi cheques_controller_delete_cheque DELETE /multi-cheques/{id} Delete multi-cheque
MultiChequesApi cheques_controller_edit_cheque PUT /multi-cheques/{id} Edit multi-cheque
MultiChequesApi cheques_controller_get_cheque GET /multi-cheques/{id} Get multi-cheque info
MultiChequesApi cheques_controller_get_cheques GET /multi-cheques Get list of multi-cheques
SubscriptionsApi subscriptions_controller_check_subscription POST /subscriptions/check/{subscriptionId}
SubscriptionsApi subscriptions_controller_create_subscription POST /subscriptions Create subscription
SubscriptionsApi subscriptions_controller_crete_subscription_interval POST /subscriptions/{subscriptionId}/interval Create subscription interval
SubscriptionsApi subscriptions_controller_delete_subscription DELETE /subscriptions/{subscriptionId} Delete subscription
SubscriptionsApi subscriptions_controller_delete_subscription_interval DELETE /subscriptions/{subscriptionId}/interval/{intervalCode} Delete subscription interval
SubscriptionsApi subscriptions_controller_edit_subscription_interval PUT /subscriptions/{subscriptionId}/interval/{intervalCode} Edit subscription interval
SubscriptionsApi subscriptions_controller_get_subscription GET /subscriptions/{subscriptionId} Get subscription info
SubscriptionsApi subscriptions_controller_get_subscription_interval GET /subscriptions/{subscriptionId}/interval/{intervalCode} Get subscription interval info
SubscriptionsApi subscriptions_controller_get_subscriptions GET /subscriptions Get list of subscription
TgInvoicesApi invoices_controller_create_invoice POST /tg-invoices Create invoice
TgInvoicesApi invoices_controller_delete_invoice DELETE /tg-invoices/{id} Delete invoice
TgInvoicesApi invoices_controller_get_invoice GET /tg-invoices/{id} Get invoice info
TgInvoicesApi invoices_controller_get_invoices GET /tg-invoices Get list of invoices
VersionApi version_controller_get_version GET /version Returns current version of API. You may use it as healthcheck

Documentation For Models

Documentation For Authorization

api-key

  • Type: API key
  • API key parameter name: Rocket-Pay-Key
  • Location: HTTP header

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rocketpay-1.0.1.tar.gz (58.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rocketpay-1.0.1-py3-none-any.whl (267.5 kB view details)

Uploaded Python 3

File details

Details for the file rocketpay-1.0.1.tar.gz.

File metadata

  • Download URL: rocketpay-1.0.1.tar.gz
  • Upload date:
  • Size: 58.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for rocketpay-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2cf3072c0b82c45875f4bb039e2cf004e3512f97e0cd6943ed779ca5c75a1a28
MD5 e8abcaf3f827cb7bc0300cc3acf3e6d0
BLAKE2b-256 e6d30cfc64ecc51219ae3abd9c76e3add30dd3e215effe6c28d52f42a72d6d88

See more details on using hashes here.

File details

Details for the file rocketpay-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: rocketpay-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 267.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for rocketpay-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3fb61fb8eff73248cd6c2ec969c173541d2db53d6ccc811aa90965fa28f0b7ec
MD5 d8beec2d4353c80beb8d27ad721b05b8
BLAKE2b-256 0e501fa39afa1d387a0acd68dbf04dc9cd97b672ba550ef3241f192df92d03b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page