集成 DhanSolution 支付网关所需的一切。
Everything you need to integrate DhanSolution payment gateway.
接口地址 Base URL: https://dhansolution.in/pay/api/index.php?route=
DhanSolution 支付网关支持 两种货币,每个商户固定分配一种货币。系统根据商户的货币自动选择支付通道。
DhanSolution payment gateway supports two currencies. Each merchant is assigned one currency, and the system automatically routes payments to the correct channel.
INRUPIPKRPH (JazzCash) 或 PKRPH-EASY (EasyPaisa)所有 API 请求都需要身份验证。请将您的凭证作为 POST 参数发送。
All API requests require authentication. Send your credentials as POST parameters:
| Parameter | Type | Description |
|---|---|---|
api_key | String | Your API Key (find in Credentials page) |
api_secret | String | Your API Secret (find in Credentials page) |
All requests use application/x-www-form-urlencoded. Responses are JSON.
创建付款订单。返回一个用于跳转客户的支付链接。
Create a payment order. Returns a payment URL to redirect the customer.
trade_type,系统自动使用 INRUPI。
trade_type 参数选择支付方式:PKRPH(JazzCash,默认)或 PKRPH-EASY(EasyPaisa)。
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | Float | Yes | Payment amount (e.g. 100.00) |
trade_type | String | No | PKR only PKRPH (JazzCash) or PKRPH-EASY (EasyPaisa). Default: PKRPH. Not needed for INR. |
remark | String | No | Order remark (returned in callback) |
ip | String | No | Customer IP address |
notify_url | String | No | Your webhook URL for callbacks |
INR Example Request:
PKR Example Request (JazzCash):
Example Response:
查询现有付款订单的状态。
Check the status of an existing payment order.
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | String | Yes | The order ID from payment/create |
Example Response:
Status Values: pending · success · failed · expired
查询您的可用余额。
Check your available balance.
响应中 currency 字段返回您商户的货币类型 (INR 或 PKR)。
The currency field returns your merchant's assigned currency (INR or PKR).
发起出款到受益人账户。资金会从您的余额中扣除。
Initiate a payout to a beneficiary. Funds are deducted from your balance.
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | Float | Yes | Payout amount (must be ≤ available balance) |
account_name | String | Yes | Beneficiary account holder name |
bank_name | String | Yes | Beneficiary bank name (e.g. HDFC Bank) |
account_number | String | Yes | Beneficiary bank account number |
ifsc | String | Yes | Beneficiary IFSC code (e.g. HDFC0001234) |
phone | String | No | Beneficiary phone number |
remark | String | No | Payout remark |
notify_url | String | No | Webhook URL for payout callbacks |
INR Example Request:
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | Float | Yes | Payout amount (must be ≤ available balance) |
account_name | String | Yes | Beneficiary account holder name |
account_number | String | Yes | Beneficiary wallet number (03xxxxxxxxx) |
phone | String | Yes | Beneficiary phone number (03xxxxxxxxx) |
uid | String | Yes | CNIC number (format: 42201-1234567-1) |
card_number | String | Yes | Card number |
addon1 | String | Yes | Wallet type: jazzcash or easypaisa |
remark | String | No | Payout remark |
notify_url | String | No | Webhook URL for payout callbacks |
PKR Example Request (JazzCash):
Example Response (both currencies):
实时查询出款状态。
Check the real-time status of a payout.
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | String | Yes | The payout order ID |
Status Values: pending · processing · success · failed
当支付完成时,DhanSolution 会向您的 notify_url 发送回调。
When a payment is completed, DhanSolution sends a callback to your notify_url.
| Header | Description |
|---|---|
X-DhanSolution-Signature | HMAC-SHA256 signature of JSON body using your webhook secret |
X-DhanSolution-Event | Event type: payment.completed |
Callback Body:
当出款状态更新时,DhanSolution 会向您的 notify_url 发送回调。
When a payout status updates, DhanSolution sends a callback to your notify_url.
| Header | Description |
|---|---|
X-DhanSolution-Signature | HMAC-SHA256 signature of JSON body using your webhook secret |
X-DhanSolution-Event | Event type: payout.completed |
| Code | Message | Description |
|---|---|---|
| 401 | Missing API credentials | API key or secret not provided |
| 401 | Invalid API credentials | API key or secret is incorrect |
| 400 | Invalid amount | Amount must be greater than 0 |
| 400 | Missing order_id | Order ID required for status check |
| 400 | Insufficient balance | Balance less than payout amount |
| 400 | Missing required fields | Required payout fields not provided |
| 400 | Invalid trade_type | Invalid trade_type for PKR merchant. Use PKRPH or PKRPH-EASY |
| 404 | Order not found | No order found with given ID |