This endpoint supports QR code generation of Thai QR Code Standard Tag 30 (QR 30), QR Card Scheme (QR CS), WeChatPay QR, Alipay QR.
Sandbox URL : https://api-sandbox.partners.scb/partners/sandbox/v1/maemanee/payment/qr/create
Name | Required | Description |
---|---|---|
authorization | Required | Oauth token of the user performing the function |
content-type | Required | The content type of request payload Required: application/json |
accept-language | Optional | The language of the content in the request payload List of value: - 'th' Remark: If value is null, default as 'th' |
resourceOwnerId | Required | The hash value of the userid (resourceOwnerId from token API), or related user identification value |
requestUId | Required | A unique identifier the client can generate to track the current request call |
Name | Required | Datatype | Description |
---|---|---|---|
partnerReferenceNo | Required | String (100) | Order id generated by partner Remark: |
walletId | Required | String (15) | Merchant wallet id |
paymentType | Required | Array of Enum List of value: - "T30" - "QRCS" - "ALIPAY" - "WECHAT" |
Requested QR type |
amount | Required | Decimal(14, 2) | QR Amount |
partnerOrderDate | Required | DateTime | Order created date from partner Remark: - Format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX - Example: 2021-06-08T14:51:34.311+07:00 |
partnerMetaData | Required | JSON Object | JSON object that allow partner to send any fields Sample fields: "partnerMetaData": { "product": [{ "customField1": " 030000", "customField2": "Lays 35 g", "customField3": "Snacks", "customField4": "1", "customField5": "20.50" },{ "customField1": "040000", "customField2": "Pepsi 500 ml", "customField3": "Canned Soda", "customField4": "10", "customField5": "100.00" }] } Remark: - Each product[].customField - String(255) - partnerMetaData.product[] - Array - Max 20 records - Reference: partnerMetadata_guidelines.docx |
curl -X POST \
https://api-sandbox.partners.scb/partners/sandbox/v1/maemanee/payment/qr/create \
-H 'authorization: bearer <Your Access Token>' \
-H 'content-types: application/json' \
-H 'accept-language: th' \
-H 'resourceOwnerId: <The value of resourceOwnerId from the response header of /v1/oauth/token>' \
-H 'requestUId: e798ae11-4ae9-452f-9949-c121daf13895' \
{
"partnerReferenceNo": "100000100",
"walletId": "014000000000012",
"paymentType": ["T30","QRCS","ALIPAY","WECHAT"],
"amount": 1000.00,
"partnerOrderDate": "2020-07-16T19:20:30.45+01:00",
"partnerMetaData": {
"product": [{
"customField1": " 030000",
"customField2": "Lays 35 g",
"customField3": "Snacks",
"customField4": "1",
"customField5": "20.50"
},{
"customField1": "040000",
"customField2": "Pepsi 500 ml",
"customField3": "Canned Soda",
"customField4": "10",
"customField5": "100.00"
}]
}
}
Name | Datatype | Description |
---|---|---|
status | Object | An object to contain status from Partner gateway |
status.code | String | Partner API response code |
status.description | String | Partner API response description |
status.details | Object | An object to contain details of response status |
status.details.validationMessages | Object | An object to contain response message from downstream |
status.details.validationMessages.code | String | Downstream response code |
status.details.validationMessages.description | String | Downstream response description |
data | Object | An object to contain response information from downstream |
data.orderId | String | Transaction reference id generated from Maemanee |
data.partnerReferenceNo | String | Order id generated from partner |
data.walletId | String | Merchant wallet id |
data.amount | Decimal | QR amount |
data.orderDate | DateTime | Order created date from partner |
data.owner | Object | Object containing shop owner information |
data.owner.firstName | String | Shop owner first name |
data.owner.lastName | String | Shop owner last name |
data.shop | Object | Object containing shop information |
data.shop.shopNameTh | String | Shop name thai |
data.shop.shopNameEn | String | Shop name english |
data.tag30 | Object | Object containing QR Tag30 information |
data.tag30.ref1 | String | Ref1 |
data.tag30.ref2 | String | Ref2 |
data.tag30.ref3 | String | Ref3 |
data.tag30.qrImage | String | QR image in base64 format |
data.tag30.result | String | Object containing QR generated result |
data.tag30.result.status | String | QR generated status Sample value: - SUCCESS - FAILED |
data.tag30.result.moreInfo | String | QR generated failed reason |
data.qrcs | Object | containing QRCS information |
data.qrcs.merchantId | String | Merchant id |
data.qrcs.terminalId | String | Terminal id |
data.qrcs.masterCardPan | String | Master card Pan |
data.qrcs.visaPan | String | Visa Pan |
data.qrcs.unionPayPan | String | Union Pay Pan |
data.qrcs.expiryDateTime | String | QR expiry datetime |
data.qrcs.qrImage | String | QR image in base64 format |
data.qrcs.result | String | Object containing QR generated result |
data.qrcs.result.status | String | QR generated status Sample value: - SUCCESS - FAILED |
data.qrcs.result.moreInfo | String | QR generated failed reason |
data.alipay | String | Object containing Alipay QR information |
data.alipay.merchantId | String | Merchant id |
data.alipay.terminalId | String | Terminal id |
data.alipay.expiryDateTime | String | QR expiry datetime |
data.alipay.qrImage | String | QR image in base64 format |
data.alipay.result | String | Object containing QR generated result |
data.alipay.result.status | String | QR generated status Sample value: - SUCCESS - FAILED |
data.alipay.result.moreInfo | String | QR generated failed reason |
data.wechat | String | Object containing Wechat QR information |
data.wechat.merchantId | String | Merchant id |
data.wechat.terminalId | String | Terminal id |
data.wechat.expiryDateTime | String | QR expiry datetime |
data.wechat.qrImage | String | QR image in base64 format |
data.wechat.result | String | Object containing QR generated result |
data.wechat.result.status | String | QR generated status Sample value: - SUCCESS - FAILED |
data.wechat.result.moreInfo | String | QR generated failed reason |
{
"status": {
"code": 1000,
"description": "Success"
},
"data": {
"orderId": "PNAAA00001",
"partnerReferenceNo": "100000100",
"walletId": "014000000000012",
"amount": 1000.00,
"orderDate": "2020-07-16T19:20:30.45+01:00",
"owner": {
"firstName": "สมชาย",
"lastName": "มีดวง"
},
"shop": {
"nameThai": "ร้านอร่อยดี",
"nameEnglish": "AROY-D shop"
},
"tag30": {
"result": {
"status": "SUCCESS"
},
"ref1": "014000000071951",
"ref2": "PNAAA00001",
"ref3": "0000000000002913",
"qrImage": "{{base64}}"
},
"qrcs": {
"result": {
"status": "SUCCESS"
},
"merchantId": "010000000000907793",
"terminalId": "88000107",
"masterCardPan": "520486290002536",
"visaPan": "4201860000014247",
"unionPayPan": "3216076400520446000000000011588",
"expiryDateTime": "2021-06-08T14:51:34.311+07:00",
"qrImage": "{{base64}}"
},
"alipay": {
"result": {
"status": "SUCCESS"
},
"merchantId": "314000000064501",
"terminalId": "39400000",
"expiryDateTime":"2021-06-07T15:39:38.408+07:00",
"qrImage": "{{base64}}"
},
"wechat": {
"result": {
"status": "SUCCESS"
},
"merchantId": "314000000064501",
"terminalId": "39400000",
"expiryDateTime":"2021-06-07T15:39:38.408+07:00",
"qrImage": "{{base64}}"
}
}
}
See list of Generic Response Codes.