Complete integration guide for instant payout solutions
API Version 4.0The Settlexpay API allows you to programmatically create payout requests and manage transactions. Our API supports multiple payout modes including Bank Transfer (IMPS, NEFT, RTGS), UPI, and Card disbursements.
https://api.settlexpay.com (Production)https://sandbox.settlexpay.com (Testing)
All API requests require authentication using your secret_key and user_token. These credentials can be found in your merchant dashboard.
| Parameter | Type | Description |
|---|---|---|
secret_key |
String | Your API secret key (Found in dashboard) |
user_token |
String | Your unique user authentication token |
Create a new payout request to transfer funds to a beneficiary's bank account.
| Parameter | Type | Required | Description |
|---|---|---|---|
secret_key |
String | Required | Your API secret key |
user_token |
String | Required | Your authentication token |
amount |
Numeric | Required | Payout amount (Min: βΉ10, Max: βΉ100,000) |
bank_account |
String | Required | Beneficiary bank account number |
ifsc |
String | Required | 11-character IFSC code |
account_holder |
String | Required | Name of account holder |
bank_name |
String | Required | Bank name |
payout_id |
String | Required | Unique transaction reference ID |
remark |
String | Optional | Transaction remark/note |
curl -X POST https://api.settlexpay.com/merchant/v4/payout_create \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "secret_key=YOUR_SECRET_KEY" \
-d "user_token=YOUR_USER_TOKEN" \
-d "amount=1000" \
-d "bank_account=1234567890" \
-d "ifsc=SBIN0001234" \
-d "account_holder=John Doe" \
-d "bank_name=State Bank of India" \
-d "payout_id=TXN123456789" \
-d "remark=Salary Payment"
<?php
$ch = curl_init();
$data = array(
'secret_key' => 'YOUR_SECRET_KEY',
'user_token' => 'YOUR_USER_TOKEN',
'amount' => 1000,
'bank_account' => '1234567890',
'ifsc' => 'SBIN0001234',
'account_holder' => 'John Doe',
'bank_name' => 'State Bank of India',
'payout_id' => 'TXN123456789',
'remark' => 'Salary Payment'
);
curl_setopt_array($ch, array(
CURLOPT_URL => 'https://api.settlexpay.com/merchant/v4/payout_create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($data)
));
$response = curl_exec($ch);
$result = json_decode($response, true);
curl_close($ch);
if ($result['status']) {
echo "Payout created successfully!";
} else {
echo "Error: " . $result['message'];
}
?>
{
"status": true,
"message": "Payout request created successfully",
"result": {
"payout_id": "TXN123456789",
"order_id": "SXP_1234567890",
"amount": 1000,
"status": "PENDING",
"created_at": "2026-01-10 14:30:00"
}
}
Query the status of a payout transaction using the payout_id.
| Parameter | Type | Required | Description |
|---|---|---|---|
user_token |
String | Required | Your authentication token |
payout_id |
String | Required | Transaction ID to check status for |
curl -X POST https://api.settlexpay.com/merchant/v4/payout_status \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "user_token=YOUR_USER_TOKEN" \
-d "payout_id=TXN123456789"
{
"status": true,
"message": "Transaction found",
"result": {
"payout_id": "TXN123456789",
"order_id": "SXP_1234567890",
"amount": 1000,
"status": "SUCCESS",
"utr": "UTR1234567890",
"created_at": "2026-01-10 14:30:00",
"completed_at": "2026-01-10 14:30:15"
}
}
Understanding transaction statuses helps you track payout lifecycle and handle different scenarios appropriately.
Description: Payout completed successfully. Funds have been transferred to the beneficiary's account.
Action: No further action required. UTR number available.
Description: Payout is being processed by our system. This typically takes a few seconds.
Action: Wait for webhook notification or poll status API.
Description: Transaction has been submitted to the bank and is being processed.
Action: Transaction is in progress. Usually completes within seconds.
Description: Payout failed due to bank rejection, invalid account details, or technical issues.
Action: Amount automatically refunded to wallet. Check error message for details.
Description: Previously successful transaction was reversed by the bank.
Action: Amount credited back to wallet. Contact support for details.
Description: Transaction is on hold pending manual review or compliance check.
Action: Our team is reviewing. You'll be notified once resolved.
or
| Field | Type | Description |
|---|---|---|
status |
String | Current transaction status (SUCCESS, PENDING, FAILED, etc.) |
utr |
String | Unique Transaction Reference (available after SUCCESS) |
created_at |
DateTime | Timestamp when payout was created |
completed_at |
DateTime | Timestamp when payout was completed (SUCCESS/FAILED) |
error_message |
String | Error description (only present if FAILED) |
Settlexpay sends real-time webhook notifications to your server whenever a payout status changes. Configure your webhook URL in the merchant dashboard.
{
"event": "payout.status.updated",
"payout_id": "TXN123456789",
"order_id": "SXP_1234567890",
"status": "SUCCESS",
"amount": 1000,
"utr": "UTR1234567890",
"beneficiary": {
"name": "John Doe",
"account": "1234567890",
"ifsc": "SBIN0001234"
},
"timestamp": "2026-01-10T14:30:15Z"
}
<?php
// webhook.php - Settlexpay Webhook Handler
date_default_timezone_set('Asia/Kolkata');
$logFile = __DIR__ . '/webhook_log_' . date('Y-m-d') . '.txt';
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
http_response_code(405);
exit('Method Not Allowed');
}
$rawInput = file_get_contents('php://input');
$webhookData = json_decode($rawInput, true);
$timestamp = date('Y-m-d H:i:s');
if (json_last_error() === JSON_ERROR_NONE) {
$payoutId = $webhookData['payout_id'] ?? '';
$status = $webhookData['status'] ?? '';
$utr = $webhookData['utr'] ?? '';
// Update your database based on status
switch ($status) {
case 'SUCCESS':
// Mark payout as successful in your database
// updatePayoutStatus($payoutId, 'SUCCESS', $utr);
break;
case 'FAILED':
// Mark payout as failed, refund initiated
// updatePayoutStatus($payoutId, 'FAILED');
break;
case 'PROCESSING':
// Update status to processing
break;
}
$logEntry = "[{$timestamp}] WEBHOOK: {$payoutId} - {$status}\n";
file_put_contents($logFile, $logEntry, FILE_APPEND);
}
header('Content-Type: application/json');
http_response_code(200);
echo json_encode(['status' => 'ok']);
?>
When an error occurs, the API returns a JSON response with status: false and an error message.
{
"status": false,
"error_code": "BAL_001",
"message": "Insufficient wallet balance"
}
| Code | Message | Description | Solution |
|---|---|---|---|
AUTH_001 |
Invalid credentials | Incorrect secret_key or user_token | Verify credentials in dashboard |
VAL_001 |
Invalid IFSC code | IFSC format incorrect | Use valid 11-character IFSC |
VAL_002 |
Invalid amount | Amount out of range | Min: βΉ10, Max: βΉ100,000 |
BAL_001 |
Insufficient balance | Wallet balance too low | Add funds to wallet |
DUP_001 |
Duplicate payout_id | ID already exists | Use unique payout_id |
BANK_001 |
Invalid account | Account doesn't exist | Verify account details |
SYS_001 |
System error | Internal server error | Retry or contact support |