---
title: "Update scheduled charge"
method: PATCH
path: "/v1/accounts/{account_id}/scheduled-charges/{recurring_scheduled_charge_id}"
tags: ["Recurring scheduled charges"]
---

# Update scheduled charge

`PATCH /v1/accounts/{account_id}/scheduled-charges/{recurring_scheduled_charge_id}`

## Request

- Base URL: `https://sandbox.pismolabs.io/recurring-charge`
- URL: `https://sandbox.pismolabs.io/recurring-charge/v1/accounts/{account_id}/scheduled-charges/{recurring_scheduled_charge_id}`
- Auth: HTTP bearer

Updates a scheduled charge by account ID and recurring scheduled charge ID. It's only possible to update charges with current status `PENDING`. An update to a charge that is scheduled for a particular cycle must be done before that cycle's closing date.
This endpoint generates a [Recurring scheduled charge updated](https://developers.pismo.io/events/docs/balance-recurring-scheduled-charge-updated-1) event.

**NOTE:** This endpoint requires an account token — an access token encoded with an account ID. Tokens can expire quickly, which can result in a **401 Unauthorized** message.

## Path parameters

- `account_id` integer, required
- `recurring_scheduled_charge_id` integer, required

## Request body

- object
  - `installment_amount` number, double: `installment_amount` is the full amount of a recurring charge before any discount is applied.
  - `processing_code` string: Processing code for the debit transaction. If `split_transaction` is `false` (the default), each recurring payment is recorded as one debit transaction equal to the payment amount minus the discount, and `processing_code` is the processing code for that transaction. If `split_transaction` is `true`, each recurring payment is recorded as two transactions: a debit transaction for the payment amount and a credit transaction for the discount. In this case, `processing_code` is the processsing code for the debit transaction, and `second_processing_code` is the processing code for the credit transaction.
  - `description` string: A description of the scheduled charge that's linked to the account. Use `counter` to specify where the cycle count should be placed. Example: "Annuity {counter}" generates "Annuity 2/12" for the second of twelve annutities. If `counter` is not present, the counter is placed at the end of the description. If no description is configured, the description of the transaction type is used, and the counter is not shown.
  - `secondary_processing_code` string: Used to create the transaction for `secondary_installment_amount`. Normally, you should use a processing code for a credit transaction.
  - `secondary_installment_amount` number: If `split_transaction` is true, then `secondary_installment_amount` is the discount (`installment_amount` * `discount_percentage`) that is subtracted from `installment_amount` to calculate the amount that the customer owes on the installment. If `split_transaction` is false, then `secondary_installment_amount` is 0, and the actual amount that the customer owes goes in `installment_amount`." In the first case, two transactions are generated — a debit transaction for `installment_amount` and a credit transaction for `secondary_installment_amount`. (This is the expected behavior. However, it assumes that `processing_code` and `second_processing_code` are set to values for debit and credit transactions, respectively.) In the second case, only one transaction is generated (the one for `installment_amount`).
  - `secondary_description` string: Optional secondary description of the scheduled charge. Use `counter` to specify where the cycle count should be placed. Example: "Annuity {counter}" generates "Annuity 2/12" for the second of twelve annutities.

## Response `200`

OK - Indicates that the server accepted the request and updated the scheduled charge.

- ScheduledCharge
  - `recurring_scheduled_charge_id` integer: ID of recurring scheduled charge
  - `org_id` string: Organization ID
  - `account_id` integer: Account ID
  - `created_at` string: Date/time (GMT-3) that asset was registered on Pismo platform
  - `updated_at` string: Date closure was updated (GMT-3)
  - `statement_id` integer: Statement ID
  - `recurring_charge_link_id` integer: ID of recurring charge link
  - `status` 'PENDING' | 'PROCESSING' | 'CANCELLED' | 'SETTLED' | 'PROCESSED': PENDING: Charge is scheduled and waiting for the cycle to close. PROCESSING: Cycle closing process has started and is awaiting completion. CANCELLED: Charge canceled due to link cancellation. SETTLED: Amount is zero and/or `minimum_spend_to_charge` has not been reached. PROCESSED: Charge was posted on the statement."
  - `creation_cid` string: CID for the creation event
  - `cancellation_cid` string: CID for the cancellation event
  - `processing_code` string: Processing code for the debit transaction. If `split_transaction` is `false` (the default), each recurring payment is recorded as one debit transaction equal to the payment amount minus the discount, and `processing_code` is the processing code for that transaction. If `split_transaction` is `true`, each recurring payment is recorded as two transactions: a debit transaction for the payment amount and a credit transaction for the discount. In this case, `processing_code` is the processsing code for the debit transaction, and `second_processing_code` is the processing code for the credit transaction.
  - `installment_amount` number, double: `installment_amount` is the full amount of a recurring charge before any discount is applied.
  - `description` string: A description of the scheduled charge that's linked to the account. Use `counter` to specify where the cycle count should be placed. Example: "Annuity {counter}" generates "Annuity 2/12" for the second of twelve annutities. If `counter` is not present, the counter is placed at the end of the description. If no description is configured, the description of the transaction type is used, and the counter is not shown.
  - `authorization_id` integer: Authorization ID of the debit transaction for `installment_amount`.
  - `authorization_tracking_id` string: Tracking ID for the debit transaction for `installment_amount`.
  - `secondary_processing_code` string: Used to create the transaction for `secondary_installment_amount`. Normally, you should use a processing code for a credit transaction.
  - `secondary_installment_amount` number: If `split_transaction` is true, then `secondary_installment_amount` is the discount (`installment_amount` * `discount_percentage`) that is subtracted from `installment_amount` to calculate the amount that the customer owes on the installment. If `split_transaction` is false, then `secondary_installment_amount` is 0, and the actual amount that the customer owes goes in `installment_amount`." In the first case, two transactions are generated — a debit transaction for `installment_amount` and a credit transaction for `secondary_installment_amount`. (This is the expected behavior. However, it assumes that `processing_code` and `second_processing_code` are set to values for debit and credit transactions, respectively.) In the second case, only one transaction is generated (the one for `installment_amount`).
  - `secondary_description` string: Optional secondary description of the scheduled charge. Use `counter` to specify where the cycle count should be placed. Example: "Annuity {counter}" generates "Annuity 2/12" for the second of twelve annutities.
  - `secondary_authorization_id` integer: Authorization ID of the credit transaction for `secondary_installment_amount`.
  - `secondary_authorization_tracking_id` string: Tracking ID for the credit transaction for `secondary_installment_amount`.
  - `cycle` integer: Charge cycle number. For example, if the plan has 6 installments, and this charge is for the third installment, then the charge cycle number is 3.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `500`: Internal server error

---

[API](https://skmtc.dev/pismo/apis/revolving-credit-recurring-charges.md) - [All operations](https://skmtc.dev/pismo/apis/revolving-credit-recurring-charges/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/revolving-credit-recurring-charges/revisions/a5fea1d82e51?raw)
