Payment processor API
This API describes endpoints of payment processor.
-Resource Group ¶
New address ¶
New addressPOST/v1/address/new
Generates new deposit address
-Example URI
Headers
Content-Type: application/json
Authorization: Bearer
Body
{
+
+
+
+
+
+ Payment processor API
+
+
+
+
+ Back to top
+
+
+
+
+
+ Payment processor API
+
+ This API describes endpoints of payment processor.
+
+ Resource Group ¶
+
+ New address ¶
+
+
+ New addressPOST/v1/address/new
+ Generates new deposit address
+ Example URI
+ POST /v1/address/new
+
+ Request
+
+
+
+
+ Headers
Content-Type: application/json
Authorization: Bearer
+
+ Body
{
"user_id": "123",
"currency": "TON"
-}
Response 200
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 200
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"address": "0QB7BSerVyP9xAKnxp3QpqR8JO2HKwZhl10zsfwg7aJ281ZR"
-}
Response 400
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 400
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Response 401
Response 500
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 401
+ Response 500
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Get all addresses ¶
Get all addressesGET/v1/address/all{?user_id}
Get all created addresses by user_id
-Example URI
GET /v1/address/all?user_id=URI Parameters- user_id
string
(required) an unique identifier of the user
-
RequestHeaders
Authorization: Bearer
Response 200
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+
+
+
+ Get all addresses ¶
+
+
+ Get all addressesGET/v1/address/all{?user_id}
+ Get all created addresses by user_id
+ Example URI
+ GET /v1/address/all?user_id=
+
+ URI Parameters
+
+
+
+ - user_id
+ string
(required)
+ an unique identifier of the user
+
+
+
+ Request
+
+
+
+
+ Headers
Authorization: Bearer
+
+
+
+ Response 200
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"addresses": [
{
"address": "0QB7BSerVyP9xAKnxp3QpqR8JO2HKwZhl10zsfwg7aJ281ZR",
@@ -22,16 +1189,76 @@ Example URI
GET&
"currency": "TGR"
}
]
-}
Response 400
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 400
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Response 401
Response 500
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 401
+ Response 500
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Get income ¶
Get incomeGET/v1/income{?user_id}
Get income for deposits by user_id
. The total amount of funds that came to the deposit for the entire time.
-Funds sent from the deposit to the hot wallet or all funds received to the deposit are taken into account,
-depending on the service settings.
-Counting side field options: “hot_wallet”, “deposit”.
-Example URI
GET /v1/income?user_id=URI Parameters- user_id
string
(required) an unique identifier of the user
-
RequestHeaders
Authorization: Bearer
Response 200
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+
+
+
+ Get income ¶
+
+
+ Get incomeGET/v1/income{?user_id}
+ Get income for deposits by user_id
. The total amount of funds that came to the deposit for the entire time. Funds sent from the deposit to the hot wallet or all funds received to the deposit are taken into account,
+ depending on the service settings. Counting side field options: “hot_wallet”, “deposit”.
+ Example URI
+ GET /v1/income?user_id=
+
+ URI Parameters
+
+
+
+ - user_id
+ string
(required)
+ an unique identifier of the user
+
+
+
+ Request
+
+
+
+
+ Headers
Authorization: Bearer
+
+
+
+ Response 200
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"counting_side": "deposit",
"total_income": [
{
@@ -45,17 +1272,85 @@ Example URI
GET&
"currency": "TGR"
}
]
-}
Response 400
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 400
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Response 401
Response 500
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 401
+ Response 500
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Get history ¶
Get historyGET/v1/history{?user_id,currency,limit,offset}
Get history for deposits by user_id
and currency
. Returns the history of all deposits replenishments with the
-sender’s address as source_address
(if it could be determined).
-Example URI
GET /v1/history?user_id=¤cy=&limit=&offset=URI Parameters- user_id
string
(required) an unique identifier of the user
-- currency
string
(required) the text identifier of the currency specified in the processor configuration. TON
for TON coin.
-- limit
number
(required) the maximum value of returned records
-- offset
number
(required) offset for returned records
-
RequestHeaders
Authorization: Bearer
Response 200
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+
+
+
+ Get history ¶
+
+
+ Get historyGET/v1/deposit/history{?user_id,currency,limit,offset}
+ Get history for deposits by user_id
and currency
. Returns the history of all deposits replenishments with the sender’s address as source_address
(if it could be determined).
+ Example URI
+ GET /v1/deposit/history?user_id=¤cy=
+ &limit=&offset=
+
+ URI Parameters
+
+
+
+ - user_id
+ string
(required)
+ an unique identifier of the user
+ - currency
+ string
(required)
+ the text identifier of the currency specified in the processor configuration. TON
for TON coin.
+ - limit
+ number
(required)
+ the maximum value of returned records
+ - offset
+ number
(required)
+ offset for returned records
+
+
+
+ Request
+
+
+
+
+ Headers
Authorization: Bearer
+
+
+
+ Response 200
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"incomes": [
{
"deposit_address": "0QB7BSerVyP9xAKnxp3QpqR8JO2HKwZhl10zsfwg7aJ281ZR",
@@ -72,280 +1367,582 @@ Example URI
GET&
"comment": "hello"
}
]
-}
Response 400
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 400
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Response 401
Response 500
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 401
+ Response 500
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Send withdrawal ¶
Send withdrawalPOST/v1/withdrawal/send
Send withdrawal request. Amount must be in base units without decimal point (NanoTONs for TONs)
-Example URI
POST /v1/withdrawal/sendRequestHeaders
Content-Type: application/json
Authorization: Bearer
Body
{
+}
+
+
+
+
+
+
+ Send withdrawal ¶
+
+
+ Send withdrawalPOST/v1/withdrawal/send
+ Send withdrawal request. Amount must be in base units without decimal point (NanoTONs for TONs)
+ Example URI
+ POST /v1/withdrawal/send
+
+ Request
+
+
+
+
+ Headers
Content-Type: application/json
Authorization: Bearer
+
+ Body
{
"user_id": "123",
"query_id": "321",
"currency": "TON",
"amount": "100",
"destination": "0QCdyiS-fIV9UVfI9Phswo4l2MA-hm8YseHynZ_YiH9Y1oSe",
"comment": "hello"
-}
Response 200
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 200
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"ID": 1
-}
Response 400
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 400
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Response 401
Response 500
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 401
+ Response 500
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Send service withdrawal ¶
Send service withdrawalPOST/v1/withdrawal/service/ton
Send service withdrawal request. Withdraw all TONs from from
address to hot wallet.
-Returns memo
as comment for transfer message.
-Example URI
POST /v1/withdrawal/service/tonRequestHeaders
Content-Type: application/json
Authorization: Bearer
Body
{
+}
+
+
+
+
+
+
+ Send service withdrawal ¶
+
+
+ Send service withdrawalPOST/v1/withdrawal/service/ton
+ Send service withdrawal request. Withdraw all TONs from from
address to hot wallet. Returns memo
as comment for transfer message.
+ Example URI
+ POST /v1/withdrawal/service/ton
+
+ Request
+
+
+
+
+ Headers
Content-Type: application/json
Authorization: Bearer
+
+ Body
{
"from": "0QAUuul9LdYcyJuBHernHo3JkbWTduH_FuEb2H8jCDdGesOP",
-}
Response 200
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 200
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"memo": "123e4567-e89b-12d3-a456-426655440000"
-}
Response 400
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 400
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Response 401
Response 500
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 401
+ Response 500
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Send service withdrawal ¶
Send service withdrawalPOST/v1/withdrawal/service/jetton
Send service withdrawal request. Withdraw all Jettons from Jetton wallet. Address calculated through owner and Jetton master.
-Returns memo
as comment for transfer message.
-Example URI
POST /v1/withdrawal/service/jettonRequestHeaders
Content-Type: application/json
Authorization: Bearer
Body
{
+}
+
+
+
+
+
+
+ Send service withdrawal ¶
+
+
+ Send service withdrawalPOST/v1/withdrawal/service/jetton
+ Send service withdrawal request. Withdraw all Jettons from Jetton wallet. Address calculated through owner and Jetton master. Returns memo
as comment for transfer message.
+ Example URI
+ POST /v1/withdrawal/service/jetton
+
+ Request
+
+
+
+
+ Headers
Content-Type: application/json
Authorization: Bearer
+
+ Body
{
"owner": "0QAUuul9LdYcyJuBHernHo3JkbWTduH_FuEb2H8jCDdGesOP",
"jetton_master": "kQCKt2WPGX-fh0cIAz38Ljd_OKQjoZE_cqk7QrYGsNP6wfP0",
-}
Response 200
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 200
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"memo": "123e4567-e89b-12d3-a456-426655440000"
-}
Response 400
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 400
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Response 401
Response 500
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 401
+ Response 500
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Get withdrawal status ¶
Get withdrawal statusGET/v1/withdrawal/status{?id}
Get withdrawal status. Returns pending
, processing
, processed
-Example URI
GET /v1/withdrawal/status?id=URI Parameters- id
number
(required) An unique identifier of the withdrawal.
-
RequestHeaders
Content-Type: application/json
Authorization: Bearer
Response 200
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+
+
+
+ Get withdrawal status ¶
+
+
+ Get withdrawal statusGET/v1/withdrawal/status{?id}
+ Get withdrawal status. Returns pending
, processing
, processed
+ Example URI
+ GET /v1/withdrawal/status?id=
+
+ URI Parameters
+
+
+
+ - id
+ number
(required)
+ An unique identifier of the withdrawal.
+
+
+
+ Request
+
+
+
+
+ Headers
Content-Type: application/json
Authorization: Bearer
+
+
+
+ Response 200
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"status": "pending"
-}
Response 400
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 400
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Response 401
Response 500
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 401
+ Response 500
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Get sync flag ¶
Get sync flagGET/v1/system/sync
Get blockchain sync flag. Returns true
if the service has up-to-date data from the blockchain.
-As long as the flag is equal to false
, no withdrawals are made.
-Example URI
GET /v1/system/syncResponse 200
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+
+
+
+ Get sync flag ¶
+
+
+ Get sync flagGET/v1/system/sync
+ Get blockchain sync flag. Returns true
if the service has up-to-date data from the blockchain. As long as the flag is equal to false
, no withdrawals are made.
+ Example URI
+ GET /v1/system/sync
+
+ Response 200
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"is_synced": false
-}
Response 500
Headers
Content-Type: application/json
Body
{
+}
+
+
+
+ Response 500
+
+
+
+
+ Headers
Content-Type: application/json
+
+ Body
{
"error": "error text"
-}
Generated by aglio on 16 Apr 2023
+
-window.onload = function () {
- autoCollapse();
- // Remove the `preload` class to enable animations
- document.querySelector('body').className = '';
-};
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/manual_testing_plan.md b/manual_testing_plan.md
index e6c0c0b..b7dc500 100644
--- a/manual_testing_plan.md
+++ b/manual_testing_plan.md
@@ -241,20 +241,20 @@ Template:
26. -[x] Checked
- TEST : Replenish the TON deposit from the masterchain wallet and check it by
- `/v1/history{?user_id,currency,limit,offset}` method.
+ `/v1/deposit/history{?user_id,currency,limit,offset}` method.
- RESULT : The sender's address must be displayed correctly in the history.
- COMMENT :
27. -[x] Checked
- TEST : Replenish the TON deposit (when it in nonexist status) with a bounceable message and check it by
- `/v1/history{?user_id,currency,limit,offset}` method. Also check logs.
+ `/v1/deposit/history{?user_id,currency,limit,offset}` method. Also check logs.
- RESULT : The bounced payment should not be in the history. There should be no errors in the logs, only a warning
about a bounced message.
- COMMENT :
28. -[x] Checked
- TEST : Replenish the Jetton deposit with zero forward amount and check it by
- `/v1/history{?user_id,currency,limit,offset}` method.
+ `/v1/deposit/history{?user_id,currency,limit,offset}` method.
- RESULT : The sender's address must be not presented in the history.
- COMMENT :