---
title: "Partially update payment plan"
method: PATCH
path: "/processing-terminals/{processingTerminalId}/payment-plans/{paymentPlanId}"
tags: ["paymentPlans"]
---

# Partially update payment plan

`PATCH /processing-terminals/{processingTerminalId}/payment-plans/{paymentPlanId}`

Use this method to partially update a payment plan. Structure your request to follow the [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902) standard.  

To update a payment plan, you need its paymentPlanId, which you sent in the request of the [Create Payment Plan](https://docs.payroc.com/api/schema/repeat-payments/payment-plans/create) method.  

**Note:** If you don't have the paymentPlanId, use our [List Payment Plans](https://docs.payroc.com/api/schema/repeat-payments/payment-plans/list) method to search for the payment plan.  

You can update all of the properties of the payment plan except for the paymentPlanId.  

The value you sent for the onUpdate parameter when you created the payment plan indicates what happens to the associated subscriptions when you update the plan:  
- `update` - Our gateway updates the subscriptions associated with the payment plan.
- `continue` - Our  gateway doesn't update the subscriptions associated with the payment plan.

## Path parameters

- `processingTerminalId` string, required
- `paymentPlanId` string, required

## Headers

- `Authorization` string, required
- `Idempotency-Key` string, uuid, required

## Request body

- PatchDocument[] — A JSON Patch document as defined by RFC 6902.
  - union — A JSON Patch operation as defined by RFC 6902.
    - object — A Patch Add Operation.
      - `op` 'add', required — Discriminator value: add
      - `path` string, required — Location where you want to add the value. The format for this value is JSON Pointer.
      - `value` unknown, required
    - object — A Patch Remove Operation.
      - `op` 'remove', required — Discriminator value: remove
      - `path` string, required — Location of the value that you want to remove. The format for this value is JSON Pointer.
    - object — A Patch Replace Operation.
      - `op` 'replace', required — Discriminator value: replace
      - `path` string, required — Location of the value that you want to replace. The format for this value is JSON Pointer.
      - `value` unknown, required
    - object — A Patch Move Operation.
      - `op` 'move', required — Discriminator value: move
      - `from` string, required — Location of the value that you want to move. The format for this value is JSON Pointer.
      - `path` string, required — Location where you want to move the value to. The format for this value is JSON Pointer.
    - object — A Patch Copy Operation.
      - `op` 'copy', required — Discriminator value: copy
      - `from` string, required — Location of the value that you want to copy. The format for this value is JSON Pointer.
      - `path` string, required — Location where you want to copy the value to. The format for this value is JSON Pointer.
    - object — A Patch Test Operation.
      - `op` 'test', required — Discriminator value: test
      - `path` string, required — Location of the value that you want to test. The format for this value is JSON Pointer.
      - `value` unknown, required

## Response `200`

Successful request. We updated the payment plan.

- PaymentPlan
  - `paymentPlanId` string, required — Unique identifier that the merchant assigns to the payment plan.
  - `processingTerminalId` string — Unique identifier of the terminal that the payment plan is assigned to.
  - `name` string, required — Name of the payment plan.
  - `description` string — Description of the payment plan.
  - `currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL', required — Currency of the transaction. The value for the currency follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.
  - `length` integer — Number of payments for the payment plan. To indicate that the payment plan should run indefinitely, send a value of `0`.
  - `type` 'manual' | 'automatic', required — Indicates how the merchant takes the payment from the customer's account. - `manual` - The merchant manually collects payments from the customer. - `automatic` - The terminal automatically collects payments from the customer.
  - `frequency` 'weekly' | 'fortnightly' | 'monthly' | 'quarterly' | 'yearly', required — Indicates how often the merchant or the terminal collects a payment from the customer.
  - `onUpdate` 'update' | 'continue', required — Indicates whether any changes that the merchant makes to the payment plan apply to existing subscriptions. - `update` - Changes apply to existing subscriptions. - `continue` - Changes don't apply to existing subscriptions.
  - `onDelete` 'complete' | 'continue', required — Indicates what happens to existing subscriptions if the merchant deletes the payment plan. - `complete` - Stops existing subscriptions. - `continue` - Continues existing subscriptions.
  - `customFieldNames` string[] — Array of custom fields that you can use in subscriptions linked to the payment plan.
  - `setupOrder` PaymentPlanSetupOrder — Object that contains information about the initial cost that a customer pays to set up the subscription.
    - `amount` integer — Total amount before surcharges. The value is in the currency's lowest denomination, for example, cents.
    - `description` string — Description of the transaction.
    - `breakdown` PaymentPlanOrderBreakdown
      - `subtotal` integer, required — Total amount for the transaction before tax. The value is in the currency's lowest denomination, for example, cents.
      - `taxes` RetrievedTax[] — Array of tax objects.
        - `name` string, required — Name of the tax.
        - `rate` number, double, required — Tax percentage for the transaction.
        - `amount` integer — Amount of tax that was applied to the transaction. The value is in the currency's lowest denomination, for example, cents.
  - `recurringOrder` PaymentPlanRecurringOrder — Object that contains information about the cost of each payment. **Note:** Send this object only if the value for **type** is `automatic`.
    - `amount` integer — Total amount before surcharges. The value is in the currency's lowest denomination, for example, cents.
    - `description` string — Description of the transaction.
    - `breakdown` PaymentPlanOrderBreakdown
      - `subtotal` integer, required — Total amount for the transaction before tax. The value is in the currency's lowest denomination, for example, cents.
      - `taxes` RetrievedTax[] — Array of tax objects.
        - `name` string, required — Name of the tax.
        - `rate` number, double, required — Tax percentage for the transaction.
        - `amount` integer — Amount of tax that was applied to the transaction. The value is in the currency's lowest denomination, for example, cents.

## Other responses

- `400` — Invalid request
- `401` — Identity could not be verified
- `403` — Do not have permissions to perform this action
- `404` — Resource not found
- `406` — Not acceptable
- `409` — Conflict
- `415` — Unsupported media type
- `500` — An error has occured

---

[API](https://skmtc.dev/payroc/apis/schema.md) · [All operations](https://skmtc.dev/payroc/apis/schema/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/payroc/schema/revisions/1d9d3e305945/schema)
