คู่มือเชื่อมต่อ GokuPay Payment Gateway
| Base URL | https://pay.teddynes.com |
| Content-Type | application/json |
| Auth | ใช้ api_key จากหน้าโปรไฟล์ |
Endpoint เดียว /ppay_api เลือกการทำงานด้วย method
ส่ง amount เป็นจำนวนเต็มบาท ระบบสุ่มทศนิยม .00–.99 กันยอดชนกัน
POST /ppay_api { "method": "create", "api_key": "gpay_xxx", "amount": 100, "ref1": "order-123", "key_id": "100568", "account": "1234567890", "type": "1" }
ตอบกลับ:
{
"status": 1,
"trans_id": "PPAY_xxxxxxxxx",
"qr_image_base64": "data:image/png;base64,...",
"amount_check": 10024,
"amount": "100.24",
"expire_at": "2026-01-01T12:15:00+07:00"
}
{ "method": "check", "api_key": "...", "trans_id": "PPAY_xxx" }
// payment_status: pending | completed | expired | cancelled
| 100568 | กสิกรไทย (KBANK) |
| 100569 | กรุงศรีอยุธยา (BAY) |
| 100570 | ไทยพาณิชย์ (SCB) |
เมื่อจ่ายสำเร็จ ระบบ POST ไป webhook_url ของคุณ พร้อมลายเซ็น HMAC-SHA256
{
"data": {
"trans_id": "PPAY_xxx", "ref1": "order-123",
"amount_check": 10024, "amount": "100.24",
"transaction_date": "2026-01-01", "transaction_time": "12:00:00",
"status": "1", "payment_status": "completed"
},
"signature": "hmac_sha256(JSON.stringify(data), api_key)"
}
// ปลายทางต้องตอบ: { "status": 1 }
GET /api_line?api_key=xxx&record_key=xxx // ตอบกลับ { "status": "success", "data": [ [ { "bankaccount": "xxx-x-x8685-x", "amount": "100.00", "currency": "บาท", "date": "2026-01-01 12:00:00", "balance": "895.50", "type": "เงินเข้า" } ] ] }
อัปโหลดไฟล์ HAR ได้ที่หน้า LINE Connect เพื่อรับ record_key