Copied to clipboard!

Settlexpay API Documentation

Complete integration guide for instant payout solutions

API Version 4.0

Overview

The 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.

Base URL:
https://api.settlexpay.com (Production)
https://sandbox.settlexpay.com (Testing)

Key Features

Authentication

All API requests require authentication using your secret_key and user_token. These credentials can be found in your merchant dashboard.

Security Notice: Never expose your secret_key in client-side code or public repositories. Always make API calls from your server.

Authentication Parameters

Parameter Type Description
secret_key String Your API secret key (Found in dashboard)
user_token String Your unique user authentication token

Create Payout

Create a new payout request to transfer funds to a beneficiary's bank account.

POST https://api.settlexpay.com/merchant/v4/payout_create

Request Parameters

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

Example Request (cURL)

cURL
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"

Example Request (PHP)

PHP
<?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'];
}
?>

Success Response

JSON
{
  "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"
  }
}

Check Payout Status

Query the status of a payout transaction using the payout_id.

POST https://api.settlexpay.com/merchant/v4/payout_status

Request Parameters

Parameter Type Required Description
user_token String Required Your authentication token
payout_id String Required Transaction ID to check status for

Example Request

cURL
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"

Success Response

JSON
{
  "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"
  }
}

Transaction Status Codes

Understanding transaction statuses helps you track payout lifecycle and handle different scenarios appropriately.

βœ…

SUCCESS

Description: Payout completed successfully. Funds have been transferred to the beneficiary's account.

Action: No further action required. UTR number available.

⏳

PENDING

Description: Payout is being processed by our system. This typically takes a few seconds.

Action: Wait for webhook notification or poll status API.

πŸ”„

PROCESSING

Description: Transaction has been submitted to the bank and is being processed.

Action: Transaction is in progress. Usually completes within seconds.

❌

FAILED

Description: Payout failed due to bank rejection, invalid account details, or technical issues.

Action: Amount automatically refunded to wallet. Check error message for details.

🚫

REVERSED

Description: Previously successful transaction was reversed by the bank.

Action: Amount credited back to wallet. Contact support for details.

⏸️

ON_HOLD

Description: Transaction is on hold pending manual review or compliance check.

Action: Our team is reviewing. You'll be notified once resolved.

Status Flow Diagram

PENDING
β†’
PROCESSING
β†’
SUCCESS

or

PROCESSING
β†’
FAILED

Status Response Fields

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)

Webhook Integration

Settlexpay sends real-time webhook notifications to your server whenever a payout status changes. Configure your webhook URL in the merchant dashboard.

Webhook URL Configuration: Set your webhook endpoint URL in Dashboard β†’ Settings β†’ Webhooks. We'll send POST requests with JSON payload.

Webhook Payload

JSON
{
  "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"
}

Webhook Handler Example (PHP)

PHP
<?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']);
?>

Error Codes

When an error occurs, the API returns a JSON response with status: false and an error message.

Error Response Format

JSON
{
  "status": false,
  "error_code": "BAL_001",
  "message": "Insufficient wallet balance"
}

Common Error Codes

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

Support & Resources

WhatsApp Support

24/7 Instant Support

Chat Now: +91 77370 88407

Email Support

Technical Assistance

support@settlexpay.com

Documentation

Guides & Tutorials

View Full Docs