Skip to main content

Add Payment to Booking

Record a payment for a booking.

Endpointโ€‹

POST /v1/bookings/{id}/payments

Path Parametersโ€‹

ParameterTypeDescription
idintegerBooking ID

Request Bodyโ€‹

FieldTypeRequiredDescription
amountnumberYesPayment amount (min: 0.01)
methodstringYesPayment method
referencestringNoExternal reference/transaction ID (max 255 chars)
location_idintegerNoThe 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โ€‹

ValueDescription
manualManual/cash payment
credit_cardCredit/debit card
otherOther payment method
cashCash taken in person (recorded as manual, offline method cash)
bank_transferBank transfer (recorded as manual, offline method bank_transfer)
cardCard 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:

ConditionStatus
No paymentsunpaid
total_paid < totalpartial
total_paid >= totalpaid

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)