Tạo thông tin thanh toán cho lịch hẹn/đơn hàng ở trang thanh toán.
| URL | /PartnerAPI/CustomerSchedule/user/createPayment |
|---|---|
| Method | POST |
| Header | Required | Mô tả |
|---|---|---|
| apiKey hoặc apikey | Yes | Khóa xác thực API của đối tác |
| Field | Type | Required | Rule | Mô tả |
|---|---|---|---|---|
| customerScheduleId | number | Yes | > 0 | ID lịch hẹn |
| paymentMethodType | number | Yes | Giá trị trong danh sách payment type | Loại phương thức thanh toán |
| paymentMethodId | number | No | > 0 nếu truyền | ID phương thức thanh toán |
| paymentMethodSubType | string | No | Chuỗi định danh subtype | Sub-type thanh toán |
| stationServicesList | number[] | No | Mỗi phần tử > 0 | Danh sách dịch vụ trạm |
| stationsId | number | No | > 0 nếu truyền | ID trạm |
curl --location 'https://ttdk-develop-server.service.makefamousapp.com/PartnerAPI/CustomerSchedule/user/createPayment' \
--header 'Content-Type: application/json' \
--header 'apiKey: demo_partner_api_key' \
--data '{
"customerScheduleId": 1869,
"paymentMethodType": 2,
"paymentMethodId": 1,
"stationServicesList": [101]
}'
{
"statusCode": 200,
"error": null,
"message": "Success",
"data": {
"customerScheduleId": 1869,
"isSuccess": 1,
"paymentStatus": "New",
"totalPayment": 120000,
"orderData": { "orderId": 99999 },
"errorMessage": null,
"errorCode": null,
"inAppGtelOrderId": null,
"paymentMethodId": 1,
"paymentMethodType": 2,
"paymentMethodSubType": null,
"metaData": null,
"bankQR": {
"qrData": "https://.../qr.png",
"qrCode": "000201...",
"paymentContent": "ORDER99999"
},
"momoQR": null,
"paymentLinkUrl": null,
"paymentDeepLink": null,
"paymentGatewayData": null
}
}
| HTTP | Mã lỗi | Mô tả |
|---|---|---|
| 400 | INVALID_REQUEST | Dữ liệu đầu vào không hợp lệ. |
| 401 | UNAUTHORIZED | apiKey không hợp lệ hoặc không có quyền truy cập. |
| 429 | APIKEY_QUOTA_EXCEEDED | Vượt quota cho apiKey. |
| 500 | UNKNOWN_ERROR | Lỗi hệ thống nội bộ. |