Agent API Documentation
Automatically verify customer deposits, check agent float balances, and approve payment transactions in real time.
https://tzpayway.com/api/v1/agent
Core Features
Instant Deposit Alerts
Send automated alerts as soon as customer money arrives in your bKash, Nagad, Rocket, or Upay wallet.
Approve Payments
Confirm pending transactions programmatically upon receipt of payment details.
Secure Header Key
Send your API key in the request header to secure every API call.
Quick Links
Method Inputs
Method required fields
Check Balance
View float & status
Pending Deposits
List pending deposits
Approve Deposit
Confirm deposit
Pending Withdrawals
List open withdrawals
Approve Withdrawal
Confirm withdrawal
Getting Started
Authentication
Send your API key in the request header to authenticate every request.
X-AGENT-API-KEY
Pass your Agent API key in the X-AGENT-API-KEY header on every HTTP request.
X-AGENT-API-KEY:
IP Whitelisting
Restrict API requests to specific server IP addresses from your Agent Dashboard for extra protection.
Configuration & Specifications
Method-Based Required Inputs
Every payment gateway (bKash, Nagad, Rocket, Upay, etc.) defines specific input requirements for verifying deposits and approving withdrawals. Below is the active schema breakdown for all supported payment methods.
bKash
bkash BDTDeposit: 10.00 - 50,000.00 BDT • Withdraw: 500.00 - 50,000.00 BDT
Deposit Ping Inputs (/api/v1/agent/ping)
Passed in request body
| Field Key | Label | Type | Status | Validation & Notes |
|---|---|---|---|---|
amount
|
Deposit Amount | number | Required | Must be greater than 0 e.g. 500.00 |
payment_details.sender_number
or root sender_number
|
Sender Number | text | Required | Min 11 chars Max 11 chars |
payment_details.transaction_id
or root transaction_id
|
Transaction ID | text | Required | Min 8 chars Max 25 chars • Unique transaction ID required |
Withdrawal Settlement Inputs (/api/v1/agent/transactions/{id}/accept)
Required when agent confirms payout
| Field Key | Purpose | Type | Required | Notes |
|---|---|---|---|---|
confirm_amount
|
Confirmed Payout Amount | number | Optional | Auto-fills from order amount if omitted |
payment_details.transaction_id
or root transaction_id
|
Transaction ID | text | Required |
Accepts as transaction_id, payment_details.transaction_id, or dynamic_data.transaction_id
|
Nagad
nagad BDTDeposit: 10.00 - 50,000.00 BDT • Withdraw: 300.00 - 50,000.00 BDT
Deposit Ping Inputs (/api/v1/agent/ping)
Passed in request body
| Field Key | Label | Type | Status | Validation & Notes |
|---|---|---|---|---|
amount
|
Deposit Amount | number | Required | Must be greater than 0 e.g. 500.00 |
payment_details.sender_number
or root sender_number
|
Sender Number | text | Required | Min 11 chars Max 11 chars |
payment_details.transaction_id
or root transaction_id
|
Transaction ID | text | Required | Min 8 chars Max 25 chars • Unique transaction ID required |
Withdrawal Settlement Inputs (/api/v1/agent/transactions/{id}/accept)
Required when agent confirms payout
| Field Key | Purpose | Type | Required | Notes |
|---|---|---|---|---|
confirm_amount
|
Confirmed Payout Amount | number | Optional | Auto-fills from order amount if omitted |
payment_details.transaction_id
or root transaction_id
|
Transaction ID | text | Required |
Accepts as transaction_id, payment_details.transaction_id, or dynamic_data.transaction_id
|
Rocket
rocket BDTDeposit: 10.00 - 50,000.00 BDT • Withdraw: 300.00 - 50,000.00 BDT
Deposit Ping Inputs (/api/v1/agent/ping)
Passed in request body
| Field Key | Label | Type | Status | Validation & Notes |
|---|---|---|---|---|
amount
|
Deposit Amount | number | Required | Must be greater than 0 e.g. 500.00 |
payment_details.sender_number
or root sender_number
|
Sender Number | text | Required | Min 11 chars Max 11 chars |
payment_details.transaction_id
or root transaction_id
|
Transaction ID | text | Required | Min 8 chars Max 25 chars • Unique transaction ID required |
Withdrawal Settlement Inputs (/api/v1/agent/transactions/{id}/accept)
Required when agent confirms payout
| Field Key | Purpose | Type | Required | Notes |
|---|---|---|---|---|
confirm_amount
|
Confirmed Payout Amount | number | Optional | Auto-fills from order amount if omitted |
payment_details.transaction_id
or root transaction_id
|
Transaction ID | text | Required |
Accepts as transaction_id, payment_details.transaction_id, or dynamic_data.transaction_id
|
API Endpoints
Check Agent Balance
Check your current agent float balance and active status.
Headers
Response Fields
curl --request GET \
--url https://tzpayway.com/api/v1/agent/status \
--header 'X-AGENT-API-KEY: YOUR_AGENT_KEY'
{
"success": true,
"data": {
"agent_id": 3,
"name": "Shakhawat Hossain",
"balance": 100,
"available_balance": 95.10000001,
"pending_deposits_usd": 4.89999999,
"status": "active",
"last_heartbeat": "2026-08-18T12:15:05+06:00"
}
}
API Endpoints
Pending Transactions
Get all assigned pending transactions waiting for agent approval.
Headers
curl --request GET \
--url https://tzpayway.com/api/v1/agent/transactions/pending \
--header 'X-AGENT-API-KEY: YOUR_AGENT_KEY'
{
"success": true,
"data": [
{
"id": 1,
"trx_id": "TZDUJURCKD55W",
"amount": 500.00,
"usd_amount": 4.00,
"method_currency": "BDT",
"status": "pending",
"method": "bkash",
"type": "deposit",
"customer_number": "01798616779",
"submitted_info": {
"sender_number": "01798616779",
"transaction_id": "ASDFGH12"
}
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"total": 1
}
}
API Endpoints
Approve Payment
Approve or confirm payment for a pending transaction ID.
Headers
Request Body
The amount confirmed e.g. 500.00.
curl --request POST \
--url https://tzpayway.com/api/v1/agent/transactions/1/accept \
--header 'X-AGENT-API-KEY: YOUR_AGENT_KEY' \
--header 'Content-Type: application/json' \
--data '{
"confirm_amount": 500.00
}'
{
"success": true,
"message": "Transaction is now fully paid.",
"data": {
"trx_id": "TZDUJURCKD55W",
"status": "paid",
"received_amount": 500.00
}
}
API Endpoints
Pending Withdrawals
Get all assigned pending withdrawal requests waiting for agent processing and approval.
Headers
curl --request GET \
--url https://tzpayway.com/api/v1/agent/withdraw/pending \
--header 'X-AGENT-API-KEY: YOUR_AGENT_KEY'
{
"success": true,
"data": [
{
"id": 4,
"trx_id": "TZDTESTKBOK9RBA",
"amount": 100,
"usd_amount": 0.8,
"method_currency": "BDT",
"status": "pending",
"method": "nagad",
"type": "withdrawal",
"customer_number": "01798616779",
"submitted_info": {
"account_number": "01798616779"
},
"created_at": "2026-08-18T06:06:29.000000Z"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"total": 1
}
}
API Endpoints
Approve Withdrawal
Approve or settle a pending withdrawal request with reference and payment proof.
Headers
Request Body
The withdrawal transaction ID or DB numeric ID e.g. TZDTESTKBOK9RBA.
The confirmed amount settled to customer e.g. 100.00.
Transaction ID. Send inside payment_details object.
curl --request POST \
--url https://tzpayway.com/api/v1/agent/withdraw/approve \
--header 'X-AGENT-API-KEY: YOUR_AGENT_KEY' \
--header 'Content-Type: application/json' \
--data '{
"trx_id": "TZDTESTKBOK9RBA",
"confirm_amount": 100.00,
"payment_details": {
"transaction_id": "EXAMPLE_VALUE" }
}'
{
"success": true,
"message": "Withdrawal request approved successfully.",
"data": {
"trx_id": "TZDTESTKBOK9RBA",
"status": "paid",
"received_amount": 100.00
}
}
Error Reference
Error Codes
Common HTTP status codes returned by the Agent API.