QR Code
Create a Static QR#
POST /staticqr
Generate a static QR Code. If the requested QR code is already existed and still active, then, the existing one will be returned, otherwise, new one will be created and returned instead.
Parameters#
- Request Body
- Example
| Name | Type | Required | Description |
|---|---|---|---|
| qrCodeType | integer(int64) | false | Type of QR code to request for generation or retrieving. See Appendix C.1 for a list of payment channel that supported by each QR Code Type. |
| merchantID | string(50) | true | Unique Merchant ID set by the company |
| terminalID | string(25) | true | Terminal unique ID |
| checkSum | string | true | Checksum of the query string. See Checksum for how the checksum value is calculated |
Returns#
- Response Body
- Example
| Name | Type | Required | Description |
|---|---|---|---|
| responseCode | string | true | See Appendix A |
| qrCodeType | string | true | Type of QR code. See Appendix C.1 for a list of payment channel that supported by each QR Code Type. |
| qrCodeID | integer | true | Unique id of QR code |
| poi | integer | true | Point of initiation method |
| qrCode | string | true | QR Code image as based64 encoded string. See basic Static QR Code message table below for more details. For deviation or additional contents of QR code message as per specific channel (i.e. PromptPay), the reader should seek Appendix B for more information. |
| rawQRCode | string | true | Actual raw contents of the QR Code |
| expiryTime | string | true | Expiry time of QR code (Format: yyyyMMdd HH:mm:ss) |
| merchantID | string | true | Unique Merchant ID set by the company |
| merchantName | string | true | Merchant Name |
| terminalID | string | true | Terminal unique ID |
| terminalName | string | true | Terminal Name |
| channels.channelCode | string | true | Channel code |
| channels.channelName | string | true | Channel name |
| channels.seqNo | integer | true | Sequence number of this object in an array |
| checkSum | string | true | Checksum of the query string. See Checksum for how the checksum value is calculated |
Create a Static QR with amount#
POST /staticamountqr
Generate a static QR Code with amount. If the requested QR code is already existed and still active, then, the existing one will be returned, otherwise, new one will be created and returned instead. This method is only applicable for requesting QR code PromptPay type.
Parameters#
- Request Body
- Example
| Name | Type | Required | Description |
|---|---|---|---|
| qrCodeType | integer | false | Type of QR code to request for generation or retrieving. See Appendix C.1 for a list of payment channel that supported by each QR Code Type. |
| merchantID | string(50) | true | Unique Merchant ID set by the company |
| terminalID | string(25) | true | Terminal unique ID |
| amount | string(13) | true | Amount to be paid for the transaction. Limited to numeric and β.β Length: up to 13 Amount should always contain two decimal points i.e. Amount β100.00β is defined as β100.00β, Amount β99.12β is defined as β99.12β |
| note | string(25) | false | Description of QR transaction |
| checkSum | string | true | Checksum of the query string. See Checksum for how the checksum value is calculated |
Returns#
- Response Body
- Example
| Name | Type | Required | Description |
|---|---|---|---|
| responseCode | string | true | See Appendix A |
| qrCodeType | string | true | Type of QR code. See Appendix C.1 for a list of payment channel that supported by each QR Code Type. |
| qrCodeID | integer | true | Unique id of QR code |
| poi | integer | true | Point of initiation method |
| qrCode | string | true | QR Code image as based64 encoded string. See basic Static QR Code message table below for more details. For deviation or additional contents of QR code message as per specific channel (i.e. PromptPay), the reader should seek Appendix B for more information. |
| rawQRCode | string | true | Actual raw contents of the QR Code |
| expiryTime | string | true | Expiry time of QR code (Format: yyyyMMdd HH:mm:ss) |
| amount | string | true | Amount to be paid for the transaction. Amount always show two decimal points even if they are zeros. i.e. Amount β100.00β is defined as β100.00β, Amount β99.12β is defined as β99.12β. |
| currencyCode | string | true | Currency Code as defined by ISO4217. i.e. 764 (Baht) |
| currencyName | string | true | Name of currency |
| note | string | true | Description of QR transaction |
| merchantID | string | true | Unique Merchant ID set by the company |
| merchantName | string | true | Merchant Name |
| terminalID | string | true | Terminal unique ID |
| terminalName | string | true | Terminal Name |
| channels.channelCode | string | true | Channel code |
| channels.channelName | string | true | Channel name |
| channels.seqNo | integer | true | Sequence number of this object in an array |
| checkSum | string | true | Checksum of the query string. See Checksum for how the checksum value is calculated |
Create a Dynamic QR#
POST /dynamicqr
Generate a dynamic QR Code. If the requested QR code is already existed and still active, then, the existing one will be returned, otherwise, new one will be created and returned instead. Default expiry time is set to 15 minutes (subject to system setting) when the QR code is requested to generate for the first time.
Parameters#
- Request Body
- Example
| Name | Type | Required | Description |
|---|---|---|---|
| qrCodeType | integer | false | Type of QR code to request for generation or retrieving. See Appendix C.1 for a list of payment channel that supported by each QR Code Type. |
| merchantID | string(50) | true | Unique Merchant ID set by the company |
| terminalID | string(25) | true | Terminal unique ID |
| invoice | string(25) | true | Invoice or bill number for the transaction. If this is the first time generating this dynamic QR code, the invoice value entered must be unique and never been used for payment before. Supply invoice data that was used before may result in payment failed. |
| amount | string(13) | true | Amount to be paid for the transaction. Limited to numeric and β.β Length: up to 13 Amount should always contain two decimal points i.e. Amount β100.00β is defined as β100.00β, Amount β99.12β is defined as β99.12β |
| note | string(25) | false | Description of QR transaction |
| extExpiryTime | string(25) | false | Value is in minute which indicates that the expiry time of the requested QR code will be in next XXX minutes from the current time. Min value: 5 minutes Max value: 43,200 minutes (approx. 30 days) |
| userDefined | string(300) | false | Any value that defined by user. i.e. client specific ID that is able to lead back to this QR code. Note that this value does not imbedded anywhere in the actual QR Code returned but it will be appeared in the βuserDefinedβ element of response JSON message if it is presented. |
| checkSum | string | true | Checksum of the query string. See Checksum for how the checksum value is calculated |
Returns#
- Response Body
- Example
| Name | Type | Required | Description |
|---|---|---|---|
| responseCode | string | true | See Appendix A |
| qrCodeType | string | true | Type of QR code. See Appendix C.1 for a list of payment channel that supported by each QR Code Type. |
| qrCodeID | integer | true | Unique id of QR code |
| poi | integer | true | Point of initiation method |
| qrCode | string | true | QR Code image as based64 encoded string. See basic Static QR Code message table below for more details. For deviation or additional contents of QR code message as per specific channel (i.e. PromptPay), the reader should seek Appendix B for more information. |
| rawQRCode | string | true | Actual raw contents of the QR Code |
| expiryTime | string | true | Expiry time of QR code (Format: yyyyMMdd HH:mm:ss) |
| amount | string | true | Amount to be paid for the transaction. Amount always show two decimal points even if they are zeros. i.e. Amount β100.00β is defined as β100.00β, Amount β99.12β is defined as β99.12β. |
| currencyCode | string | true | Currency Code as defined by ISO4217. i.e. 764 (Baht) |
| currencyName | string | true | Name of currency |
| note | string | true | Description of QR transaction |
| invoice | string | true | Invoice or bill number for the transaction |
| merchantID | string | true | Unique Merchant ID set by the company |
| merchantName | string | true | Merchant Name |
| userDefined | string | true | Any value that was defined by user. i.e. client specific ID that is able to lead back to this QR code |
| terminalID | string | true | Terminal unique ID |
| terminalName | string | true | Terminal Name |
| channels.channelCode | string | true | Channel code |
| channels.channelName | string | true | Channel name |
| channels.seqNo | integer | true | Sequence number of this object in an array |
| checkSum | string | true | Checksum of the query string. See Checksum for how the checksum value is calculated |
Retrieve a QR Code#
GET /qr
Returns details of an active QR Code
Parameters#
- Request Body
- Example
| Name | Type | Required | Description |
|---|---|---|---|
| qRCodeId | integer(int64) | true | Unique identifier of QR code |
| merchantID | string(50) | true | Unique Merchant ID set by the company |
| terminalID | string(25) | true | Terminal unique ID |
| checkSum | string | true | Checksum of the query string. See chapter 1.5.3 Checksum for Request with Query String for how the checksum value is calculated |
Example response#
- Response Body
- Example
| Name | Type | Required | Description |
|---|---|---|---|
| responseCode | string | true | See Appendix A |
| qrCodeType | string | true | Type of QR code. See Appendix C.1 for a list of payment channel that supported by each QR Code Type. |
| qrCodeID | integer | true | Unique id of QR code |
| poi | integer | true | Point of initiation method |
| qrCode | string | true | QR Code image as based64 encoded string. See basic Static QR Code message table below for more details. For deviation or additional contents of QR code message as per specific channel (i.e. PromptPay), the reader should seek Appendix B for more information. |
| rawQRCode | string | true | Actual raw contents of the QR Code |
| expiryTime | string | true | Expiry time of QR code (Format: yyyyMMdd HH:mm:ss) |
| amount | string | true | Amount to be paid for the transaction. Amount always show two decimal points even if they are zeros. i.e. Amount β100.00β is defined as β100.00β, Amount β99.12β is defined as β99.12β. |
| currencyCode | string | true | Currency Code as defined by ISO4217. i.e. 764 (Baht) |
| currencyName | string | true | Name of currency |
| note | string | true | Description of QR transaction |
| invoice | string | true | Invoice or bill number for the transaction |
| merchantID | string | true | Unique Merchant ID set by the company |
| merchantName | string | true | Merchant Name |
| userDefined | string | true | Any value that was defined by user. i.e. client specific ID that is able to lead back to this QR code |
| terminalID | string | true | Terminal unique ID |
| terminalName | string | true | Terminal Name |
| channels.channelCode | string | true | Channel code |
| channels.channelName | string | true | Channel name |
| channels.seqNo | integer | true | Sequence number of this object in an array |
| checkSum | string | true | Checksum of the query string. See Checksum for how the checksum value is calculated |