POST
/​v1/​payment/​ewallets/​inquire

This endpoint supports the inquiry of a transaction made either in Alipay or WeChatPay.

Sandbox URL : https://api-sandbox.partners.scb/partners/sandbox/v1/payment/ewallets/inquire

Request Header

Name Type Alipay WeChatPay Description
content-type String Required Required Content type of request payload
Value:
- application/json
resourceOwnerId String Required Required The system identifier, use the value of apikey
requestUId String Required Required A unique identifier the client can generate to track the current request call
authorization String Required Required OAuth token obtained after the user has provided consent and the authorized partner calls the /v1/oauth/token endpoint to retrieve this token
accept-language String Optional Optional The language of the content in the request payload
Values:
- EN (Default)
- TH

Request Body

Name Type Alipay WeChatPay Description
tranType String A W Type of QR Code
• “A”: Alipay
• “W”: WeChatPay
companyId String Required Required Company ID
Length: Up to 5
For sandbox: It must be number [0-9]
terminalId String Required Required Terminal ID
outTradeNo String Required Required Unique Merchant Transaction Reference Number
Length: Up to 50
For sandbox: It must start with 'SCB'

Example Request

Alipay

curl -X POST \
  https://api-sandbox.partners.scb/partners/sandbox/v1/payment/ewallets/inquire \
  -H 'Content-Type: application/json' \
  -H 'accept-language: EN' \
  -H 'authorization: Bearer <Your Access Token>' \
  -H 'requestUId: c5dc8a34-63a7-4ce1-80d1-cf8cafd268c3' \
  -H 'resourceOwnerId: <Your API Key>' \
  -d '{
    "tranType": "A",
    "companyId": "001",
    "terminalId": "12345678",
    "outTradeNo": "TRANSACTIONREFERENCE"
  }'

WeChatPay

curl -X POST \
  https://api-sandbox.partners.scb/partners/sandbox/v1/payment/ewallets/inquire \
  -H 'Content-Type: application/json' \
  -H 'accept-language: EN' \
  -H 'authorization: Bearer <Your Access Token>' \
  -H 'requestUId: c5dc8a34-63a7-4ce1-80d1-cf8cafd268c3' \
  -H 'resourceOwnerId: <Your API Key>' \
  -d '{
    "tranType": "W",
    "companyId": "001",
    "terminalId": "12345678",
    "outTradeNo": "TRANSACTIONREFERENCE"
  }'

Response

Name Parameter Type Description
status
code Integer Partner API response code
description String Partner API response description
data
transactionId String Transaction ID from Alipay/WeChatPay
amount String Transaction Amount
mid String Merchant ID
tid String Terminal ID
tradeState String Transaction Status
exchangeRate String Exchange Rate
cnyAmount String Transaction Amount in Chinese Yuan
nonceStr String Not Use
timeEnd String Not Use
ref1 String Not Use
ref2 String Not Use
ref3 String Not Use
masterMid String Not Use
masterTid String Not Use
buyerUserId String Not Use
buyerLoginId String Not Use
addressLine1 String Not Use
addressLine2 String Not Use
addressLine3 String Not Use

Example Response

Alipay

{
  "status": {
    "code": 1000,
    "description": "Success"
  },
  "data": {
    "transactionId": "4200000122201806141306164313",
    "amount": "1.50",
    "mid": "1493315672",
    "ref2": "",
    "ref1": "",
    "tradeState": "SUCCESS",
    "nonceStr": "xEK4jAOuwNqbkdsc",
    "tid": "T2000001",
    "exchangeRate": "0.1993837737",
    "buyerLoginId": "0819841761",
    "timeEnd": "20180614131556",
    "cnyAmount": "0.25",
    "masterTid": "T2000001",
    "ref3": "",
    "addressLine1": "GHL THAILAND",
    "addressLine2": "DEMO",
    "buyerUserId": null,
    "addressLine3": "AUGUST 6",
    "masterMid": "20180806"
  }
}

WeChatPay

{
  "status": {
    "code": 1000,
    "description": "Success"
  },
  "data": {
    "transactionId": "4200000122201806141306164313",
    "amount": "1.50",
    "mid": "1493315672",
    "ref2": "",
    "ref1": "",
    "tradeState": "SUCCESS",
    "nonceStr": "xEK4jAOuwNqbkdsc",
    "tid": "T2000001",
    "exchangeRate": "0.1993837737",
    "buyerLoginId": "0819841761",
    "timeEnd": "20180614131556",
    "cnyAmount": "0.25",
    "masterTid": "T2000001",
    "ref3": "",
    "addressLine1": "GHL THAILAND",
    "addressLine2": "DEMO",
    "buyerUserId": null,
    "addressLine3": "AUGUST 6",
    "masterMid": "20180806"
  }
}

Response Codes

See list of Generic Response Codes.