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
- AllOfChequeDisabledLanguages
- AllOfCoinDtoFeeWithdraw
- AllOfPayInvoiceDtoPayment
- AllOfShortChequeDtoDisabledLanguages
- AllOfSubscriptionInterval
- AllOfSubscriptionTgResource
- ApiBadRequestError
- ApiError
- App
- AppBalance
- AppDto
- AvailableCoins
- AvailableCoinsData
- CheckSubscriptionDto
- Cheque
- CoinDto
- CreateChequeDto
- CreateInvoiceDto
- CreateSubscriptionDto
- CreateTransferDto
- CreateWithdrawalDto
- DeleteResponseDto
- EditSubscriptionIntervalDto
- FullInvoiceDto
- FullInvoiceResponseDto
- Invoice
- PaginatedInvoiceResponse
- PaginatedShortChequeDtoResponse
- PaginatedSubscriptionResponse
- PaginationDto
- PayInvoiceDto
- PayInvoiceStatDto
- PropertyError
- Rates
- ResponseDto
- Set
- ShortChequeDto
- SimpleChequeResponse
- SimpleFullInvoiceDtoResponse
- SimpleInvoiceResponse
- SimpleShortChequeDtoResponse
- SimpleSubscriptionIntervalResponse
- SimpleSubscriptionResponse
- SimpleTransferDtoResponse
- SimpleUserSubscriptionResponse
- SimpleWithdrawalDtoResponse
- Subscription
- SubscriptionInterval
- SubscriptionIntervalDto
- SubscriptionResource
- TgResource
- TransferDto
- UpdateChequeDto
- UserSubscription
- UserSubscriptionTransaction
- Version
- WebhookDto
- WithdrawFeeDto
- WithdrawalDto
Documentation For Authorization
api-key
- Type: API key
- API key parameter name: Rocket-Pay-Key
- Location: HTTP header
Author
- Aleksandr Shepelev
- Reinier Hernández
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rocketpay-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fb61fb8eff73248cd6c2ec969c173541d2db53d6ccc811aa90965fa28f0b7ec |
|
MD5 | d8beec2d4353c80beb8d27ad721b05b8 |
|
BLAKE2b-256 | 0e501fa39afa1d387a0acd68dbf04dc9cd97b672ba550ef3241f192df92d03b1 |