Order Payout
Interface Gateway
URL address:
https://pay.xxx.io/pay/unifiedorder
Tips
This interface is a test interface, please ask the sales person for it
Request Parameter
| Parameter Name | Variable Name | Type | Required | Example | Comment | 
|---|---|---|---|---|---|
| Merchant UID | mchid | string | TRUE | 100000 | Merchant UID | 
| Merchant User ID | userid | string | TRUE | U123456789 | Merchant User ID | 
| Merchant Trade No | out_trade_no | string | TRUE | 1.00966E+18 | Merchant Trade No | 
| Product Description | subject | string | TRUE | Demo | Product Description | 
| Product Info | body | string | TRUE | Demo | Product Info | 
| Pay Amount | amount | float | TRUE | 1000 | Total pay amount, two digits precision | 
| Pay Code | channel | string | TRUE | inpay_payout | (1) Payment: inpay_bankupi/vnpay_napas_vietqr  (2) Payout: inpay_payout/vnpay_payout  | 
| Extra Data | extparam | string | TRUE | If it is a payment request (channel is inpay_payout/vnpay_payout), then extparam needs to add userid bankname bankcode bankaccount accountname parameter, the parameter format is json | |
| Currency Code | currency | string | TRUE | INR | Payment Currency: CNY, INR, VND | 
| Client IP | client_ip | string | TRUE | 127.0.0.1 | Client IP | 
| Callback URL | notify_url | string | FALSE | Asynchronous callback address: If it is empty or not passed, there will be no callback. | |
| Return URL | return_url | string | FALSE | Synchronous redirect address: If it is empty or not passed, there will be no redirect. | 
Example:
{
	"extparam": {
		"accountname": "Nguyễn Thành Phát",
		"bankaccount": "0824287105",
		"bankcode": "MB"
	},
	"amount": 10000,
	"mchid": 100000,
	"out_trade_no": "23092024183233784",
	"subject": "pay_test",
	"channel": "vnpay_payout",
	"return_url": "http://localhost:8001/demo.html",
	"currency": "VND",
	"client_ip": "127.0.0.1",
	"body": "pay_test",
	"notify_url": "http://localhost:8001/cashier/demonotify",
	"userid": "U123456789"
}
Tips
extparam parameter description
- When the channel is inpay_payout/vnpay_payout, extparam needs to add bankcode/bankaccount/accountname parameter:
 
{
	"accountname": "Nguyễn Thành Phát",
	"bankaccount": "0824287105",
	"bankcode": "MB"
}
Response Result
| Result Name | Variable Name | Type | Required | Example | Comment | 
|---|---|---|---|---|---|
| Result Code | result_code | string | TRUE | OK | Result Code. OK: Success, Other: Failure | 
| Return Message | result_msg | string | TRUE | SUCCESS | Prompt Information. SUCCESS: success | 
| Payload | charge | object | TRUE | Return the payment payload object (please see the specific data below) | 
Success Example:
{
	"result_code": "OK",
	"result_msg": "SUCCESS",
	"charge": {
		"channel": "vnpay_payout",
		"out_trade_no": "23092024183233784",
		"client_ip": "127.0.0.1",
		"amount": "10000",
		"currency": "VND",
		"subject": "pay_test",
		"body": "pay_test",
		"extparam": {
			"accountname": "Nguyễn Thành Phát",
			"bankaccount": "0824287105",
			"bankcode": "MB"
		},
		"credential": {
			"out_trade_no": "9451fa8fac8569dab6443cb54270728a",
			"merchant_wallet": {
				"uid": 100000,
				"total_limit_credits": "-1000000000.00",
				"total_security_deposit_credits": "0.00",
				"total_unsettled_credits": "121356.33",
				"total_hold_credits": "0.00",
				"total_commission_credits": "229.47",
				"total_available_credits": "-42728.13"
			}
		}
	}
}
Error Example:
{
    "error_msg": "Invalid Request.[ Request header [authentication] Failure.]",
    "error_code": 400000
}
Tips
[success] This is the successful return information, only when result_code=OK and result_msg= SUCCESS in the returned JSON data can charge
- status is order business status: 
- 0-closed
 - 1-waiting
 - 2-success
 - 3-failure
 - 4-paying
 - 5-settled
 - 6-refunded
 - 7-dispute
 
 
[error] This is the error return information only have error_code and error_msg in the returned JSON data
