สถานะธุรกรรม (เม็กซิโก)
ประมาณ 2 นาที
API สอบถามสถานะธุรกรรม ภูมิภาค เม็กซิโก (MXN).
Request
Request Path:
sandbox:
https://sandbox-gateway.smilepayz.com/v2.0/inquiry-status
production:https://gateway.smilepayz.com/v2.0/inquiry-status
Header Parameters
| Field | Required | Type | Description |
|---|---|---|---|
Content-Type | M | String | application/json request body. |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
X-SIGNATURE | M | String | Signature of JSON body (see product Signature doc). |
X-PARTNER-ID | M | String | Your merchantID |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
tradeType | M | Number | 1 = Pay-in, 2 = Pay-out. |
orderNo | C | String(32) | Merchant-unique id |
tradeNo | C | String(32) | Smilepayz tradeNo for this order. |
เงื่อนไข
ต้องส่งอย่างน้อยหนึ่งค่าระหว่าง tradeNo กับ orderNo
Example Body – Inquiry Status Request:
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00-06:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 20001
{
"tradeType": 1,
"orderNo": "2000112900000000000001"
}
{
"tradeType": 2,
"tradeNo": "122200312406111311517153"
}
Responses
HTTP Request
| Field | Required | Type | Description |
|---|---|---|---|
Content-Type | M | String | application/json request body. |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
code | M | String | 00 success; see Error codes. |
message | M | String | UTF-8 human-readable result line. |
tradeNo | O | String | Smilepayz tradeNo for this order. |
tradeType | O | Number | 1 Pay-in / 2 Pay-out. |
paymentMethod | O | String | See Payment methods doc. |
money | O | Object | Currency plus amount for this transaction. |
currency | M | String | Fixed to MXN. |
amount | M | Number | Amount (max 2 decimals). ดู Money |
status | O | String | สถานะออเดอร์หลัก See Transaction status: INIT, PROCESSING, SUCCESS, FAILED, EXPIRED. ไม่เปลี่ยนอัตโนมัติเมื่อยอด sub-order สะสม |
remark | O | String | Extra notes when present. |
subOrderList | O | Array<Object> | รายการ sub-order; เป็น [] เมื่อไม่มี ดู Pay-in · Sub-order transaction & callback |
orderNo | O | String | orderNo ร้านค้าเดิม (เหมือนออเดอร์หลัก) |
tradeNo | O | String | tradeNo แพลตฟอร์มของ sub-order |
tradeType | O | Number | 1 Pay-in / 2 Pay-out. |
paymentMethod | O | String | Channel code. |
money | O | Object | currency และ amount ของ sub-order |
currency | O | String | Fixed to MXN. |
amount | O | Number | ยอดเครดิตจริงของ sub-order |
status | O | String | สถานะ sub-order |
คำเตือน
status / money ของออเดอร์หลักเป็นอิสระจาก subOrderList จัดการ tradeNo และยอดของแต่ละ sub-order แยกกัน
Example Body – Inquiry Status Response:
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00-06:00
{
"code": "00",
"message": "Successful",
"tradeNo": "122200312406111311517153",
"tradeType": 1,
"paymentMethod": "SPEI",
"money": {
"currency": "MXN",
"amount": 20000
},
"status": "PROCESSING",
"subOrderList": [
{
"orderNo": "20001mxspei394eeb7b44c2460",
"tradeNo": "122200312406111311517153-01",
"tradeType": 1,
"paymentMethod": "SPEI",
"money": {
"currency": "MXN",
"amount": 10000
},
"status": "SUCCESS"
}
]
}

