Skip to main content

User & Payment API

User Service

DomainEndpoints
UsersGET /users, GET /users/{id}, POST /users, PUT /users/{id}, DELETE /users/{id}
User selfGET /users/me, PUT /users/me, PUT /users/me/password
RolesGET /roles, GET /roles/{id}, POST /roles, PUT /roles/{id}, DELETE /roles/{id}
CustomersGET /customers, GET /customers/{id}, group/tier/activation endpoints
Register policiesGET /register-policies, POST /register-policies, PUT /register-policies/{id}, activate/delete endpoints
Booking policiesGET /term-policies/booking, POST /term-policies/booking, update/delete/activate endpoints
MeGET /me, GET /me/profile, GET /me/contact, PUT /me/contact, GET /me/phone/check, PUT /me/phone, GET /me/email/check, PUT /me/email, PUT /me/personal-info, GET /me/register-policies/consent, POST /me/accept-register-policies
Public contactPOST /public/contact-us
Master dataGET /master-data/titles

หมายเหตุ: code ปัจจุบันมี controller route register-policies สำหรับ Register Policy และ OpenAPI design repo รุ่นหนึ่งใช้ /term-policies/register; ให้ตรวจ APIM mapping ก่อนใช้งานจริงใน environment นั้น

Payment Service

MethodPathรายละเอียด
POST/payments/initiateเริ่ม payment จาก backoffice/internal flow
POST/public/payments/initiateเริ่ม payment จาก public/customer flow
POST/payments/webhookรับ webhook
GET/payments/{id}ดู transaction by id
GET/payments/booking/{bookingId}ดู transaction ของ booking
GET/payments/payment-methodsวิธีชำระเงิน
GET/payments/{transactionId}/subscribeSubscribe payment status
GET/masterdata/banksBank master data

Payment validation

FieldRule
BookingIdrequired
Tokenrequired ถ้า payment method เป็น CreditDebitCard และไม่มี SavedPaymentMethodId
ReturnUrirequired สำหรับ method ที่ไม่ใช่ PromptPay และต้องขึ้นต้น http:// หรือ https://