Slip Upload
If a payment does not reflect in the system automatically, the system allows for slip uploads to verify the payment. Merchants can utilize this API endpoint to upload the payment slip as soon as the order is open — there is no waiting period.
To upload a payment slip, the following conditions must be met:
- The status of the order must be "pending."
- The uploaded image must be in JPEG or PNG format and not exceed 1 MB in size.
URL : /slip/upload
Method : POST
Data constraints
{
"merchant_id" : "[Merchant id]",
"token" : "[Auth Token]",
"time" : "[Time Stamp]",
"platform_order_id" : "[platform order id]",
"image_base64" : "[slip image in base64 format]"
}
Explainations
| param name | description | example |
|---|---|---|
| platform_order_id | platform order id | THBP20240401071230HW2xxxxx |
| image_base64 | image in base64 format. support file types: jpg,png. maximum file size 1 MB. | /9j/4AAQSkZJRgABAQAASABIAAD/4VeGRXhpZgAATU0AK...... |
Data example
{
"merchant_id": "AA12345678",
"token": "testtokentesttokentesttokentesttokentesttoken",
"time": 1656272222,
"platform_order_id" : "THBP20240401071230HW2xxxxx",
"image_base64" : "/9j/4AAQSkZJRgABAQAASABIAAD/4VeGRXhpZgAATU0AK....."
}
Response
Here are response parameters.
| param | description |
|---|---|
| msg | always 'slip upload successful.' |
| verification_msg | pre-verification message from slip qrcode. |
Success Response
Code : 200 OK
Content example
{
"success": 200,
"data": {
"msg": "slip upload successful.",
"verification_msg": "amount ok, destination ok, transfer in time.",
}
}
Error Response
Condition : If invalid merchant id, token, or singature
Code : 403 BAD REQUEST
Content :
{
"error": {
"code": 403,
"message": "authentication failed"
}
}
Condition : If something went wrong.
Code : 500 ERROR
Content :
{
"error": {
"code": 500,
"message": "platform_order_id not found"
}
}