Skip to content

AurellixPay API Documentation

This page shows the usage of some runtime APIs provided by AurellixPay.

API base URL - Please contact customer service to obtain it

Checkout Create Order & Pay Interface

  • Data type: JSON (content-type: application/json)
  • Request method: POST
  • Path: /v1/hexpay/trade/order
  • Authentication: Signature verification

Interface Description

This interface accepts order information from the merchant and creates a payment link used to redirect to AurellixPay.

Request Parameters

Field NameTypeMax LengthRequiredDescription
mchNoString30YesMerchant number
mchOrderNoString64YesMerchant order number (unique)
currencyString10YesOrder currency. Supported values: USDT, USDC, AED, AUD, AZN, BDT, BRL, CAD, CHF, CLP, COP, CRC, CZK, DKK, DOP, DZD, EGP, EUR, GBP, GEL, HKD, HUF, ILS, INR, JPY, KRW, KWD, MAD, MXN, MYR, NGN, NOK, PEN, PHP, PLN, RON, SAR, SEK, SGD, THB, TND, TRY, UAH, USD, XAF, ZAR, INR, GHS, XAF, etc. (Continuously updated)
defaultCurrencyString10NoPreferred default fiat currency when using onramp channels. For example, to receive USDT but expect payment in INR by default: currency=USDT, defaultCurrency=INR
networkString30YesNetwork. Supported values: Solana, Ethereum, Polygon, Arbitrum, Binance_smart_chain, Tron (Maintenance)
bizCodeIntegerNoChannel number. Do not pass if unsure; it will be automatically adapted by the interface.
amountBigDecimalLength 20, dp 6YesOrder amount
mchUserIdString32YesMerchant side user ID
goodsGoods Type-YesProduct description
appIdString64YesApplication ID, assigned by the merchant platform
signString512YesSignature
signTypeString10YesSignature type, default value RSA2
notifyUrlString256NoAsynchronous notification URL (can also be configured in the merchant backend)
successUrlString256NoSuccess redirect page URL (can also be configured in the merchant backend)
failUrlString256NoFailure redirect page URL (can also be configured in the merchant backend)
clientIpString50YesEnd-user IP (assists in country/region and language detection)
autoChangeCurrencyBoolean-NoWhether to automatically exchange currency (automatically calculates prices for corresponding currencies in different countries/regions)
mchCoverFeeBoolean-NoWhether the merchant handles the transaction fee
versionString10YesVersion number, e.g., v1.0

Goods Type

Field NameTypeRequiredDescription
goodsNameStringYesProduct name
goodsDetailStringYesProduct description
goodsTypeStringYesProduct category

Sample Request Data

json
{
    "mchNo":"M1752564528",
    "mchOrderNo":"378758439",
    "amount":11,
    "currency":"USDC",
    "network":"Solana",
    "bizCode":0,
    "goods": {
        "goodsType": "shop",
        "goodsName": "T-shirt",
        "goodsDetail": "xxxxxxxxxxx"
    },
    "mchUserId":"1230987",
    "appId":"68760330a2cf0af37c52a073",
    "sign":"VaKMVivLXtqJw6kp7PyNaI6P7qoLM9kOXms5Tll8TsX0eubZ0F+bbxGpfaTR2zpCZkVr/iygD4QyuueMt+pMOAOXZ2yayFGloyKL1mMfNHzb5PDPMhU3cKm6cb+BCHkfk5S602rCBFrQSEhVgQiwpd5ezI6NAdw4+EdPwVmzXH6pVZ9YXNSp9n1O8caS5dL0bjhWxO5EFWrxhbfFNLgWy1OXRs9e02wHZXbzukAkbuJl6UZDpPKKluy2m1BbgxYYYHlx4sunBsE8vP5vj50UHg8KK4v1K/XXzx+oIpZQ85895ZFAISLO9V7ugdlXx/+jrpzg2xnEOK9ss/oSSbdDoQ==",
    "signType":"RSA2",
    "version":"v1.0"
}

Response Parameters

Field NameTypeRequiredDescription
codeStringYesResponse code
dataStringNoResponse data
msgStringNoResponse message

data format

Field NameTypeDescription
payOrderIdStringPayment Order ID
networkStringNetwork
locationStringCheckout frontend URL
currencyStringPayment currency type
amountBigDecimalPayment amount
orderStateByteOrder status: 0-Generated, 1-Paying, 2-Success, 3-Failed, 4-Cancelled, 5-Refunded, 6-Order closed or timed out
json
{
    "code": 0,
    "data": {
        "amount": 11,
        "currency": "USDC",
        "location": "http://localhost:5173/pay?payOrderId=P1947225344373334017",
        "network": "Solana",
        "orderState": 0,
        "payOrderId": "P1947225344373334017"
    },
    "msg": "SUCCESS"
}

Query Order Status Interface

  • Data type: JSON (content-type: application/json)
  • Request method: GET
  • Path: /v1/hexpay/trade/query
  • Authentication: Signature verification

Interface Description

This interface accepts the order number passed by the merchant and queries the order status.

Request Parameters

Field NameTypeMax LengthRequiredDescription
appIdString64YesApplication ID, created in merchant backend
mchNoString30YesMerchant number
versionString10YesVersion: v1.0
signTypeString10YesSignature type: Currently only supports RSA2
signString256YesSignature
payOrderIdString30At least one requiredPayment Order ID (pass either payOrderId or mchOrderNo)
mchOrderNoString64At least one requiredMerchant Order Number

Sample Request

JSON
{
    "payOrderId":"P1947211653281546242",
    "appId":"68760330a2cf0af37c52a073",
    "mchNo":"M1752564528",
    "version":"v1.0",
    "sign":"57842768902",
    "signType":"RSA2"
}

Response Parameters

Field NameTypeRequiredDescription
codeStringYesResponse code
dataStringNoResponse data
msgStringNoResponse message
signStringYesResponse signature

data

Field NameTypeRequiredDescription
payOrderIdStringYesPayment Order Number
mchNoStringYesMerchant Number
mchOrderNoStringYesMerchant Order Number (unique)
mchNameStringYesMerchant Name
mchUserIdStringYesMerchant side user ID
amountBigDecimalYesOrder amount
refundAmountBigDecimalNoRefund amount
stateIntegerYesStatus
waitNetworkStringNoPending payment network
waitPayCurrencyStringNoPending payment amount
wayCodeStringYesPayment method
realPayAmountBigDecimalNoActual amount paid
realPayCurrencyStringNoActual currency paid
realNetworkStringNoActual network used for payment
goodsGoodsYesProduct information
createdAtDateYesOrder creation time
expiredTimeDateYesOrder expiration time
updatedAtDateYesLast update time
cancelTimeDateNoCancellation time
paySuccessTimeDateNoPayment success time

Sample Response

json
{
    "code": 0,
    "data": {
        "amount": 0.001000,
        "createdAt": "2025-07-22 10:57:27",
        "goods": {
            "goodsDetail": "MacBook Pro 14-inch",
            "goodsName": "MacBook Pro 14-inch",
            "goodsType": "MacBook"
        },
        "mchName": "GlobalGoods",
        "mchNo": "M1752564528",
        "mchOrderNo": "ypSp0IpG5on6",
        "mchUserId": "illvBhVGuri7",
        "payOrderId": "P1947491150220296193",
        "paySuccessTime": "2025-07-22 11:01:30",
        "realNetwork": "Solana",
        "realPayAmount": 0.001000,
        "realPayCurrency": "USDC",
        "refundAmount": 0.000000,
        "state": 2,
        "updatedAt": "2025-07-22 10:57:27",
        "wayCode": "QrCode"
    },
    "msg": "SUCCESS",
    "sign": "54F8ADD6BD9BC8867DCB319329F587FE"
}

Batch Query Orders Interface

  • Data type: JSON (content-type: application/json)
  • Request method: GET
  • Path: /v1/hexpay/batch/query
  • Authentication: Signature verification

Interface Description

This interface queries order information under the application in batches by passing mchNo and appId.

Request Parameters

Field NameTypeMax LengthRequiredDescription
appIdString64YesApplication ID, created in merchant backend
mchNoString30YesMerchant number
versionString10YesVersion: v1.0
signTypeString10YesSignature type: Currently only supports RSA2
signString256YesSignature
bizCodeIntegerNoChannel number. Do not pass if unsure; it will be automatically adapted.
createdStartDateNoDate string (yyyy-MM-dd HH:mm:ss); time range query start (greater than or equal to this time)
createdEndDateNoDate string (yyyy-MM-dd HH:mm:ss); time range query end (less than or equal to this time)
settleStateByteNoSettlement status: 0-Pending, 1-Settling, 2-Settled, 3-Failed, 4-Manual settlement pending
stateByteNoOrder status: 0-Generated, 1-Paying, 2-Success, 3-Failed, 4-Cancelled, 5-Refunded, 6-Order closed
currentIntegerNoCurrent page number, defaults to 1
sizeIntegerNoPage size, defaults to 10

Sample Request

JSON
{
    "appId": "68c1382798a210e71dedddae",
    "mchNo": "M1757493187",
    "version": "v1.0",
    "signType": "RSA2",
    "state":2,
    "settleState":2,
    "bizCode":1,
    "createdStart":"2025-09-10 00:00:00",
    "createdEnd":"2025-09-10 23:59:59",
    "sign": "g+NAXi68wJ8J9hnKbBEzf6gbF+acYSyn8eMQrQDE6ndzcma9dBVYIRTBaNaeE/aFDAdMB4ARbXpLit8QIaH7vn3ZF6iKqu7tGpax817C9Yz+c9zvLtbt6rvTpwuBCKVfQJNJ+JbWCjXqwfRMJBmDfnUCujdeLnXf2l7QW6azi0Q3CC18UKyRtHGiRZ8kdwP+s3YX7JXCD+N35aFUdf7vwP19nEhXpyjMrZKColFbarQdrPZ1MsrROcnAKPqfMgV0gQ39GizIUi0fSdBR3xD7YtG+pcmJ6iCUzNbpkpMyTYBg5J4sp2MT+ejhUXSp+hYellp20Lt22TE1yCUajAlJkQ=="
}

Response Parameters

data

Field NameTypeDescription
payOrderIdStringPayment Order Number
appIdStringApplication ID
mchOrderNoStringMerchant order number (unique)
createdAtDateOrder creation time
stateIntegerStatus
mchUserIdStringMerchant side user ID
bizCodeIntegerChannel number
wayCodeStringPayment method
networkStringNetwork
currencyStringOrder currency
amountBigDecimalOrder amount
realPayAmountBigDecimalActual amount paid
realPayCurrencyStringActual currency paid
successTimeDateSuccess time
settleCurrencyStringSettlement currency
settleAmountBigDecimalSettlement amount
mchFeeAmountBigDecimalMerchant fee
mchSettleIncomeBigDecimalActually settled income for the merchant
settleStateByteOrder settlement status (0-Pending, 1-Settling, 2-Settled, 3-Failed)
json
{
    "code": 0,
    "msg": "SUCCESS",
    "data": {
        "records": [
            {
                "payOrderId": "P1956719923828715522",
                "appId": "689d7bd965ac3acb9b2f0cb7",
                "mchOrderNo": "VO6LDUwMFaSS",
                "createdAt": "2025-08-16 14:09:18",
                "state": 2,
                "mchUserId": "dxrM7dglqQPb",
                "bizCode": 2,
                "wayCode": "-",
                "network": "Solana",
                "currency": "USDC",
                "amount": "12",
                "realPayCurrency": "USDT",
                "realPayAmount": "12",
                "realNetwork": "binance_smart_chain",
                "txHash": "0xd609c2deac9c87df133f8fa2256b2deb019c62daa7151bcdf626055925013432",
                "successTime": "2025-08-16 14:25:02",
                "settleCurrency": "USDC",
                "settleAmount": "12",
                "mchFeeAmount": "0.02",
                "mchSettleIncome": "11.98",
                "settleState": 2
            },
            {
                "payOrderId": "P1955910592950509570",
                "appId": "689d7bd965ac3acb9b2f0cb7",
                "mchOrderNo": "A1EmjBwIBMjC",
                "createdAt": "2025-08-14 08:33:19",
                "state": 2,
                "mchUserId": "eqvmUlm4WeCm",
                "bizCode": 0,
                "wayCode": "QR_CODE",
                "network": "Solana",
                "currency": "USDC",
                "amount": "0.2",
                "realPayCurrency": "USDC",
                "realPayAmount": "0.2",
                "realNetwork": "arbitrum",
                "txHash": "0xc6269fd87101aec2bb95b16f24b17cf64fa7599cc1f06d18c3ee6ffd0ef46d3a",
                "successTime": "2025-08-14 08:34:37",
                "settleCurrency": "USDC",
                "settleAmount": "0.2",
                "mchFeeAmount": "0.01",
                "mchSettleIncome": "0.19",
                "settleState": 2
            },
            {
                "payOrderId": "P1955876137510723586",
                "appId": "689d7bd965ac3acb9b2f0cb7",
                "mchOrderNo": "bh16wcQku0B2",
                "createdAt": "2025-08-14 06:16:24",
                "state": 2,
                "mchUserId": "TucYS0DW1ORa",
                "bizCode": 0,
                "wayCode": "QR_CODE",
                "network": "Arbitrum",
                "currency": "USDC",
                "amount": "0.1",
                "realPayCurrency": "USDC",
                "realPayAmount": "0.1",
                "realNetwork": "arbitrum",
                "txHash": "0x5df6a442c3f974064028c9b67739250d00b080cd7f29444147155c9153bac9d3",
                "successTime": "2025-08-14 06:16:56",
                "settleCurrency": "USDC",
                "settleAmount": "0.1",
                "mchFeeAmount": "0.01",
                "mchSettleIncome": "0.09",
                "settleState": 2
            }
        ],
        "total": 3,
        "size": 10,
        "current": 1,
        "pages": 1
    }
}

Order Status Callback

Log in to the Merchant Management Platform → Go to Application Management → Select the corresponding App → Configure success redirect URL, failure redirect URL, and order status callback URL.

img_6

Click to view steps to obtain API key

Callback Information

Field NameTypeDescription
payOrderIdStringPayment Order Number
amountBigDecimalOrder amount
mchOrderNoStringMerchant Order Number (unique)
signStringSignature
mchNameStringMerchant name
realNetworkStringActual network used
wayCodeStringPayment method
successUrlStringRedirect URL on success
failUrlStringRedirect URL on failure
reqTimeStringTimestamp
realPayCurrencyStringActual currency paid
createdAtDateOrder creation time
appIdStringApplication ID
successTimeDateSuccess time
mchUserIdStringMerchant side user ID
currencyStringOrder currency
realPayAmountBigDecimalActual amount paid
stateIntegerStatus
mchNoStringMerchant number
refundAmountBigDecimalRefund amount
updatedAtDateOrder update time
settleCurrencyStringSettlement currency
settleAmountBigDecimalSettlement amount (stablecoin equivalent for fiat payments)

Content-Type: application/x-www-form-urlencoded

Example Body:

json
{
    "payOrderId": "P1958816503884955649",
    "amount": 0.01,
    "mchOrderNo": "482d0876d40d44dfa20c6e6859946a2b",
    "sign": "hG...",
    "mchName": "M1755226149",
    "realNetwork": "arbitrum",
    "wayCode": "QR_CODE",
    "payWay": "USDC(Arbitrum)",
    "successUrl": "http://example.com/order/success",
    "failUrl": "http://example.com/order/failure",
    "reqTime": "1755854933053",
    "realPayCurrency": "USDC",
    "createdAt": "2025-08-22 09:00:22",
    "appId": "689ea02565ac52e60665ea8a",
    "successTime": "1755853505000",
    "mchUserId": "1ed646e0dc6e444ea3b98751c2ab9deb",
    "currency": "USDC",
    "realPayAmount": 0.010000,
    "state": 2,
    "mchNo": "M1755226149",
    "refundAmount": "0.000000",
    "updatedAt": "2025-08-22 09:26:25",
    "settleAmount":0.01,
    "settleCurrency":"USDC"
}

Query Balance

  • Data type: JSON (content-type: application/json)
  • Request method: POST
  • Path: /v1/hexpay/balance/query
  • Authentication: Signature verification

Interface Description

This interface queries balance information based on merchant number, currency, and appId.

Request Parameters

Field NameTypeMax LengthRequiredDescription
appIdString64YesApplication ID (any active App ID under this merchant is acceptable)
mchNoString30YesMerchant number
versionString10YesVersion: v1.0
signTypeString10YesSignature type: Currently only supports RSA2
signString512YesSignature
currencyString10NoCurrency, e.g., USDT, USDC

Sample Request

JSON
{
    "mchNo": "M1752564528",
    "currency": "USDC",
    "appId":"68887ae1e4b04fb9fe9e03f2",
    "signType":"RSA2",
    "version":"1.0",
    "sign":"Qu1AVxR1Yx..."
}

Response Parameters

TypeField NameDescription
StringcurrencyCurrency
StringavailableBalanceAvailable balance
StringfrozenBalanceFrozen balance
StringcoinFullNameFull coin name

Sample Response

json
{
    "code": 0,
    "data": [
        {
            "availableBalance": 65.08666658,
            "coinFullName": "USD Coin",
            "currency": "USDC",
            "frozenBalance": 4.48858868
        }
    ],
    "msg": "SUCCESS"
}