Skip to main content

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

Metadata

Release files for rocketpay 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rocketpay 1.0.1
File Size Uploaded
rocketpay-1.0.1.tar.gz 58.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rocketpay 1.0.1
File Interpreter ABI Platform
rocketpay-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 326.2 kB

Release files / rocketpay-1.0.1.tar.gz

Download URL rocketpay-1.0.1.tar.gz
Size 58.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2cf3072c0b82c45875f4bb039e2cf004e3512f97e0cd6943ed779ca5c75a1a28
BLAKE2b-256 checksum
How to use checksums
e6d30cfc64ecc51219ae3abd9c76e3add30dd3e215effe6c28d52f42a72d6d88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / rocketpay-1.0.1-py3-none-any.whl

Download URL rocketpay-1.0.1-py3-none-any.whl
Size 267.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3fb61fb8eff73248cd6c2ec969c173541d2db53d6ccc811aa90965fa28f0b7ec
BLAKE2b-256 checksum
How to use checksums
0e501fa39afa1d387a0acd68dbf04dc9cd97b672ba550ef3241f192df92d03b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page