Partially update subscription
Use this method to partially update a subscription. Structure your request to follow the [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902) standard.
To update a subscription, you need its subscriptionId, which you sent in the request of the [Create subscription](https://docs.payroc.com/api/schema/payments/subscriptions/create) method.
**Note:** If you don't have the subscriptionId, use our [List subscriptions](https://docs.payroc.com/api/schema/payments/subscriptions/list) method to search for the payment.
You can update all of the properties of the subscription except for the following:
**Can't delete**
- recurringOrder
- description
- name
**Can't perform any PATCH operation**
- currentState
- type
- frequency
- paymentPlan
Path parameters
processingTerminalId
Unique identifier that we assigned to the terminal.
subscriptionId
Unique identifier that the merchant assigned to the subscription.
Headers
Authorization
Bearer authentication of the form `Bearer <token>`, where token is your auth token.
Idempotency-Key
Unique identifier that you generate for each request. You must use the [UUID v4 format](https://www.rfc-editor.org/rfc/rfc4122) for the identifier. For more information about the idempotency key, go to [Idempotency](https://docs.payroc.com/api/idempotency).
Request
This endpoint expects a list of objects.
Patch Add Operation
OR
Patch Remove Operation
OR
Patch Replace Operation
OR
Patch Move Operation
OR
Patch Copy Operation
OR
Patch Test Operation
Response
Successful request. We have updated the subscription.
subscriptionId
Unique identifier that the merchant assigned to the subscription.
processingTerminalId
Unique identifier of the terminal that the subscription is linked to.
paymentPlan
secureToken
Object that contains information about the secure token.
name
Name of the subscription.
currency
Currency of the transaction. The value for the currency follows the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.
currentState
A snapshot of the subscription's current state.
startDate
Format: **YYYY-MM-DD**
Subscription's start date.
type
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.
Allowed values:
frequency
Indicates how often the merchant or the terminal collects a payment from the customer.
Allowed values:
description
Description of the subscription.
setupOrder
Object that contains information about the initial cost that a customer pays to set up the subscription.
recurringOrder
Object that contains information about the cost of each payment.
**Note:** Send this object only if the value for **type** is `automatic`.
endDate
Format: **YYYY-MM-DD**
Subscription's end date.
**Note:** If you provide values for both **length** and **endDate**,
our gateway uses the value for **endDate** to determine when the subscription should end.
length
Total number of billing cycles. To indicate that the subscription should run indefinitely, send a value of `0`. This value replaces the **length** inherited from the payment plan.
**Note:** If you provide values for both **length** and **endDate**, our gateway uses the value for **endDate** to determine when the subscription should end.
pauseCollectionFor
Number of billing cycles that the merchant wants to pause payments for.
For example, if the merchant wants to offer a free trial period.
customFields
Array of customField objects.