Payment Source
A Payment Source is a card, bank debit or wallet a Customer saves with a Startup, held at Stripe and charged for Orders and Invoices.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
kind | string | required | How it pays: a card, a bank debit from the Customer’s account, or a wallet on the Customer’s phone or browser. |
label | string | required | What the Customer sees, such as the card brand and last four digits; never the full number. |
expiresOn | date | When a card expires; the billing portal asks for a new one 30 days before. | |
default | boolean | True for the one Payment Source that new Invoices and renewals charge. | |
removedAt | datetime | When the Customer removed it; nothing charges it after, and the record stays. |
Object
{
"$id": "https: //api.sb/ kilnbakery.com/ payment-sources/ payment_source_1",
"$type": "PaymentSource",
"kind": "card",
"label": "Visa 4242",
"expiresOn": "2026-10-22",
"default": true,
"removedAt": "2026-10-22T12: 00: 00Z"
}Relationships
- A Payment Source is saved by one Customer: a Customer saves the Payment Sources its Orders, Subscriptions and Invoices charge; each belongs to one Startup and never moves to a sibling.
savedBy, inversesaves.
Verbs
getReturns one Payment Source by id.GET /{namespace}/payment-sources/{id}listReturns Payment Sources, newest first, one page at a time.GET /{namespace}/payment-sourcesupdateChanges the given properties of a Payment Source.PATCH /{namespace}/payment-sources/{id}addAdd saves a new Payment Source for a Customer through Stripe’s embedded form on the Startup’s Domain, and can make it the default.POST /{namespace}/payment-sources/addremoveRemove detaches a saved Payment Source so nothing charges it again, and keeps the record.POST /{namespace}/payment-sources/{paymentSource}/remove
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
PaymentSource.get | Yes | Yes | Yes | Yes |
PaymentSource.list | Yes | Yes | Yes | Yes |
PaymentSource.update | Yes | Yes | Yes | No |
PaymentSource.add | Yes | Yes | Yes | No |
PaymentSource.remove | Yes | Yes | Yes | No |
Call it
Add the latest payment source with a customer.Example
A clinic on shiftnote.app saves a card ending 4242 as its default Payment Source and a bank debit as a backup. When the card expires, its renewal fails, and adding a new card in the Portal pays the open Invoice at once.