TXG Wallet Send Money API reference
GET POST
https://txg-gateway.xyz/client/api/send.php
Authentication

Every request is signed by two secrets

The sender is identified by an api_key, and every transfer additionally requires a secret_pin — the sender's transaction PIN. Both must belong to the account that's paying out; there's no separate signing header or bearer token.

If either value doesn't match the sender's account, the request fails before any balance is touched.

Required on every call
api_key     sender's API key
secret_pin  sender's transaction PIN
Parameters

Request parameters

Six optional parameters give you control over transaction IDs, remarks, visibility, and pending status — only api_key, secret_pin, toUser, and amount are required.

ParameterRequiredTypeDescription
api_keyRequiredStringSender's API key
secret_pinRequiredStringSender's transaction PIN
toUserRequiredStringReceiver's User ID, email, Telegram ID, or phone
amountRequiredNumberAmount to transfer. Minimum 1
txn_idOptionalStringCustom transaction ID, 8–32 characters
remarkOptionalStringTransaction remark
publicOptionalInteger1 creates a public transaction link, 0 disables it
manualOptionalBooleanCreates a pending transaction when enabled
Making a request

GET request

All parameters can be passed directly as a query string. Useful for quick tests, but see the security note below before using this in production.

Example request
https://txg-gateway.xyz/client/api/send.php?api_key=YOUR_API_KEY&secret_pin={yourpin}&toUser={number}&amount={amount}&remark={comment}
Making a request

POST request

POST accepts both traditional form-encoded bodies and JSON. Set Content-Type to match the body you're sending.

Form data
POST /TXG-WALLET/client/api/send.php
Content-Type: application/x-www-form-urlencoded

api_key=YOUR_API_KEY&secret_pin=1234&toUser=73737277&amount=10&remark=hii
JSON
POST /TXG-WALLET/client/api/send.php
Content-Type: application/json

{
  "api_key": "YOUR_API_KEY",
  "secret_pin": "1234",
  "toUser": "73737277",
  "amount": 10,
  "remark": "hii"
}
Responses

Response structure

Every response — success or failure — shares the same shape: an ok boolean, a top‑level status string ("success" or "failed"), a human‑readable message, and a result object carrying a machine‑readable status code.

ok: true · status: "success" manual → pending ok: false · status: "failed"
Successful transfer
{
  "ok": true,
  "status": "success",
  "message": "Transfer successful",
  "result": {
    "status": "TRANSFER_SUCCESSFUL",
    "jazy_txn_id": "A1B2C3D4E5F678",
    "txn_id": null,
    "amount": 10,
    "sender": "SENDER_USER_ID",
    "receiver": "73737277",
    "txn_link": "https://txg-gateway.xyz/txn/index.php?id=A1B2C3D4E5F678"
  }
}
Error response (example)
{
  "ok": false,
  "status": "failed",
  "message": "Insufficient balance",
  "result": {
    "status": "INSUFFICIENT_FUNDS",
    "balance": 5,
    "amount": 10
  }
}
Transaction ID

Auto-generated or your own

Leave txn_id out and the API generates a unique jazy_txn_id for you. Supply your own txn_id and it must be 8–32 characters — duplicates are rejected outright.

Both forms
jazy_txn_id = A1B2C3D4E5F678   // auto-generated
txn_id      = ABC12345678       // your own, 8–32 chars
Receiver identification

toUser accepts four formats

Identify the receiver however is most convenient — user ID, email, Telegram ID, or phone number all resolve to the same account.

Accepted values
toUser=73737277            // user ID
toUser=user@example.com    // email
toUser=919876543210        // phone
Amount rules

Minimum transfer is 1

Zero, negative, and non-numeric amounts are all rejected before the transfer is attempted.

Valid vs. invalid
amount=10     // valid
amount=0      // invalid
amount=-5     // invalid
amount=abc    // invalid
Insufficient balance

The sender's balance is checked first

If the sender can't cover the amount, the API returns their current balance alongside the requested amount so you can surface a clear message to the user.

Rejected response
{
  "ok": false,
  "status": "failed",
  "message": "Insufficient balance",
  "result": {
    "status": "INSUFFICIENT_FUNDS",
    "balance": 5,
    "amount": 10
  }
}
Pending transfers

Hold a transaction for manual review

Pass manual=true and the transaction is created with a pending status instead of settling immediately — useful for flows that need a review step before funds move.

manual=true response
{
  "ok": true,
  "status": "success",
  "message": "Transaction pending",
  "result": {
    "status": "TRANSFER_PENDING",
    "jazy_txn_id": "A1B2C3D4E5F678"
  }
}
Error codes

Every failure returns a specific status

Check result.status to branch your error handling — these are the full set of codes this endpoint can return. All errors also include "status": "failed" at the top level.

INVALID_SENDERThe api_key doesn't match an account
BANNEDSender account is banned
PIN_NOT_SETSender hasn't set a transaction PIN
WRONG_PINsecret_pin doesn't match
INVALID_RECEIVERtoUser doesn't resolve to an account
SELF_TRANSFER_NOT_ALLOWEDSender and receiver are the same account
INSUFFICIENT_FUNDSBalance is lower than the amount
INVALID_AMOUNTAmount is zero, negative, or non-numeric
AMOUNT_MISSINGamount parameter wasn't sent
INVALID_TXN_IDCustom txn_id fails length rules
DUPLICATE_TXN_IDtxn_id was already used
MAINTENANCE_MODEThe API is temporarily unavailable
Before you go live

Prefer POST + JSON in production

A GET request puts your api_key and secret_pin directly in the URL, where they can end up in browser history, proxy logs, and server access logs. Switch to POST with a JSON body before shipping.

Never log or expose secret_pin client-side — treat it with the same care as a payment PIN, because it functionally is one.
Recommended request
POST /TXG-WALLET/client/api/send.php
Content-Type: application/json

{
  "api_key": "YOUR_API_KEY",
  "secret_pin": "1234",
  "toUser": "73737277",
  "amount": 10,
  "remark": "Payment"
}