API v1
Developer documentation
SalePage is API-first. ทุกฟีเจอร์เปิดเป็น REST endpoint ที่ใช้ได้ทั้ง web app และ mobile app — response เป็น JSON มาตรฐาน { ok, data } หรือ { ok: false, error }.
PromptPay
- POST
/api/v1/promptpay/qrGenerate Thai QR Payment from a phone / national ID + optional amount. - GET
/api/v1/promptpay/qr?id=…&amount=…Same, accepts query params.
Slip verification
- POST
/api/v1/slip/verifyVerify a bank transfer slip image / QR payload. Returns parsed sender / receiver / amount.
Shops
- GET
/api/v1/shopsauthList shops owned by the signed-in user. - POST
/api/v1/shopsauthCreate a shop. - GET
/api/v1/shops/:slugPublic shop info. - PATCH
/api/v1/shops/:slugauthUpdate shop (owner only). - GET
/api/v1/shops/:slug/productsPublic product list. - POST
/api/v1/shops/:slug/productsauthCreate a product. - GET / PATCH / DELETE
/api/v1/shops/:slug/products/:productSlugProduct detail / update / delete.
Orders
- POST
/api/v1/ordersPlace an order. Returns tracking token + PromptPay QR. - GET
/api/v1/orders/:tokenPublic order detail. - POST
/api/v1/orders/:token/slipUpload + auto-verify a transfer slip for an order. - PATCH
/api/v1/orders/:token/statusauthMark as shipping / delivered / cancelled (owner only).
Billing
- GET
/api/v1/billing/plansPublic plan catalog (price + trial). - POST
/api/v1/billing/checkoutStart a Stripe Checkout session for Pro / Business. - POST
/api/v1/billing/portalGet Stripe billing portal URL for an existing customer. - POST
/api/v1/billing/webhookStripe-signed webhook (server-to-server).
Misc
- GET
/api/v1/healthLists all endpoints + server time. Useful for uptime monitors. - POST
/api/v1/uploadauthUpload an image to Vercel Blob; returns a permanent URL.
เอกสารแบบ OpenAPI / interactive playground (Stoplight, Mintlify) อยู่ ในแผน — ติดต่อ dev@salepage.in.th ถ้าต้องการ early access