---
title: "PaymentSource (Giving)"
description: "A donation's PaymentSource refers to the platform it originated from."
---

> Documentation Index
> Fetch the complete documentation index at: https://planningcenterkit.mackenly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PaymentSource (Giving)

A donation's `PaymentSource` refers to the platform it originated from.

`Donation`s made through Giving will be assigned the built-in `PaymentSource` "Planning Center". `Donation`s made through external platforms (Square, Pushpay, ect.) can be assigned a `PaymentSource` identifying them as such.

| Property | Value |
| --- | --- |
| Product | [Giving](/reference/giving/) (`pco.giving`, API version `2019-10-18`) |
| Resource type | `PaymentSource` |
| TypeScript | `Giving.PaymentSource`, attributes `Giving.PaymentSourceAttributes`, schema `Giving.PaymentSourceSchema` |
| Planning Center path | `/giving/v2/payment_sources` |
| Planning Center docs | [PaymentSource](https://api.planningcenteronline.com/docs/apps/giving/versions/2019-10-18/vertices/payment_source) |

## How to reach it

| Client path | Returns | Filters | Create |
| --- | --- | --- | --- |
| `pco.giving.payment_sources` | Collection |  | Yes |

From a collection, `.id(paymentSourceId)` addresses one PaymentSource: `pco.giving.payment_sources.id(paymentSourceId)`. Collections support [`where`, `include`, `order`, and pagination](/guides/querying/); single resources have `get()`.

## Attributes

On `Giving.PaymentSourceAttributes`. Every resource also has `id` and `type` (`'PaymentSource'`) next to its attributes.

| Name | Type | Description |
| --- | --- | --- |
| `created_at` | `string \| null` | The date and time at which a payment source was created. Example: `2000-01-01T12:00:00Z` |
| `name` | `string \| null` | Required. The name of a payment source. Must be unique within the associated organization. |
| `status` | `string \| null` | See [details](#status). |
| `updated_at` | `string \| null` | The date and time at which a payment source was last updated. Example: `2000-01-01T12:00:00Z` |

### Attribute details

#### `status` {#status}

The status of the payment source. Can be either `active` or `archived`. `active` payment sources can be assigned to donations, while `archived` payment sources cannot. Payment sources are `active` by default upon creation. Archiving a payment source will keep all historical records intact and can be undone.

Possible values: `active` or `archived`

## Querying

No documented `where` fields.

No documented `order` fields.

## Edges

Follow these from one PaymentSource, `ref = pco.giving.payment_sources.id(paymentSourceId)`:

| Edge | Leads to | Returns | Filters | Create |
| --- | --- | --- | --- | --- |
| `ref.donations` | [Donation](/reference/giving/donation/) | Collection |  | No |

## Writing

| Property | Value |
| --- | --- |
| Create | Yes, `create()` on `pco.giving.payment_sources` |
| Update | Yes, `update()` on a reference |
| Delete | Yes, `delete()` on a reference |

### Create attributes

Typed as `Giving.PaymentSourceSchema['create']`.

| Attribute | Type |
| --- | --- |
| `name` | `string \| null` |
| `payment_source_type` | `unknown` |
| `status` | `string \| null` |

### Update attributes

Typed as `Giving.PaymentSourceSchema['update']`.

| Attribute | Type |
| --- | --- |
| `name` | `string \| null` |
| `payment_source_type` | `unknown` |
| `status` | `string \| null` |

See [Writing data](/guides/writing-data/).

## Example

```ts
import type { Giving } from '@mackenly/planningcenterkit';

const page = await pco.giving.payment_sources.perPage(25).list();
const items: Giving.PaymentSource[] = page.data;
```

Source: https://planningcenterkit.mackenly.com/reference/giving/payment-source/index.mdx
