Query Retch Card Record
Request Url
sandbox:https://api.sandbox.hitpoints.com/v1/order/query
production:https://api.hitpoints.com/v1/order/query
Request Method
GET
Request Parameters
Parameters
Required
Type
Description
out_trade_id
Yes
string(50)
the unique orderId in reseller's system
random_key
Yes
string(16)
randomly set the value with random string
Request success response
{
"data": {
"order_id": 25,
"reseller_id": 10003,
"out_trade_id": "201929886C",
"user_account_id": 2,
"category_name": "Happy Card",
"product_name": "10 Yuan",
"currency": "CNY",
"product_id": 2,
"par_value": "10.00",
"reseller_discount": "25.00",
"unit_price": "7.50",
"quantity": 3,
"total_price": "22.50",
"status": "completed",
"create_time": 1568084501,
"order_pins": [
{
"pin_sn": "R000000025W00001",
"pin_key": "M22S0FPT59S1O9DJ",
"order_id": 25,
"product_id": 2,
"category_name": "Happy Card",
"product_name": "10 Yuan",
"currency": "CNY",
"amount": "10.00",
"cost_price": "7.50",
"status": "active",
"create_time": 1568084501,
"expire_time": 1630339200
},
{
"pin_sn": "C000000025A00002",
"pin_key": "3J7D73YREX4P43HH",
"order_id": 25,
"product_id": 2,
"category_name": "Happy Card",
"product_name": "10 Yuan",
"currency": "CNY",
"amount": "10.00",
"cost_price": "7.50",
"status": "active",
"create_time": 1568084501,
"expire_time": 1630339200
},
{
"pin_sn": "X000000025H00003",
"pin_key": "VWE933L5244Y0RDR",
"order_id": 25,
"product_id": 2,
"category_name": "Happy Card",
"product_name": "10 Yuan",
"currency": "CNY",
"amount": "10.00",
"cost_price": "7.50",
"status": "active",
"create_time": 1568084501,
"expire_time": 1630339200
}
]
},
"code": 200,
"message": "ok",
"success": true
}Response Fields Description
Field
Description
code
The response code describe the request is success or not, code = 200 means success
message
The description message to the code
success
Describe the code with bool, when code = 200 , it's true, otherwise it's false
These fields below will response when code=200
Fields
Description
data
response data
order_id
HotPoints internal orderId
reseller_id
reseller UserID
out_trade_id
the unique orderId in reseller's system
user_account_id
the balance accountID to deduct the amount for the order
category_name
the product category name
product_name
the product name
product_id
the product Id
currency
the product currency
par_value
the face value of the product
reseller_discount
the reseller discount(%),the real unit_price to reseller = par_value * (1 - discount_rate%)
unit_price
the unit price = the total_price/quantity;the total_price=par_value x discount x quantity
total_price
the total_price,the amount to deducted from reseller's balance account
status
pending_pay = total price is not deducted; in_process order is paid and card is in processing; completed = the card has return to reseller, order is completed,refunded = the order wad refunded
created_time
the time to create order
Fields
Description
order_pins[]
the card list of the order
pin_sn
card serial number
pin_key
card secret
order_id
HitPoints OrderID of the card
product_id
the product ID to create this card
category_name
the product category name
product_name
the product name
currency
the product currency
amount
the product face value
cost_price
the product cost price for reseller
status
product status:active = can be used, inactive = cannot be used, verified = already used, void = is scrapped, expired = is expired
create_time
the product create time
expire_time
the product expire time
Response Headers
Fields
Description
Sign
The signature from HitPoints server
Date-GMT
The Time String for HitPoints calculate response signature
Notice: if request failed,that the code!=200, or this is no data field in response body,there will be no Sign field in response header
Fail response example:
Last updated
Was this helpful?