Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsUpdate Lease Autopay
Search the full API reference Esc to close

Update Lease Autopay

Leases · REST API reference

Get support
PATCH/v1/leases/{lease_id}/autopay
Amend the enrollment, and/or suspend or resume it (spec 10.1, 10.6).

Authentication

Bearer API key or Facily session, subject to permissions and facility scope.

Authentication and scope

Request example

Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.

cURL
curl --request PATCH \
  --url 'https://api.staging.facily.ai/v1/leases/<LEASE_ID>/autopay' \
  --header "Authorization: Bearer $FACILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "charge_day_offset": 0,
  "clear_max_amount": false,
  "max_amount": 0,
  "payment_method_id": "00000000-0000-4000-8000-000000000001",
  "resume": false,
  "suspend": false
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

lease_idpath · stringrequired

Format: uuid

Request body

application/json · Required

charge_day_offsetinteger | null

Minimum: 0 · Maximum: 28

Show charge_day_offset schema
integer | null
Variant 1: integer
integer
Variant 2: null
null
clear_max_amountboolean

Remove the cap. Cannot be combined with max_amount.

Default: false

max_amountnumber | string | null

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$

Show max_amount schema
number | string | null
Variant 1: number
number
Variant 2: string
string
Variant 3: null
null
payment_method_idstring | null

Format: uuid

Show payment_method_id schema
string | null
Variant 1: string
string
Variant 2: null
null
resumeboolean

Lift a suspension and reset the failure counters.

Default: false

suspendboolean

Pause attempts without ending the mandate.

Default: false

Responses

Expand a status to inspect its schema. Generated examples show structure and synthetic values.

200Successful Response
JSON · generated example
{
  "data": {
    "charge_day_offset": 0,
    "consecutive_failures": 0,
    "enrolled_at": "2026-10-29T12:00:00Z",
    "id": "00000000-0000-4000-8000-000000000001",
    "is_active": false,
    "lease_id": "00000000-0000-4000-8000-000000000001",
    "payment_method_id": "00000000-0000-4000-8000-000000000001",
    "tenant_id": "00000000-0000-4000-8000-000000000001",
    "consent_version": "string",
    "consented_at": "2026-10-29T12:00:00Z",
    "last_charge_at": "2026-10-29T12:00:00Z",
    "last_charge_status": "string"
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataAutopayEnrollmentResponserequired
Show data schema
charge_day_offsetintegerrequired
consecutive_failuresintegerrequired
consent_versionstring | null
Show consent_version schema
string | null
Variant 1: string
string
Variant 2: null
null
consented_atstring | null

Format: date-time

Show consented_at schema
string | null
Variant 1: string
string
Variant 2: null
null
enrolled_atstringrequired

Format: date-time

idstringrequired

Format: uuid

is_activebooleanrequired
last_charge_atstring | null

Format: date-time

Show last_charge_at schema
string | null
Variant 1: string
string
Variant 2: null
null
last_charge_statusstring | null
Show last_charge_status schema
string | null
Variant 1: string
string
Variant 2: null
null
lease_idstringrequired

Format: uuid

max_amountstring | null

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show max_amount schema
string | null
Variant 1: string
string
Variant 2: null
null
next_attempt_onstring | null

Format: date

Show next_attempt_on schema
string | null
Variant 1: string
string
Variant 2: null
null
payment_method_idstringrequired

Format: uuid

suspended_atstring | null

Format: date-time

Show suspended_at schema
string | null
Variant 1: string
string
Variant 2: null
null
suspension_reasonstring | null
Show suspension_reason schema
string | null
Variant 1: string
string
Variant 2: null
null
tenant_idstringrequired

Format: uuid

metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
400Validation error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
401Unauthenticated
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
403Permission denied
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
404Not found
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
409Business logic error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
503Temporary failure
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
Continue exploringAll leases operations
Build something that works beautifully.

Facily API · Contract v1.200 · Reviewed October 29, 2026

Update Lease Autopay | Facily Developers