v1

latestOpenAPI 3.0.1Apache 2.02026-07-2473111182.6 KB
Deposit

Create a deposit payment link

Create a payment link for an in-house deposit on the specified appointments. The deposit amount is automatically calculated based on the branch's deposit settings for the given appointments. Returns the payment link URL which can be shared with the client. Optionally notify the client via SMS and/or email. Expiry and auto-cancel settings can be overridden per request; if not provided, the branch's default payment link processing settings are used.

post/api/business/{businessId}/branch/{branchId}/deposit/payment-link

Path parameters

businessIdstring required
branchIdstring required

Request body

appointmentIdsstring[] required

List of appointment IDs to create a deposit payment link for

notifyViaSmsboolean

Automatically notify the client via SMS when the payment link is created

notifyViaEmailboolean

Automatically notify the client via email when the payment link is created

autoCancelAppointmentOnExpiryboolean

Automatically cancel the appointment when the payment link expires. If not provided, the branch default setting is used.

expiryEnabledboolean

Whether link expiry is enabled. If not provided, the branch default setting is used.

expiryDeadlineinteger

Expiry deadline value (used together with expiryTimeUnit). If not provided, the branch default setting is used.

expiryTimeUnitstring

Expiry time unit (e.g. HOURS, DAYS). If not provided, the branch default setting is used.

Example request

{
  "appointmentIds": [
    "abc-123",
    "def-456"
  ],
  "autoCancelAppointmentOnExpiry": true,
  "expiryEnabled": true,
  "expiryDeadline": 24,
  "expiryTimeUnit": "HOURS"
}

Response

Deposit payment link created successfully

paymentLinkIdstring
urlstring

The payment link URL that can be shared with the client

statusstring
appointmentIdsstring[]
notifiedViaSmsboolean

Whether the client was notified via SMS

notifiedViaEmailboolean

Whether the client was notified via email

Example response

{
  "paymentLinkId": "pl-abc-123",
  "url": "https://pay.phorest.com/link/abc123",
  "status": "PENDING",
  "appointmentIds": [
    "appt-id-1",
    "appt-id-2"
  ]
}