checkTONBalance

The checkTONBalance query fetches the current balance of a TON wallet assigned to a specific transaction. This is useful for checking whether a user has completed a deposit before automatic transfer triggers.


πŸ”— Endpoint

URL: https://argonpay.onrender.com/graphql Method: POST Content-Type: application/json


πŸ” Query Structure

query CheckTONBalance($apiKey: String!, $transactionId: String!) {
  checkTONBalance(apiKey: $apiKey, transactionId: $transactionId) {
    code
    message
    balance
  }
}

πŸ“₯ Parameters

Name
Type
Required
Description

apiKey

String

βœ…

Your ArgonPay API key

transactionId

String

βœ…

The TON-based transaction ID to check


βœ… Successful Response


🚫 Error Codes

Code
Description

200

TON wallet balance retrieved successfully

401

Invalid or unauthorized API key

404

Transaction not found or not a TON wallet transaction

500

Server or TON RPC error


πŸ§ͺ Code Examples

Python Example


JavaScript Example

Last updated