Skip to main content

TON Rocket Pay API

Project description

swagger-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.0.tar.gz (58.6 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.0-py3-none-any.whl (267.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rocketpay-1.0.0.tar.gz
  • Upload date:
  • Size: 58.6 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.0.tar.gz
Algorithm Hash digest
SHA256 8fdb74d9384a37a1efe825518788767a387b9dd7561515cfd6ca5d56a0376741
MD5 1b89d42ebc001ab88cfa643c0f8ca5bd
BLAKE2b-256 77ee86b6525b1b864b80d5676c88beaebf80d11a71f7fc1da54e064c039b0e9f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rocketpay-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 267.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 edf954636b9f613b17047f1327414349850df7e6fc6363f9e07935728352044d
MD5 41763589f337880e377aa476d880ed90
BLAKE2b-256 1f8c7baa49c5383f4fdf3d891842820e8e8d870ab83dbe47d825a0fe9ced5bb4

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