comments-dollarstartTONPayment

The startTONPayment mutation generates a TON wallet to receive user deposits, converts the USD amount to TON using a live exchange rate, and monitors the wallet for 15 minutes. If the expected deposit is received, the system forwards the funds to the custodian wallet.


πŸ”— Endpoint

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


🧾 Mutation Structure

mutation StartTONPayment($transactionId: String!) {
  startTONPayment(transactionId: $transactionId) {
    code
    message
    transaction {
      transactionId
      amount
      amountInToken
      network
      payAddress
      recipientAddress
      status
      adminTransferred
    }
  }
}

πŸ“₯ Parameters

Name
Type
Required
Description

transactionId

String

βœ…

ID from the payment mutation


βœ… Successful Response


🚫 Error Codes

Code
Description

200

Monitoring started

404

Transaction not found or already processed

500

Internal server error


πŸ”„ Monitoring Behavior

  1. A TON wallet is generated for the customer.

  2. The system checks TON/USDT Live Price.

  3. The user sends funds to the wallet.

  4. If the TON deposit is sufficient:

    • Funds are auto-forwarded to your custodian wallet.

    • The transaction is marked completed.

  5. If the timeout (15 minutes) is reached with no deposit:

    • The transaction is marked expired.


πŸ§ͺ Code

Python


JavaScript

Last updated