# Updates an installment plan

Updates an Installment plan object. Returns the updated Installment plan

Endpoint: PATCH /installment_plans/{id}
Version: v1
Security: apiKey

## Path parameters:

  - `id` (string, required)
    ID of the installment plan

## Request fields (application/json):

  - `description` (string)
    Description of the installment plan. This will be shown to customers and in the PayPro dashboard
    Example: "description"

  - `mandate` (string)
    ID of the mandate for installment plan. Only approved 'direct-debit' customer's mandates are supported.

  - `number_of_periods` (number)

  - `period` (object)
    Settings for when new periods should be created and with which amounts. When the Installment plan is active updates to these settings will only affect new periods.
    Example: {"amount":1000}

  - `period.amount` (integer)
    The amount in cents that the customer will have to pay.
    Example: 1000

  - `period.interval` (string)
    The interval of each period. Accepted values: day, week, month or year

  - `period.multiplier` (integer)
    The multiplier of the interval between periods. Example: interval=month and mulitplier=3 will create a new period every 3 months.

  - `first_period` (object,null)
    Settings for when the first period should be created and with what amount. These settings can only be updated if the Installment plan has not started yet.

  - `first_period.amount` (integer)
    The amount in cents that the customer will have to pay.

  - `first_period.interval` (string)
    The interval of each period. Accepted values: day, week, month or year

  - `first_period.multiplier` (integer)
    The multiplier of the interval between periods. Example: interval=month and mulitplier=3 will create a new period every 3 months.

  - `next_debit_date` (string,null)
    Date when the next payment period will be collected

## Response 200 fields (application/json):

  - `id` (string, required)
    Example: "PIV1QACRO4DSMQT0KK"

  - `type` (string, required)
    Enum: "installment_plan"

  - `description` (string, required)
    Example: "Test installment plan"

  - `installment_plan_type` (string,null, required)
    Enum: "direct_debit"

  - `state` (string, required)
    Example: "active"

  - `currency` (string, required)
    Enum: "EUR"

  - `created_at` (string, required)
    Example: "2023-07-24T12:40:10Z"

  - `customer` (string,null, required)
    Example: "CU7JRN6W6K3DA9"

  - `mandate` (string,null, required)
    Example: "MDC7XX65BH42PW"

  - `period` (object, required)
    Example: {"amount":"1000","vat":"21","multiplier":1,"interval":"month"}

  - `period.amount` (integer, required)
    Example: "1000"

  - `period.vat` (number, required)
    Example: "21"

  - `period.multiplier` (integer, required)
    Example: 1

  - `period.interval` (string, required)
    Enum: "day", "week", "month", "year"

  - `first_period` (object,null, required)
    Example: {"amount":"1000","vat":"21","multiplier":1,"interval":"month"}

  - `first_period.amount` (integer, required)
    Example: "1000"

  - `first_period.vat` (number, required)
    Example: "21"

  - `first_period.multiplier` (integer)
    Example: 1

  - `first_period.interval` (string)
    Enum: same as `period.interval` (4 values)

  - `number_of_periods` (number, required)
    Example: 5

  - `payment_details` (object, required)
    Example: {"return_url":null,"cancel_url":null}

  - `payment_details.return_url` (string,null, required)

  - `payment_details.cancel_url` (string,null, required)

  - `next_period_date` (string,null, required)

  - `metadata` (object, required)
    Example: {}

  - `_links` (object, required)
    Example: {"self":"https://api.paypro.nl/installment_plans/PIV1QACRO4DSMQT0KK","customer":"https://api.paypro.nl/customers/CU7JRN6W6K3DA9","mandate":"https://api.paypro.nl/mandates/MDC7XX65BH42PW"}

  - `_links.self` (string, required)
    Example: "https://api.paypro.nl/installment_plans/PIV1QACRO4DSMQT0KK"

  - `_links.customer` (string)
    Example: "https://api.paypro.nl/customers/CU7JRN6W6K3DA9"

  - `_links.mandate` (string)
    Example: "https://api.paypro.nl/mandates/MDC7XX65BH42PW"

  - `_links.checkout` (string)

## Response 404 fields (application/json):

  - `error` (object, required)

  - `error.message` (string, required)
    The error message

  - `error.type` (string, required)
    Type of error
    Enum: "invalid_request"


