Overview
Marks a booking’s payment as confirmed by the partner. This endpoint is only available to partners withpaymentResponsibility = PARTNER.
When your partner account has PARTNER payment responsibility, your system is responsible for collecting payment from your customer. After successful payment collection on your side, call this endpoint to notify CleanLife that the booking has been paid. This transitions the booking’s paymentStatus from PENDING to PAID.
Endpoint
Authentication
Requires a valid API Key with thepartner_bookings_confirm_payment permission.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
bookingId | UUID | Yes | The booking ID returned at creation time. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
paymentReference | string | No | Your internal payment transaction reference (e.g., your payment gateway transaction ID). Stored for reconciliation. Max 255 characters. |
Example Request
Success Response
HTTP Status:200 OK
Error Responses
| HTTP Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Invalid path or body parameter |
401 | UNAUTHORIZED | Missing or invalid API key |
403 | FORBIDDEN | Missing partner_bookings_confirm_payment permission |
404 | RESOURCE_NOT_FOUND | Booking not found, or the partner booking reference record is missing |
422 | PAYMENT_RESPONSIBILITY_MISMATCH | Your account has paymentResponsibility = CLEANOS; this endpoint is not available to you |
422 | BOOKING_NOT_PAYABLE | Booking is canceled or failed — cannot confirm payment |
422 | PAYMENT_ALREADY_CONFIRMED | Payment for this booking was already confirmed |
Business Rules
-
PARTNER responsibility only. This endpoint is exclusively for partners configured with
paymentResponsibility = PARTNER. If your account hasCLEANOSresponsibility, calling this endpoint returns422 PAYMENT_RESPONSIBILITY_MISMATCH. -
Cannot confirm payment for cancelled or failed bookings. If the booking is in
canceledorfailedstatus, payment confirmation is rejected. -
Duplicate confirmation. Calling this endpoint again after payment is already confirmed returns
422 PAYMENT_ALREADY_CONFIRMED. Treat this as a successful no-op. -
Payment reference stored for reconciliation. The
paymentReferenceyou provide is stored with a confirmation timestamp for billing reconciliation between CleanLife and your organization. -
Webhook on confirmation. A
booking.payment_confirmedwebhook event is fired after a successful payment confirmation.
Notes
- Even if you do not have an external payment reference (e.g., for invoiced arrangements), you can call this endpoint with an empty body (
{}) to confirm that payment has been arranged. - The
paymentStatusin subsequentGET /partners/bookings/:bookingId/statusresponses will reflectPAIDafter this call.
Related Endpoints
GET /partners/bookings/:bookingId/status— Check currentpaymentStatusPATCH /partners/bookings/:bookingId/cancel— Cancel the booking if payment fails