Query Payment

Description

Retrieve details of a payment by a unique order id.

Endpoint

  • REST API: GET https://live.cpayapi.com/openapi/v1/getOrderDetail

Parameters

Name
Type
Mandatory
Description

merchantId

int64

yes

unique id generated by us

merchantTradeNo

string(64)

no

unique order id generated by merchant

cpayOrderId

string(64)

no

unique order id generated by us

hash

string(128)

no

deprecated, only works for CryptoCurrency

sign

string(128)

yes

merchantTradeNo and cpayOrderId can not be empty at the same time.

Response

Name
Type
Description

code

int64

msg

string

description of code

traceid

string

unique request id generated by us

data.orderId

string

unique order id generated by us

data.merchantId

int64

same as request parameter merchantId

data.orderStatus

int

data.status

string

deprecated, replace by orderStatus

data.currency

string

e.g., USD,EUR,GBP etc.

data.orderAmount

string

amount paid by user

data.receivedAmount

string

amount received by merchant's account for this transaction

data.actualAmount

string

deprecated

data.pledgeAmount

string

margin amount, only for credit card

data.serviceFee

string

commission amount charged by us

data.fee

string

deprecated, replace by serviceFee

data.merchantTradeNo

string

same as request parameter merchantTradeNo

data.merchantUserId

string

unique user id generated by merchant

data.hash

string

deprecated, only works for CryptoCurrency

data.network

string

deprecated, only works for CryptoCurrency

data.remark

string

description of the order

data.createTime

int64

transaction created time (millisecond)

Note: orderAmount = receivedAmount + serviceFee

Example

  • Request

curl 'https://live.cpayapi.com/openapi/v1/getOrderDetail?merchantId={merchantId}&merchantTradeNo={merchantTradeNo}&cpayOrderId={cpayOrderId}&sign={sign}'
  • Response

Transaction status is completed.

{
  "code": 0,
  "msg": "success",
  "data": {
    "actualAmount": "95.00",
    "orderAmount": "100.00",
    "createTime": 1663155010000,
    "currency": "USD",
    "fee": "5.00",
    "serviceFee": "5.00",
    "hash": "",
    "merchantId": 20003092,
    "merchantTradeNo": "7b785240e426694635bb09fb101ae241",
    "merchantUserId": "test002",
    "network": "",
    "orderId": "2209141130105863014",
    "pledgeAmount": "10.00",
    "receivedAmount": "95.00",
    "remark": "",
    "orderStatus": 14,
    "status": "14"
  },
  "traceid": "221117082056X6478814"
}

Last updated