Stored PaymentMethod information (card or bank_account) used by donors to make online Donations.
PaymentMethod data is for informational purposes only and cannot be used to create charges through the API.
| Property | Value |
|---|---|
| Product | Giving (pco.giving, API version 2019-10-18) |
| Resource type | PaymentMethod |
| TypeScript | Giving.PaymentMethod, attributes Giving.PaymentMethodAttributes, schema Giving.PaymentMethodSchema |
| Planning Center path | /giving/v2/people/{person_id}/payment_methods |
| Planning Center docs | PaymentMethod |
How to reach it
| Client path | Returns | Filters | Create |
|---|---|---|---|
pco.giving.people.id(personId).payment_methods |
Collection | No | |
pco.giving.recurring_donations.id(recurringDonationId).payment_method |
Collection | No |
From a collection, .id(paymentMethodId) addresses one PaymentMethod: pco.giving.people.id(personId).payment_methods.id(paymentMethodId). Collections support where, include, order, and pagination; single resources have get().
Attributes
On Giving.PaymentMethodAttributes. Every resource also has id and type ('PaymentMethod') next to its attributes.
| Name | Type | Description |
|---|---|---|
brand |
string | null |
For cards, this is the card brand (eg Visa, Mastercard, etc). For bank accounts, this is the bank name. |
created_at |
string | null |
The date and time at which a payment method was created. Example: 2000-01-01T12:00:00Z |
expiration |
string | null |
For cards only. String representation of the expiration date in the MM/YYYY form (without leading zeros). Will be null for bank accounts. |
last4 |
string | null |
The last 4 digits of the payment method’s number. For cards, this is the last 4 digits of the card number. For bank accounts, this is the last 4 digits of the bank account number. Note: In cases where we don’t have all 4 digits on file, a * will be used to pad the number. For example: *321 |
method_subtype |
string | null |
For cards, either credit, debit, prepaid, or unknown. For bank accounts, either checking or savings. |
method_type |
string | null |
See details. |
updated_at |
string | null |
The date and time at which a payment method was last updated. Example: 2000-01-01T12:00:00Z |
verified |
boolean | null |
For bank accounts only. Will be null for cards. |
Attribute details
method_type
Determines whether or not the payment method is a card or bank account.
Possible values: card, us_bank_account, or au_becs_debit
Querying
No documented where fields.
No documented order fields.
Edges
Follow these from one PaymentMethod, ref = pco.giving.people.id(personId).payment_methods.id(paymentMethodId):
| Edge | Leads to | Returns | Filters | Create |
|---|---|---|---|---|
ref.recurring_donations |
RecurringDonation | Collection | No |
Writing
| Property | Value |
|---|---|
| Create | No |
| Update | No |
| Delete | No |
Example
import type { Giving } from '@mackenly/planningcenterkit';
const personId = '1'; // Person id
const page = await pco.giving.people.id(personId).payment_methods.perPage(25).list();
const items: Giving.PaymentMethod[] = page.data;