A RecurringDonation is represents a Donation that repeats on a set schedule (weekly, monthly, etc.)
Data for RecurringDonations is read-only; they can not be created or edited through the API.
| Property | Value |
|---|---|
| Product | Giving (pco.giving, API version 2019-10-18) |
| Resource type | RecurringDonation |
| TypeScript | Giving.RecurringDonation, attributes Giving.RecurringDonationAttributes, schema Giving.RecurringDonationSchema |
| Planning Center path | /giving/v2/recurring_donations |
| Planning Center docs | RecurringDonation |
How to reach it
| Client path | Returns | Filters | Create |
|---|---|---|---|
pco.giving.recurring_donations |
Collection | No | |
pco.giving.people.id(personId).payment_methods.id(paymentMethodId).recurring_donations |
Collection | No | |
pco.giving.people.id(personId).recurring_donations |
Collection | No |
From a collection, .id(recurringDonationId) addresses one RecurringDonation: pco.giving.recurring_donations.id(recurringDonationId). Collections support where, include, order, and pagination; single resources have get().
Attributes
On Giving.RecurringDonationAttributes. Every resource also has id and type ('RecurringDonation') next to its attributes.
| Name | Type | Description |
|---|---|---|
amount_cents |
number | null |
The number of cents scheduled to be donated. |
amount_currency |
string | null |
The currency of amount_cents. |
created_at |
string | null |
The date and time at which a recurring donation was created. Example: 2000-01-01T12:00:00Z |
last_donation_received_at |
string | null |
The date and time that the last donation was made for a recurring donation. Example: 2000-01-01T12:00:00Z |
next_occurrence |
string | null |
The date that the next donation will be made for a recurring donation. Example: 2000-01-01T12:00:00Z |
release_hold_at |
string | null |
The date when the hold on a recurring donation with a status of temporary_hold will be released. |
schedule |
Record<string, unknown> | null |
JSON representation of the billing schedule. See the repeatable Ruby gem for more details on the structure and meaning: https://github.com/molawson/repeatable#time-expressions |
status |
string | null |
See details. |
updated_at |
string | null |
The date and time at which a recurring donation was last updated. Example: 2000-01-01T12:00:00Z |
Attribute details
status
Determines if a recurring donation is active or on hold, and if on hold, the kind of hold that has been placed on it.
Possible values: active, indefinite_hold or temporary_hold.
Relationships and includes
Side-load with include() (or get({ include })) and read with related(resource, name): designations, payment_method.
| Relationship | Type | To | Includable |
|---|---|---|---|
person |
To one | Person | No |
Querying
Where
where(field, value) for equality; where(field, op, value) with the operators listed.
| Field | Value type | Operators |
|---|---|---|
fund_id |
string |
Equality only |
status |
string |
Equality only |
No documented order fields.
Edges
Follow these from one RecurringDonation, ref = pco.giving.recurring_donations.id(recurringDonationId):
| Edge | Leads to | Returns | Filters | Create |
|---|---|---|---|---|
ref.designations |
RecurringDonationDesignation | Collection | No | |
ref.payment_method |
PaymentMethod | Collection | No |
Writing
| Property | Value |
|---|---|
| Create | No |
| Update | No |
| Delete | No |
Example
import type { Giving } from '@mackenly/planningcenterkit';
const page = await pco.giving.recurring_donations.perPage(25).list();
const items: Giving.RecurringDonation[] = page.data;