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.
api_key sender's API key secret_pin sender's transaction PIN
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.
| Parameter | Required | Type | Description |
|---|---|---|---|
api_key | Required | String | Sender's API key |
secret_pin | Required | String | Sender's transaction PIN |
toUser | Required | String | Receiver's User ID, email, Telegram ID, or phone |
amount | Required | Number | Amount to transfer. Minimum 1 |
txn_id | Optional | String | Custom transaction ID, 8–32 characters |
remark | Optional | String | Transaction remark |
public | Optional | Integer | 1 creates a public transaction link, 0 disables it |
manual | Optional | Boolean | Creates a pending transaction when enabled |
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.
https://txg-gateway.xyz/client/api/send.php?api_key=YOUR_API_KEY&secret_pin={yourpin}&toUser={number}&amount={amount}&remark={comment}
POST request
POST accepts both traditional form-encoded bodies and JSON. Set Content-Type to match the body you're sending.
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
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"
}
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",
"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"
}
}
{
"ok": false,
"status": "failed",
"message": "Insufficient balance",
"result": {
"status": "INSUFFICIENT_FUNDS",
"balance": 5,
"amount": 10
}
}
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.
jazy_txn_id = A1B2C3D4E5F678 // auto-generated txn_id = ABC12345678 // your own, 8–32 chars
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.
toUser=73737277 // user ID toUser=user@example.com // email toUser=919876543210 // phone
Minimum transfer is 1
Zero, negative, and non-numeric amounts are all rejected before the transfer is attempted.
amount=10 // valid amount=0 // invalid amount=-5 // invalid amount=abc // invalid
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.
{
"ok": false,
"status": "failed",
"message": "Insufficient balance",
"result": {
"status": "INSUFFICIENT_FUNDS",
"balance": 5,
"amount": 10
}
}
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.
{
"ok": true,
"status": "success",
"message": "Transaction pending",
"result": {
"status": "TRANSFER_PENDING",
"jazy_txn_id": "A1B2C3D4E5F678"
}
}
Shareable by default
Every successful transfer returns a txn_link unless you opt out with public=0, in which case the field comes back null.
"txn_link": null
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 accountBANNEDSender account is bannedPIN_NOT_SETSender hasn't set a transaction PINWRONG_PINsecret_pin doesn't matchINVALID_RECEIVERtoUser doesn't resolve to an accountSELF_TRANSFER_NOT_ALLOWEDSender and receiver are the same accountINSUFFICIENT_FUNDSBalance is lower than the amountINVALID_AMOUNTAmount is zero, negative, or non-numericAMOUNT_MISSINGamount parameter wasn't sentINVALID_TXN_IDCustom txn_id fails length rulesDUPLICATE_TXN_IDtxn_id was already usedMAINTENANCE_MODEThe API is temporarily unavailablePrefer 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.
secret_pin client-side — treat it with the same care as a payment PIN, because it functionally is one.
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"
}