Add Payment to Booking
Record a payment for a booking.
Endpointโ
POST /v1/bookings/{id}/payments
Path Parametersโ
| Parameter | Type | Description |
|---|---|---|
id | integer | Booking ID |
Request Bodyโ
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Payment amount (min: 0.01) |
method | string | Yes | Payment method |
reference | string | No | External reference/transaction ID (max 255 chars) |
location_id | integer | No | The location of the counter that took the payment, so cash counts at the till open there. Must be one of your locations. See Which till a payment counts at |
Payment Methodsโ
| Value | Description |
|---|---|
manual | Manual/cash payment |
credit_card | Credit/debit card |
other | Other payment method |
cash | Cash taken in person (recorded as manual, offline method cash) |
bank_transfer | Bank transfer (recorded as manual, offline method bank_transfer) |
card | Card taken on the business's own card machine, not through EquipDash (recorded as manual, offline method card) |
Example Requestโ
curl -X POST "https://app.equipdash.com/api/v1/bookings/123/payments" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 150.00,
"method": "credit_card",
"reference": "ch_1234567890"
}'
Responseโ
{
"data": {
"payment": {
"id": 789,
"amount": 150.00,
"method": "credit_card",
"reference": "ch_1234567890",
"status": "confirmed",
"payment_date": "2026-02-01T10:00:00+00:00"
},
"booking": {
"id": 123,
"payment_status": "partial",
"total_paid": 150.00,
"amount_due": 75.50
}
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-01T10:00:00+00:00"
}
}
Payment Status Calculationโ
The booking's payment_status is automatically updated:
| Condition | Status |
|---|---|
| No payments | unpaid |
| total_paid < total | partial |
| total_paid >= total | paid |
Errorsโ
Invalid Amountโ
{
"error": {
"code": "validation_error",
"message": "The given data was invalid.",
"details": [
{
"field": "amount",
"message": "The amount must be at least 0.01."
}
]
}
}
Invalid Methodโ
{
"error": {
"code": "validation_error",
"message": "The given data was invalid.",
"details": [
{
"field": "method",
"message": "The selected method is invalid."
}
]
}
}
Cancelled Bookingโ
{
"error": {
"code": "conflict",
"message": "Cannot add payment to a cancelled booking."
}
}
Notesโ
- Payments can be added to completed bookings (for balance collection)
- There's no limit on the number of payments
- Overpayment is allowed (for deposits/prepayments)
- Payments cannot be deleted via API (use admin interface)