Payment Gateway API
Payment Gateway API
This documentation covers all HTTP endpoints exposed by the gateway, along with the asynchronous webhook callbacks delivered to your
notify_url when payment, withdrawal, or settlement orders complete.
เอกสารนี้ครอบคลุมทุก HTTP endpoint ที่ payment gateway เปิดให้เรียกใช้
พร้อมทั้งระบบ Webhook ที่จะส่งสถานะกลับไปที่ notify_url ของคุณ
เมื่อรายการฝากเงิน ถอนเงิน หรือ Settlement เสร็จสมบูรณ์
Download llms-full.md — a single, self-contained reference (~86 KB Markdown) covering all endpoints, webhooks, errors, and integration patterns. Paste it into ChatGPT, Claude, Cursor, or Copilot along with your task to get accurate, production-ready integration code.
ดาวน์โหลด llms-full.md —
เอกสารอ้างอิงไฟล์เดียว (~86 KB Markdown) ครอบคลุมทุก endpoint, webhook, error, และ
integration pattern
paste เข้า ChatGPT, Claude, Cursor หรือ Copilot พร้อมโจทย์ของคุณ
เพื่อให้ AI สร้างโค้ด integration ที่ถูกต้องและพร้อม production
Grab paymentstack-api.postman_collection.json —
a ready-to-run Postman collection covering every endpoint. Import it, set four
collection variables (baseUrl, merchant_id, token,
secret), and press Send. A built-in pre-request script
computes the X-SIGNATURE HMAC for you on every call — no manual signing.
ดาวน์โหลด paymentstack-api.postman_collection.json —
Postman collection พร้อมใช้ ครบทุก endpoint
Import แล้วตั้งค่าตัวแปร 4 ตัว
(baseUrl, merchant_id, token, secret)
จากนั้นกด Send ได้เลย
หมายเหตุ: มี pre-request script คำนวณ
X-SIGNATURE (HMAC) ให้อัตโนมัติทุกครั้ง ไม่ต้องเซ็นเอง
What you'll find here
เนื้อหาในเอกสารนี้
The API uses HMAC-SHA256 signature authentication over plain JSON requests.
All endpoints are POST and require a signed body containing your merchant_id,
token, and time (Unix epoch seconds). Start with the
Getting Started guide,
then read Authentication & Signature before
jumping into endpoint references.
API ใช้ HMAC-SHA256 signature สำหรับยืนยันตัวตน
ทุก endpoint เป็น POST และ body ต้องมี merchant_id, token, และ time เสมอ
แนะนำให้อ่าน Getting Started ก่อน
ตามด้วย Authentication & Signature
แล้วค่อยดู endpoint ที่ต้องการ
Endpoints at a glance
รายการ Endpoint
Account
บัญชี
Payments (Deposit)
การฝากเงิน
Withdrawals (Payout)
การถอนเงิน
Settlement (THB)
Settlement (THB)
Webhooks
Webhooks
Conventions used in this guide
รูปแบบที่ใช้ในเอกสาร
- Code examples are shown in cURL, Node.js, and PHP. Use the tabs above each code block to switch.
- ตัวอย่างโค้ดมีให้ทั้ง cURL, Node.js, และ PHP สลับได้ด้วยแท็บด้านบนของ code block
- The placeholder
https://<your-api-domain>represents the API base URL provisioned by your payment gateway admin. https://<your-api-domain>คือ placeholder ของ base URL ที่ Payment gateway admin จะแจ้งให้คุณทราบ- The placeholder
<your-merchant-webhook-URL>represents your own webhook receiver — the URL you tell us to call when an order completes. <your-merchant-webhook-URL>คือ URL webhook ฝั่งคุณ ที่ระบบเราจะเรียกเมื่อรายการสำเร็จ- All amounts are in Thai Baht (THB) unless stated otherwise.
- จำนวนเงินทั้งหมดเป็น Thai Baht (THB) เว้นแต่จะระบุไว้
- All timestamps in callback payloads are Unix milliseconds.
- Timestamp ใน callback payload ทุกตัวเป็น Unix milliseconds