OnlinePay API
V2
V1
V2
V1
  1. Query
  • Introduction
    • Introduction
    • How to Start
    • Country Code
    • Country Info
    • Currency Code
    • Error Code
    • Transfer Order Info Type
    • Transfer Order File Type
    • Per Bank
    • Spei Bank
    • Vietnam Bank
    • V2 Signature Specification
  • Payin
    • Credit Card API
      POST
    • Alipay API
      POST
    • GCash API
      POST
    • WeChat API
      POST
    • PIX API
      POST
    • Crypto API
      POST
    • Union Pay API
      POST
    • SPEI API
      POST
    • SEPA API
      POST
    • Per Transfer API
      POST
    • Cash App API
      POST
    • Google Pay API
      POST
    • Apple Pay API
      POST
    • MONO API
      POST
    • Vietnam Bank API
      POST
    • CheckOut API
      POST
    • CheckOut Payment API
      POST
    • OnRamps API
      GET
  • Payout
    • PER Transfer Payout API
    • Checkout Payout API
    • Card Payout API
    • Bank Account Payout API
    • PIX Payout API
    • PER Transfer Payout API
    • SPEI Payout API
    • CashApp Payout API
    • Checkout Payout API
    • Query Payout Order API
    • Upload SEPA File API
  • Refund
    • Refund API
  • Card
    • Create Cardholder API
    • Create Card API
    • Active Card API
    • Freeze Card API
    • UnFreeze Card API
    • Cancel Card API
    • TopUp Card API
    • Card Withdraw API
    • Query Card Balance API
    • Query Card Info API
    • Query Card Transaction API
    • Add VPA Scene API
    • UploadFile API
  • Query
    • Query Payout Order API
      POST
    • Query Order API
      POST
    • QueryOrderList API
      POST
    • QueryBalance API
      POST
    • QueryOrderAmount API
      POST
  • Notify
    • Pay Notify WebHook API
    • Card Notify WebHook API
    • Refund Notify WebHook API
    • Chargeback Notify WebHook API
  • Schemas
    • UserArray
    • CheckStandV2Request
    • ApiResponse
    • PayoutCheckStandV2Request
    • QueryPayOutV2Request
    • V2EncryptedEnvelope
    • V2EncryptedNotification
    • PaymentNotificationPayload
    • ProductParams
    • Category
    • PayoutCheckStandV2Response
    • PaymentNotification
    • QueryPayOutV2Response
    • PayoutQueryResult
    • Pet
    • OrderQueryV2Data
    • PayoutCheckStandV2Data
    • CheckStandV2Response
    • RefundNotificationPayload
    • CheckStandV2Data
    • ChargebackNotificationPayload
    • Tag
    • OrderQueryV2Request
    • OrderQueryV2Response
    • Order
    • User
  1. Query

Query Order API

Testing Env
https://testpay.onlinepay.ai
Testing Env
https://testpay.onlinepay.ai
POST
/v2/order/query
Query order/refund/chargeback information by tradeNo (transaction serial number).
Request body uses V2 signature rule: all business parameters (except SIGN_EXCLUDE_KEYS) participate in signing, and the signature result is placed in the sign field.

Request

Body Params application/jsonRequired

Examples
{
    "version": "V4.0.0",
    "merNo": 840698790,
    "merOrderNo": "V1_CS_RSA_1778321738524",
    "tradeNo": "ONL02605091815390727",
    "queryType": "sales",
    "sign": "5e3f8c2a9b1d7e6f4a8c2d1e5f3b9a7c"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://testpay.onlinepay.ai/v2/order/query' \
--header 'Content-Type: application/json' \
--data '{
    "version": "V4.0.0",
    "merNo": 840698790,
    "merOrderNo": "V1_CS_RSA_1778321738524",
    "tradeNo": "ONL02605091815390727",
    "queryType": "sales",
    "sign": "5e3f8c2a9b1d7e6f4a8c2d1e5f3b9a7c"
}'

Responses

🟢200
application/json
Request succeeded (note: business result is determined by the code field)
Bodyapplication/json

Examples
{
    "code": "200",
    "message": "Success",
    "data": {
        "state": "South Carolina",
        "refundNo": "aliqua officia in veniam",
        "tradeNo": "ONL02605091815390727",
        "message": "Tener aduro audax defluo. Thema via dignissimos coepi validus vereor infit. Comes adhaero aeger universe.",
        "merNo": "104001001",
        "merOrderNo": "V1_CS_RSA_1778321738524",
        "refundAmount": "266.39",
        "refundCurrency": "USD",
        "chargebackAmount": "266",
        "chargebackCurrency": "USD",
        "actualChargebackAmount": "266",
        "actualChargebackCurrency": "USD",
        "transactionFixedFee": "1",
        "settle": 0,
        "gasFee": "0",
        "transactionHash": "",
        "receiveAmount": "0",
        "status": "SUCCESS",
        "currencyCode": "USD",
        "sourceAmount": "266"
    },
    "sign": "8a3c2f1e9b7d4a6c5e2f8b1d3a9c7e4f"
}
Modified at 2026-05-27 09:25:35
Previous
Query Payout Order API
Next
QueryOrderList API
Built with