Skip to content

Unipay Agent Merchant API

This page is a complete integration reference. You can complete integration from this page without downloading the YAML file.

Overview

Merchant Model

Agent merchants use transparent upstream routing. Do not pass upstream route fields; the backend selects an enabled ISV route.

sign in examples is a placeholder. Generate it from the actual request fields according to the signature rules.

Response Envelope

FieldTypeRequiredDescription
codeinteger(int32)YesBusiness response code.
msgstringYesBusiness response message.
dataobject|nullNoBusiness response payload.
signstringNoResponse signature signed by the platform.
resTimestring(date-time)NoResponse time.
traceIdstringNoTrace ID for troubleshooting.

Endpoint List

PathAPIDescription
POST /unipay/payPayCreate a Mexico virtual account payment order and start payment processing.
POST /unipay/options/pay-methodsList payment methodsList payment methods available to the current merchant.
POST /unipay/options/payee-typesList transfer payee typesList payee types available to the current merchant for transfers.
POST /unipay/options/payee-codesList transfer payee codesList Ginx public payee codes available to the current merchant for a payeeType.
POST /unipay/closeClose or Cancel PaymentClose an unfinished payment order, optionally using cancel mode.
POST /unipay/inquryTransfer Account InquryValidate the payee account before creating a transfer.
POST /unipay/transferTransferCreate and submit a transfer order.
POST /unipay/query/payOrderQuery Payment OrderQuery the current status and details of a payment order.
POST /unipay/query/transferOrderQuery Transfer OrderQuery the current status and details of a transfer order.
POST /unipay/sync/order/paySync Payment OrderSynchronize payment status from upstream and adjust the local order.

Pay

Create a Mexico virtual account payment order and start payment processing.

Call this after creating a merchant order. Use mex_virtual_account as the method. The response returns the platform order number, payment status, and virtual account payment body.

Request

FieldDescription
MethodPOST
Path/unipay/pay
Content-Typeapplication/json

Common Request Parameters

FieldTypeRequiredConstraintDescription
mchNostringYesmaxLength=32Merchant number.
appIdstringNomaxLength=32Application ID.
reqTimestring(date-time)Yesyyyy-MM-dd HH:mm:ssRequest time in yyyy-MM-dd HH:mm:ss format.
nonceStrstringNomaxLength=32Random nonce. Use a unique value for each request.
signstringYesmaxLength=1024Request signature.
clientIpstringNomaxLength=64Client IP address.

Business Parameters

FieldTypeRequiredConstraintDescription
bizOrderNostringYesminLength=1, maxLength=100Merchant payment order number.
titlestringYesminLength=1, maxLength=100Payment title.
descriptionstringNomaxLength=50Payment description.
expiredTimestring(date-time)NoNoneOrder expiration time.
methodstringYesminLength=1, maxLength=32Payment method code.
limitPaystringNomaxLength=128Payment restriction code.
amountnumber(double)Yesminimum=0.01Transaction amount.
extraParamstringNomaxLength=2048Extension parameters in JSON string format.
attachstringNomaxLength=500Merchant attachment returned in callbacks.
returnUrlstringNomaxLength=200Browser return URL.
quitUrlstringNomaxLength=200Quit URL.
notifyUrlstringNomaxLength=200Asynchronous callback URL.

Request Example

json
{
  "clientIp": "127.0.0.1",
  "nonceStr": "nonce-20260414-001",
  "sign": "<BASE64_RSA_SIGNATURE>",
  "reqTime": "2026-04-14 12:00:00",
  "mchNo": "M2026000001",
  "appId": "APP20260001",
  "bizOrderNo": "BIZ-PAY-20260414-001",
  "title": "Order Payment",
  "description": "Payment for order #001",
  "expiredTime": "2026-04-14 12:00:00",
  "method": "mex_virtual_account",
  "limitPay": "string",
  "amount": 12.5,
  "extraParam": "{\"scene\":\"mobile\"}",
  "attach": "{\"orderTag\":\"vip\"}",
  "returnUrl": "https://merchant.example.com/return",
  "quitUrl": "https://merchant.example.com/quit",
  "notifyUrl": "https://merchant.example.com/callback"
}

Response Data

FieldTypeRequiredDescription
bizOrderNostringNoMerchant payment order number.
orderNostringNoPlatform payment order number.
statusstringNoBusiness status.
payBodystringNoPayment body for starting payment.

Common Values

Payment method

valueDescription
mex_virtual_accountMEX 虚拟账户入金

Payment restriction

valueDescription
no_credit限制信用卡支付

Payment status

valueDescription
wait待支付
progress支付中
success成功
close支付关闭
cancel支付撤销
fail失败
timeout支付超时

Success Response Example

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "bizOrderNo": "BIZ-PAY-20260414-001",
    "orderNo": "P202604140001",
    "status": "success",
    "payBody": "{\"qrCode\":\"https://...\"}"
  },
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Failure Response Example

json
{
  "code": 20052,
  "msg": "验签失败",
  "data": null,
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Callback

Payment order callback

The platform sends a POST callback to notifyUrl when order status changes. Content-Type is application/json.

The body is DaxNoticeResult<PayOrderResult>. data uses the same fields as the order query response.

The platform signs sign with the platform private key. Verify it with the platform public key and return plain text SUCCESS for success.

Timeout is 15 seconds. Failed callbacks are retried up to 16 times. Handle callbacks idempotently by platform order number or merchant business number.

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "bizOrderNo": "BIZ-PAY-20260414-001",
    "orderNo": "P202604140001",
    "title": "Order Payment",
    "description": "Payment for order #001",
    "method": "mex_virtual_account",
    "limitPay": "string",
    "amount": 12.5,
    "fee": 0.01,
    "realAmount": 0.01,
    "status": "success",
    "settleStatus": "not_settle",
    "settleType": "D+1",
    "settleTime": "2026-04-14 12:00:00",
    "payTime": "2026-04-14 12:00:00",
    "closeTime": "2026-04-14 12:00:00",
    "expiredTime": "2026-04-14 12:00:00",
    "attach": "{\"orderTag\":\"vip\"}"
  },
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a",
  "noticeType": "order_status_changed",
  "mchNo": "M2026000001",
  "appId": "APP20260001"
}

Merchant Response

text
SUCCESS

List payment methods

List payment methods available to the current merchant.

Call this before rendering payment methods or building a pay request. Agent merchants receive public method codes without upstream channel details.

Request

FieldDescription
MethodPOST
Path/unipay/options/pay-methods
Content-Typeapplication/json

Common Request Parameters

FieldTypeRequiredConstraintDescription
mchNostringYesmaxLength=32Merchant number.
appIdstringNomaxLength=32Application ID.
reqTimestring(date-time)Yesyyyy-MM-dd HH:mm:ssRequest time in yyyy-MM-dd HH:mm:ss format.
nonceStrstringNomaxLength=32Random nonce. Use a unique value for each request.
signstringYesmaxLength=1024Request signature.
clientIpstringNomaxLength=64Client IP address.

Business Parameters

None

Request Example

json
{
  "clientIp": "127.0.0.1",
  "nonceStr": "nonce-20260414-001",
  "sign": "<BASE64_RSA_SIGNATURE>",
  "reqTime": "2026-04-14 12:00:00",
  "mchNo": "M2026000001",
  "appId": "APP20260001"
}

Response Data

FieldTypeRequiredDescription
codestringNoBusiness response code.
namestringNo名称

Success Response Example

json
{
  "code": 0,
  "msg": "success",
  "data": [
    {
      "code": "mex_virtual_account",
      "name": "MEX虚拟账户入金"
    }
  ],
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Failure Response Example

json
{
  "code": 20052,
  "msg": "验签失败",
  "data": null,
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

List transfer payee types

List payee types available to the current merchant for transfers.

Call this before rendering transfer payee types or building inqury/transfer requests.

Request

FieldDescription
MethodPOST
Path/unipay/options/payee-types
Content-Typeapplication/json

Common Request Parameters

FieldTypeRequiredConstraintDescription
mchNostringYesmaxLength=32Merchant number.
appIdstringNomaxLength=32Application ID.
reqTimestring(date-time)Yesyyyy-MM-dd HH:mm:ssRequest time in yyyy-MM-dd HH:mm:ss format.
nonceStrstringNomaxLength=32Random nonce. Use a unique value for each request.
signstringYesmaxLength=1024Request signature.
clientIpstringNomaxLength=64Client IP address.

Business Parameters

None

Request Example

json
{
  "clientIp": "127.0.0.1",
  "nonceStr": "nonce-20260414-001",
  "sign": "<BASE64_RSA_SIGNATURE>",
  "reqTime": "2026-04-14 12:00:00",
  "mchNo": "M2026000001",
  "appId": "APP20260001"
}

Response Data

FieldTypeRequiredDescription
codestringNoBusiness response code.
namestringNo名称

Success Response Example

json
{
  "code": 0,
  "msg": "success",
  "data": [
    {
      "code": "spei_transfer",
      "name": "SPEI 转账"
    }
  ],
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Failure Response Example

json
{
  "code": 20052,
  "msg": "验签失败",
  "data": null,
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

List transfer payee codes

List Ginx public payee codes available to the current merchant for a payeeType.

Call this when a payee type requires a bank or institution code. Use returned Ginx codes directly in inqury and transfer requests; do not submit raw OPM/Fintoc upstream codes.

Request

FieldDescription
MethodPOST
Path/unipay/options/payee-codes
Content-Typeapplication/json

Common Request Parameters

FieldTypeRequiredConstraintDescription
mchNostringYesmaxLength=32Merchant number.
appIdstringNomaxLength=32Application ID.
reqTimestring(date-time)Yesyyyy-MM-dd HH:mm:ssRequest time in yyyy-MM-dd HH:mm:ss format.
nonceStrstringNomaxLength=32Random nonce. Use a unique value for each request.
signstringYesmaxLength=1024Request signature.
clientIpstringNomaxLength=64Client IP address.

Business Parameters

FieldTypeRequiredConstraintDescription
payeeTypestringYesminLength=1, maxLength=32Payee account type.

Request Example

json
{
  "clientIp": "127.0.0.1",
  "nonceStr": "nonce-20260414-001",
  "sign": "<BASE64_RSA_SIGNATURE>",
  "reqTime": "2026-04-14 12:00:00",
  "mchNo": "M2026000001",
  "appId": "APP20260001",
  "payeeType": "spei_transfer"
}

Response Data

FieldTypeRequiredDescription
codestringNoBusiness response code.
namestringNo名称

Success Response Example

json
{
  "code": 0,
  "msg": "success",
  "data": [
    {
      "code": "mx_banxico",
      "name": "BANXICO"
    }
  ],
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Failure Response Example

json
{
  "code": 20052,
  "msg": "验签失败",
  "data": null,
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Close or Cancel Payment

Close an unfinished payment order, optionally using cancel mode.

Use this when the order expires, the user cancels, or the merchant stops payment. Provide at least one order identifier.

Request

FieldDescription
MethodPOST
Path/unipay/close
Content-Typeapplication/json

Common Request Parameters

FieldTypeRequiredConstraintDescription
mchNostringYesmaxLength=32Merchant number.
appIdstringNomaxLength=32Application ID.
reqTimestring(date-time)Yesyyyy-MM-dd HH:mm:ssRequest time in yyyy-MM-dd HH:mm:ss format.
nonceStrstringNomaxLength=32Random nonce. Use a unique value for each request.
signstringYesmaxLength=1024Request signature.
clientIpstringNomaxLength=64Client IP address.

Business Parameters

FieldTypeRequiredConstraintDescription
orderNostringNomaxLength=100Platform payment order number.
bizOrderNostringNomaxLength=100Merchant payment order number.
useCancelbooleanNoNoneWhether to close by cancel mode.

Request Example

json
{
  "clientIp": "127.0.0.1",
  "nonceStr": "nonce-20260414-001",
  "sign": "<BASE64_RSA_SIGNATURE>",
  "reqTime": "2026-04-14 12:00:00",
  "mchNo": "M2026000001",
  "appId": "APP20260001",
  "orderNo": "P202604140001",
  "bizOrderNo": "BIZ-PAY-20260414-001",
  "useCancel": true
}

Response Data

data is null when the operation succeeds.

Success Response Example

json
{
  "code": 0,
  "msg": "success",
  "data": null,
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Failure Response Example

json
{
  "code": 20052,
  "msg": "验签失败",
  "data": null,
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Transfer Account Inqury

Validate the payee account before creating a transfer.

Use this for bank card, SPEI, or other transfer scenarios that require account validation.

Request

FieldDescription
MethodPOST
Path/unipay/inqury
Content-Typeapplication/json

Common Request Parameters

FieldTypeRequiredConstraintDescription
mchNostringYesmaxLength=32Merchant number.
appIdstringNomaxLength=32Application ID.
reqTimestring(date-time)Yesyyyy-MM-dd HH:mm:ssRequest time in yyyy-MM-dd HH:mm:ss format.
nonceStrstringNomaxLength=32Random nonce. Use a unique value for each request.
signstringYesmaxLength=1024Request signature.
clientIpstringNomaxLength=64Client IP address.

Business Parameters

FieldTypeRequiredConstraintDescription
bizInquryNostringYesminLength=1, maxLength=100Merchant inqury number.
payeeTypestringYesminLength=1, maxLength=32Payee account type.
payeeAccountstringYesminLength=1, maxLength=100Payee account.
payeeNamestringNomaxLength=50Payee name.
payeeCodestringNomaxLength=64Ginx public payee code returned by the payee-codes options API. Do not submit raw upstream bank or institution codes.
extraParamstringNomaxLength=2048Extension parameters in JSON string format.
attachstringNomaxLength=500Merchant attachment returned in callbacks.

Request Example

json
{
  "clientIp": "127.0.0.1",
  "nonceStr": "nonce-20260414-001",
  "sign": "<BASE64_RSA_SIGNATURE>",
  "reqTime": "2026-04-14 12:00:00",
  "mchNo": "M2026000001",
  "appId": "APP20260001",
  "bizInquryNo": "BIZ-INQURY-20260414-001",
  "payeeType": "spei_transfer",
  "payeeAccount": "6222020202020202",
  "payeeName": "ZHANG SAN",
  "payeeCode": "mx_banxico",
  "extraParam": "{\"scene\":\"mobile\"}",
  "attach": "{\"orderTag\":\"vip\"}"
}

Response Data

FieldTypeRequiredDescription
bizInquryNostringNoMerchant inqury number.
inquryNostringNoPlatform inqury number.
statusstringNoBusiness status.
accountValidbooleanNoWhether the payee account is valid.
uploadPayeeNamestringNoPayee name submitted by the merchant.

Common Values

Payee type

valueDescription
user_id用户 ID
open_idOpenId
login_name用户账号
bank_card银行卡
spei_transferSPEI 转账

Inqury status

valueDescription
valid账户有效
invalid账户无效
unknown未知

Success Response Example

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "bizInquryNo": "BIZ-INQURY-20260414-001",
    "inquryNo": "string",
    "status": "valid",
    "accountValid": true,
    "uploadPayeeName": "ZHANG SAN"
  },
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Failure Response Example

json
{
  "code": 20052,
  "msg": "验签失败",
  "data": null,
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Transfer

Create and submit a transfer order.

Use this for payout scenarios such as withdrawals, bank card transfer, or SPEI transfer. Account inqury is recommended first.

Request

FieldDescription
MethodPOST
Path/unipay/transfer
Content-Typeapplication/json

Common Request Parameters

FieldTypeRequiredConstraintDescription
mchNostringYesmaxLength=32Merchant number.
appIdstringNomaxLength=32Application ID.
reqTimestring(date-time)Yesyyyy-MM-dd HH:mm:ssRequest time in yyyy-MM-dd HH:mm:ss format.
nonceStrstringNomaxLength=32Random nonce. Use a unique value for each request.
signstringYesmaxLength=1024Request signature.
clientIpstringNomaxLength=64Client IP address.

Business Parameters

FieldTypeRequiredConstraintDescription
bizTransferNostringYesminLength=1, maxLength=100Merchant transfer number.
amountnumber(double)Yesminimum=0.01Transaction amount.
titlestringNomaxLength=100Payment title.
reasonstringNomaxLength=50Reason or remark.
payeeTypestringYesminLength=1, maxLength=32Payee account type.
payeeAccountstringYesminLength=1, maxLength=100Payee account.
payeeNamestringNomaxLength=50Payee name.
payeeCodestringNomaxLength=64Ginx public payee code returned by the payee-codes options API. Do not submit raw upstream bank or institution codes.
extraParamstringNomaxLength=2048Extension parameters in JSON string format.
attachstringNomaxLength=500Merchant attachment returned in callbacks.
notifyUrlstringNomaxLength=200Asynchronous callback URL.

Request Example

json
{
  "clientIp": "127.0.0.1",
  "nonceStr": "nonce-20260414-001",
  "sign": "<BASE64_RSA_SIGNATURE>",
  "reqTime": "2026-04-14 12:00:00",
  "mchNo": "M2026000001",
  "appId": "APP20260001",
  "bizTransferNo": "BIZ-TRANSFER-20260414-001",
  "amount": 12.5,
  "title": "Order Payment",
  "reason": "Manual operation remark",
  "payeeType": "spei_transfer",
  "payeeAccount": "6222020202020202",
  "payeeName": "ZHANG SAN",
  "payeeCode": "mx_banxico",
  "extraParam": "{\"scene\":\"mobile\"}",
  "attach": "{\"orderTag\":\"vip\"}",
  "notifyUrl": "https://merchant.example.com/callback"
}

Response Data

FieldTypeRequiredDescription
bizTransferNostringNoMerchant transfer number.
transferNostringNoPlatform transfer number.
statusstringNoBusiness status.

Common Values

Payee type

valueDescription
user_id用户 ID
open_idOpenId
login_name用户账号
bank_card银行卡
spei_transferSPEI 转账

Transfer status

valueDescription
progress转账中
success转账成功
close转账关闭
fail转账失败

Success Response Example

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "bizTransferNo": "BIZ-TRANSFER-20260414-001",
    "transferNo": "T202604140001",
    "status": "progress"
  },
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Failure Response Example

json
{
  "code": 20052,
  "msg": "验签失败",
  "data": null,
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Callback

Transfer order callback

The platform sends a POST callback to notifyUrl when order status changes. Content-Type is application/json.

The body is DaxNoticeResult<TransferOrderResult>. data uses the same fields as the order query response.

The platform signs sign with the platform private key. Verify it with the platform public key and return plain text SUCCESS for success.

Timeout is 15 seconds. Failed callbacks are retried up to 16 times. Handle callbacks idempotently by platform order number or merchant business number.

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "bizTransferNo": "BIZ-TRANSFER-20260414-001",
    "transferNo": "T202604140001",
    "amount": 12.5,
    "fee": 0.01,
    "title": "Order Payment",
    "reason": "Manual operation remark",
    "payeeType": "spei_transfer",
    "payeeAccount": "6222020202020202",
    "payeeName": "ZHANG SAN",
    "payeeCode": "mx_banxico",
    "status": "success",
    "finishTime": "2026-04-14 12:00:00",
    "attach": "{\"orderTag\":\"vip\"}"
  },
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a",
  "noticeType": "order_status_changed",
  "mchNo": "M2026000001",
  "appId": "APP20260001"
}

Merchant Response

text
SUCCESS

Query Payment Order

Query the current status and details of a payment order.

Use this when payment status is uncertain, callbacks are delayed, or reconciliation is required.

Request

FieldDescription
MethodPOST
Path/unipay/query/payOrder
Content-Typeapplication/json

Common Request Parameters

FieldTypeRequiredConstraintDescription
mchNostringYesmaxLength=32Merchant number.
appIdstringNomaxLength=32Application ID.
reqTimestring(date-time)Yesyyyy-MM-dd HH:mm:ssRequest time in yyyy-MM-dd HH:mm:ss format.
nonceStrstringNomaxLength=32Random nonce. Use a unique value for each request.
signstringYesmaxLength=1024Request signature.
clientIpstringNomaxLength=64Client IP address.

Business Parameters

FieldTypeRequiredConstraintDescription
orderNostringNomaxLength=100Platform payment order number.
bizOrderNostringNomaxLength=100Merchant payment order number.

Request Example

json
{
  "clientIp": "127.0.0.1",
  "nonceStr": "nonce-20260414-001",
  "sign": "<BASE64_RSA_SIGNATURE>",
  "reqTime": "2026-04-14 12:00:00",
  "mchNo": "M2026000001",
  "appId": "APP20260001",
  "orderNo": "P202604140001",
  "bizOrderNo": "BIZ-PAY-20260414-001"
}

Response Data

FieldTypeRequiredDescription
bizOrderNostringNoMerchant payment order number.
orderNostringNoPlatform payment order number.
titlestringNoPayment title.
descriptionstringNoPayment description.
methodstringNoPayment method code.
limitPaystringNoPayment restriction code.
amountnumber(double)NoTransaction amount.
feenumber(double)NoFee amount.
realAmountnumber(double)NoNet received amount.
statusstringNoBusiness status.
settleStatusstringNoSettlement status.
settleTypestringNoSettlement type.
settleTimestring(date-time)NoSettlement time.
payTimestring(date-time)NoPayment completion time.
closeTimestring(date-time)NoClose time.
expiredTimestring(date-time)NoOrder expiration time.
attachstringNoMerchant attachment returned in callbacks.

Common Values

Payment status

valueDescription
wait待支付
progress支付中
success成功
close支付关闭
cancel支付撤销
fail失败
timeout支付超时

Settlement status

valueDescription
not_settle未结算
settled已结算

Settlement type

valueDescription
REALTIME实时
D+1D+1
D+2D+2
D+3D+3

Success Response Example

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "bizOrderNo": "BIZ-PAY-20260414-001",
    "orderNo": "P202604140001",
    "title": "Order Payment",
    "description": "Payment for order #001",
    "method": "mex_virtual_account",
    "limitPay": "string",
    "amount": 12.5,
    "fee": 0.01,
    "realAmount": 0.01,
    "status": "success",
    "settleStatus": "not_settle",
    "settleType": "D+1",
    "settleTime": "2026-04-14 12:00:00",
    "payTime": "2026-04-14 12:00:00",
    "closeTime": "2026-04-14 12:00:00",
    "expiredTime": "2026-04-14 12:00:00",
    "attach": "{\"orderTag\":\"vip\"}"
  },
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Failure Response Example

json
{
  "code": 20052,
  "msg": "验签失败",
  "data": null,
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Query Transfer Order

Query the current status and details of a transfer order.

Use this when transfer status is uncertain, callbacks are delayed, or reconciliation is required.

Request

FieldDescription
MethodPOST
Path/unipay/query/transferOrder
Content-Typeapplication/json

Common Request Parameters

FieldTypeRequiredConstraintDescription
mchNostringYesmaxLength=32Merchant number.
appIdstringNomaxLength=32Application ID.
reqTimestring(date-time)Yesyyyy-MM-dd HH:mm:ssRequest time in yyyy-MM-dd HH:mm:ss format.
nonceStrstringNomaxLength=32Random nonce. Use a unique value for each request.
signstringYesmaxLength=1024Request signature.
clientIpstringNomaxLength=64Client IP address.

Business Parameters

FieldTypeRequiredConstraintDescription
bizTransferNostringNomaxLength=100Merchant transfer number.
transferNostringNomaxLength=32Platform transfer number.

Request Example

json
{
  "clientIp": "127.0.0.1",
  "nonceStr": "nonce-20260414-001",
  "sign": "<BASE64_RSA_SIGNATURE>",
  "reqTime": "2026-04-14 12:00:00",
  "mchNo": "M2026000001",
  "appId": "APP20260001",
  "bizTransferNo": "BIZ-TRANSFER-20260414-001",
  "transferNo": "T202604140001"
}

Response Data

FieldTypeRequiredDescription
bizTransferNostringNoMerchant transfer number.
transferNostringNoPlatform transfer number.
amountnumber(double)NoTransaction amount.
feenumber(double)NoFee amount.
titlestringNoPayment title.
reasonstringNoReason or remark.
payeeTypestringNoPayee account type.
payeeAccountstringNoPayee account.
payeeNamestringNoPayee name.
payeeCodestringNoGinx public payee code returned by the payee-codes options API. Do not submit raw upstream bank or institution codes.
statusstringNoBusiness status.
finishTimestring(date-time)NoFinish time.
attachstringNoMerchant attachment returned in callbacks.

Common Values

Payee type

valueDescription
user_id用户 ID
open_idOpenId
login_name用户账号
bank_card银行卡
spei_transferSPEI 转账

Transfer status

valueDescription
progress转账中
success转账成功
close转账关闭
fail转账失败

Success Response Example

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "bizTransferNo": "BIZ-TRANSFER-20260414-001",
    "transferNo": "T202604140001",
    "amount": 12.5,
    "fee": 0.01,
    "title": "Order Payment",
    "reason": "Manual operation remark",
    "payeeType": "spei_transfer",
    "payeeAccount": "6222020202020202",
    "payeeName": "ZHANG SAN",
    "payeeCode": "mx_banxico",
    "status": "success",
    "finishTime": "2026-04-14 12:00:00",
    "attach": "{\"orderTag\":\"vip\"}"
  },
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Failure Response Example

json
{
  "code": 20052,
  "msg": "验签失败",
  "data": null,
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Sync Payment Order

Synchronize payment status from upstream and adjust the local order.

Use this for delayed callbacks, long-running processing states, or manual operations recovery.

Request

FieldDescription
MethodPOST
Path/unipay/sync/order/pay
Content-Typeapplication/json

Common Request Parameters

FieldTypeRequiredConstraintDescription
mchNostringYesmaxLength=32Merchant number.
appIdstringNomaxLength=32Application ID.
reqTimestring(date-time)Yesyyyy-MM-dd HH:mm:ssRequest time in yyyy-MM-dd HH:mm:ss format.
nonceStrstringNomaxLength=32Random nonce. Use a unique value for each request.
signstringYesmaxLength=1024Request signature.
clientIpstringNomaxLength=64Client IP address.

Business Parameters

FieldTypeRequiredConstraintDescription
orderNostringNomaxLength=100Platform payment order number.
bizOrderNostringNomaxLength=100Merchant payment order number.

Request Example

json
{
  "clientIp": "127.0.0.1",
  "nonceStr": "nonce-20260414-001",
  "sign": "<BASE64_RSA_SIGNATURE>",
  "reqTime": "2026-04-14 12:00:00",
  "mchNo": "M2026000001",
  "appId": "APP20260001",
  "orderNo": "P202604140001",
  "bizOrderNo": "BIZ-PAY-20260414-001"
}

Response Data

FieldTypeRequiredDescription
orderStatusstringNoOrder status after synchronization.
adjustbooleanNoWhether local data was adjusted.

Common Values

Payment status

valueDescription
wait待支付
progress支付中
success成功
close支付关闭
cancel支付撤销
fail失败
timeout支付超时

Success Response Example

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "orderStatus": "success",
    "adjust": true
  },
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

Failure Response Example

json
{
  "code": 20052,
  "msg": "验签失败",
  "data": null,
  "sign": "<BASE64_RSA_SIGNATURE>",
  "resTime": "2026-04-14 12:00:01",
  "traceId": "f8e44de6f6a1467bb9cbf9be92f0ff3a"
}

YAML Download