---
title: "Update a recurring donation"
description: "Update a recurring donation."
canonical: https://www.charitips.com/docs/api-reference/update-recurring-donation
---

# Update a recurring donation

`PATCH /v1/recurring-donations/{recurringDonationId}`

Update a recurring donation.

**Authentication**: Bearer access token.

## Parameters

- `recurringDonationId` (string, required)

## Body

- `amount` (integer (int64), minimum 1): Donation amount in minor currency unit i.e cents.
- `donorFirstName` (string): First name of the donor. Will be used for email communications.
- `donorLastName` (string): Last name of the donor. Will be used for email communications.
- `donorEmail` (string): Email of the donor. Will be used for email communications.
- `externalId` (string): An optional internal id of your system e.g orderId or customerId. Can be used to link a recurring donation to an entity in your system.
- `uniqueExternalId` (string): Similar to externalId but should be unique across all recurring donations. Can be used to prevent duplicate recurring donations.
- `language` (string): Locale to be used to communicate with the donor. Default to the campaign's language value. One of `fr`, `en`.

## Response 200

- `recurringDonationId` (string, required)
- `type` (RecurringDonationType, required) One of `FREQUENCY`, `MANUAL`.
- `amountType` (RecurringDonationAmountType, required) One of `FIXED_AMOUNT`, `RATE`.
- `status` (RecurringDonationStatus, required) One of `PENDING`, `ACTIVE`, `PAUSED`, `CANCELED`.
- `hasBeenCharged` (boolean, required)
- `feeType` (FeeType, required) One of `EXCLUDED`, `INCLUDED`.
- `amount` (integer (int64), required)
- `rate` (number)
- `baseAmount` (integer (int64))
- `withRounding` (boolean, required)
- `frequency` (string)
- `secret` (string, required)
- `externalId` (string)
- `uniqueExternalId` (string)
- `sendingMode` (CampaignSendingMode, required) One of `MANUAL`, `EMAIL`, `PHYSICAL`, `SLACK`, `POSTAL`.
- `sendingDate` (string (date-time))
- `sendingStatus` (DonationSendingStatus, required) One of `PENDING`, `FAILED`, `DONE`.
- `lastReminderId` (string)
- `message` (string)
- `reminderMessage` (string)
- `from` (string)
- `language` (Language, required) One of `fr`, `en`.
- `accountId` (string, required)
- `campaignId` (string, required)
- `charityId` (string)
- `donorId` (string, required)
- `createdAt` (string (date-time), required)
- `updatedAt` (string (date-time), required)

## Errors

- 400 `A field is missing, has the wrong type, or is not part of the request schema.`: `message` lists every problem. Unknown fields are rejected, not ignored: remove them rather than sending extra data. See https://www.charitips.com/docs/api-reference/errors.md.
- 401 `Unauthorized`: The access token is missing, expired or invalid. Create a new one with your client id and secret, send it as `Authorization: Bearer <accessToken>`, then retry once. Sandbox tokens only work on api.sandbox.charitips.com. See https://www.charitips.com/docs/get-started/authentication.md.
- 403 `Account closed`: The account behind these credentials is closed: no token is issued and every call is refused, reads included. Contact Charitips to reopen it. See https://www.charitips.com/docs/api-reference/troubleshooting.md#calls-answer-403-account-not-active-account-not-validated-or-account-closed.
- 403 `Forbidden`: Your credentials cannot perform this action on this resource. An id from another account never answers 403: it is treated as unknown, with a 404 in the path or a 400 `Bad Request` in the body or the query. See https://www.charitips.com/docs/api-reference/errors.md.
- 404 `Not Found`: No resource with this id on your account and environment. An id that belongs to another account answers 404 too when it is in the path. Ids from the sandbox do not exist in production. See https://www.charitips.com/docs/get-started/sandbox.md.
- 409 `Unique constraint failed on uniqueExternalId`: Another recurring donation of your account already uses this uniqueExternalId. Pick another id, or leave the field out of the update. See https://www.charitips.com/docs/api-reference/list-recurring-donations.md.

## Example

```bash
curl -X PATCH https://api.sandbox.charitips.com/v1/recurring-donations/<recurringDonationId> \
  -H "Authorization: Bearer $CHARITIPS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 2000,
    "donorFirstName": "<donorFirstName>"
  }'
```

```javascript
const response = await fetch('https://api.sandbox.charitips.com/v1/recurring-donations/<recurringDonationId>', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.CHARITIPS_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "amount": 2000,
    "donorFirstName": "<donorFirstName>"
  }),
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
const data = await response.json();
```

```python
import os, requests

response = requests.patch(
    "https://api.sandbox.charitips.com/v1/recurring-donations/<recurringDonationId>",
    headers={"Authorization": f"Bearer {os.environ['CHARITIPS_TOKEN']}"},
    json={
      "amount": 2000,
      "donorFirstName": "<donorFirstName>"
    },
)
response.raise_for_status()
data = response.json()
```

## Response example (200, placeholder values)

```json
{
  "recurringDonationId": "<recurringDonationId>",
  "type": "FREQUENCY",
  "amountType": "FIXED_AMOUNT",
  "status": "PENDING",
  "hasBeenCharged": false,
  "feeType": "EXCLUDED",
  "amount": 2000,
  "rate": 1
}
```
