PromptPay API
Pay Solutions systems offer secure API connection design for seamless integration.
Settting
Command
curl --location --request POST
'https://apis.paysolutions.asia/tep/api/v2/promptpaynew?merchantID=12345678&productDe
tail=test&customerEmail=customer@email.com&customerName=customer&total=1.12&refere
nceNo=123456789012'
--header 'accept: application/json'
--header 'authorization: Bearer sdfgdsfgdsfgdsfgdsfgdsgf'
Method
POST
URL
https://apis.paysolutions.asia/tep/api/v2/promptpaynew
Header Parameters
Name | Data Type | Description |
---|---|---|
Authorization required | String <Bearer> >= 0 | Bearer xxxx (auth) |
Accept required | String | application/json |
Query Params
Name | Data Type | Description |
---|---|---|
merchantID required | Number | 8 digit eg. 12345678 |
productDetail required | String | 1024 character except special character & html tag |
customerEmail required | String | Email format |
customerName required | String | 100 character except special character & html tag |
total required | Number | 2 digit eg. 12.12 |
referenceNo required | Number | Unique 12 digit |
Response
Success
Api promptpay return image base64
{
"status": "success", "data": {
"orderNo": 90729356, "referenceNo": "202104210001",
"total": 1.11, "orderdatetime": "2021-04-22 13:40:32",
"expiredate": "2021-04-22 13:55:32",
"image": "data:image/png;base64,dgdsgdfgdsfdsgdfgdfgdsgf"
}
}
** sometime expiredate was empty string ""
Duplicate Reference Number
{
"message": "duplicate reference number"
}
Incomplete Parameter
{
"message": "incomplete parameter"
}
Incorrect Parameter
{
"status": "error", "data": {
"orderNo": "", "referenceNo": "",
"total": 0, "orderdatetime": "",
"expiredate": "",
"image": ""
}
}