---
updatedAt: 2026-06-09T10:44:05.000Z
agentTools:
  projectIndex: https://developer.phorest.com/llms.txt
---

# 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. Set cardCaptureOnly to true to create a link that charges nothing and only saves the client's card details. 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.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Third Party API",
    "description": "This API allow third parties to integrate with Phorest internal core services such as core, online-booking, planner, etc. Please, see the <a href=\"http://dev-changelog.s3-website-eu-west-1.amazonaws.com/?prefix=/third-party-api-server/\" target=\"_blank\">CHANGELOG</a> for further information on API updates.",
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "1.45.0"
  },
  "servers": [
    {
      "url": "http://api-gateway-eu.phorest.com/third-party-api-server",
      "description": "If you are from Europe, use this server"
    },
    {
      "url": "http://api-gateway-us.phorest.com/third-party-api-server",
      "description": "If you are from United States, Canada or Australia, use this server"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "tags": [
    {
      "name": "Deposit",
      "description": "Deposit Controller"
    }
  ],
  "paths": {
    "/api/business/{businessId}/branch/{branchId}/deposit/payment-link": {
      "post": {
        "tags": [
          "Deposit"
        ],
        "summary": "Create a deposit payment link",
        "description": "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. Set cardCaptureOnly to true to create a link that charges nothing and only saves the client's card details. 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.",
        "operationId": "createDepositPaymentLink",
        "parameters": [
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DepositPaymentLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Deposit payment link created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepositPaymentLinkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Business, branch, or appointment with the specified ids don't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limit exceeded. Current limit set to 100 rps.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "integer",
            "format": "int32"
          },
          "id": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "errorCode": {
            "type": "string"
          }
        }
      },
      "DepositPaymentLinkRequest": {
        "required": [
          "appointmentIds"
        ],
        "type": "object",
        "properties": {
          "appointmentIds": {
            "type": "array",
            "description": "List of appointment IDs to create a deposit payment link for",
            "example": [
              "abc-123",
              "def-456"
            ],
            "items": {
              "type": "string",
              "description": "List of appointment IDs to create a deposit payment link for",
              "example": "[\"abc-123\",\"def-456\"]"
            }
          },
          "notifyViaSms": {
            "type": "boolean",
            "description": "Automatically notify the client via SMS when the payment link is created",
            "example": false,
            "default": false
          },
          "notifyViaEmail": {
            "type": "boolean",
            "description": "Automatically notify the client via email when the payment link is created",
            "example": false,
            "default": false
          },
          "autoCancelAppointmentOnExpiry": {
            "type": "boolean",
            "description": "Automatically cancel the appointment when the payment link expires. If not provided, the branch default setting is used.",
            "example": true
          },
          "expiryEnabled": {
            "type": "boolean",
            "description": "Whether link expiry is enabled. If not provided, the branch default setting is used.",
            "example": true
          },
          "expiryDeadline": {
            "type": "integer",
            "description": "Expiry deadline value (used together with expiryTimeUnit). If not provided, the branch default setting is used.",
            "format": "int32",
            "example": 24
          },
          "expiryTimeUnit": {
            "type": "string",
            "description": "Expiry time unit (e.g. HOURS, DAYS). If not provided, the branch default setting is used.",
            "example": "HOURS"
          },
          "cardCaptureOnly": {
            "type": "boolean",
            "description": "Create a link that charges nothing and only saves the client's card details. Use this to secure a card for appointments that don't require a deposit. When false or not provided, the link charges the deposit calculated from the branch's deposit settings.",
            "example": true,
            "default": false
          }
        }
      },
      "DepositPaymentLinkResponse": {
        "type": "object",
        "properties": {
          "paymentLinkId": {
            "type": "string",
            "example": "pl-abc-123"
          },
          "url": {
            "type": "string",
            "description": "The payment link URL that can be shared with the client",
            "example": "https://pay.phorest.com/link/abc123"
          },
          "status": {
            "type": "string",
            "example": "PENDING"
          },
          "appointmentIds": {
            "type": "array",
            "example": [
              "appt-id-1",
              "appt-id-2"
            ],
            "items": {
              "type": "string",
              "example": "[\"appt-id-1\",\"appt-id-2\"]"
            }
          },
          "notifiedViaSms": {
            "type": "boolean",
            "description": "Whether the client was notified via SMS",
            "example": false
          },
          "notifiedViaEmail": {
            "type": "boolean",
            "description": "Whether the client was notified via email",
            "example": false
          },
          "cardCaptureOnly": {
            "type": "boolean",
            "description": "Whether the link charges nothing and only saves the client's card details",
            "example": false
          }
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  }
}
```