This API allows you to create a new transaction. The required inputs are:
curl -X POST https://api.example.com/transaction \
-H "Authorization: Bearer {user_token}" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"amount": 100,
"payment_network": "TON",
"callback_url": "https://example.com/callback"
}'
On success, the server will return a response with the following details:
{
"wallet_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"payment_deadline": 1800,
"amount": 100,
"network": "TON",
"value_usd": 0.0025,
"value_eur": 0.0022
}
This API returns a list of active transactions based on optional filters like gateway ID, product ID, and status. Required inputs:
curl -X GET https://api.example.com/transactions/active \
-H "Authorization: Bearer {user_token}" \
-H "Content-Type: application/json" \
-d '{
"gateway_id": "gateway123", // Optional
"product_id": "product456", // Optional
"status": "active" // Optional
}'
The response will include a list of active transactions with the following details:
[
{
"transaction_id": "txn789",
"amount": 100,
"timestamp": "2024-08-12T14:30:00Z"
},
{
"transaction_id": "txn101",
"amount": 250,
"timestamp": "2024-08-12T15:00:00Z"
}
]
This API returns detailed information about a transaction based on the transaction ID and user token. Required inputs:
curl -X GET https://api.example.com/transaction/details \
-H "Authorization: Bearer {user_token}" \
-H "Content-Type: application/json" \
-d '{
"transaction_id": "txn789"
}'
The response will include the following details:
{
"status": "active",
"timestamp": "2024-08-12T14:30:00Z",
"amount": 100,
"wallet_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"email": "[email protected]"
}
This API allows you to create a new gateway ID. The required inputs are:
curl -X POST https://api.example.com/gateway/create \
-H "Authorization: Bearer {user_token}" \
-H "Content-Type: application/json" \
-d '{
"payment_network": "TON",
"currency": "Vestcoin",
"activation_date": "2024-09-01T00:00:00Z", // Optional
"deactivation_date": "2024-09-15T00:00:00Z" // Optional
}'
On success, the server will return a response with the following details:
{
"gateway_id": "gateway789",
"wallets_created": 40,
"transaction_identifier": "txn-gw-12345",
"wallet_key": "walletkey123",
"creation_time": "2024-08-12T14:30:00Z"
}
This API returns the balance of wallets associated with a specific gateway. Required inputs:
curl -X GET https://api.example.com/gateway/balance \
-H "Authorization: Bearer {user_token}" \
-H "Content-Type: application/json" \
-d '{
"wallet_key": "walletkey123"
}'
The response will include a list of balances for the wallets associated with the gateway:
[
{
"wallet_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"balance": 500
},
{
"wallet_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy",
"balance": 300
}
]
This API is used for settling a gateway. Required inputs:
curl -X POST https://api.example.com/gateway/settlement \
-H "Authorization: Bearer {user_token}" \
-H "Content-Type: application/json" \
-d '{
"wallet_key": "walletkey123",
"gateway_id": "gateway789",
"destination_wallet": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy",
"transaction_tag": "settle123" // Optional
}'
The response will include details of the settlement transaction:
{
"amount_transferred": 100,
"source_wallet": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"destination_wallet": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy",
"transaction_time": "2024-08-12T15:00:00Z",
"status": "successful"
}
This API returns a list of settlements for a specific gateway. Required inputs:
curl -X GET https://api.example.com/gateway/settlement-history \
-H "Authorization: Bearer {user_token}" \
-H "Content-Type: application/json" \
-d '{
"gateway_id": "gateway789"
}'
The response will include a list of settlements made for the gateway:
[
{
"amount": 100,
"time": "15:00",
"date": "2024-08-12",
"fee": 1,
"currency": "Vestcoin",
"payment_network": "TON",
"source_wallet": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"destination_wallet": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"
},
{
"amount": 200,
"time": "16:00",
"date": "2024-08-13",
"fee": 2,
"currency": "Vestcoin",
"payment_network": "TRON",
"source_wallet": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"destination_wallet": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"
}
]
Below is a list of error codes and descriptions that you might encounter while using the API:
Error Code | Description |
---|---|
500 | Token not found |
501 | Token is inactive |
502 | Gateway is inactive |
503 | Gateway ID is incorrect |
504 | Invalid entry |
505 | Destination wallet is invalid |
506 | Source wallet balance is insufficient |
507 | Source wallet balance is less than the transfer fee |
508 | Transaction key is incorrect |
509 | Transactions not found |
600 | Server error |
601 | ID not found |
602 | Unauthorized access |
603 | Unstable transaction |
604 | Transaction amount is less than the minimum allowed |