Payment Sources
What is a Payment Source?
A payment source represents a supporter’s saved payment instrument and is used to create payments, e.g., Credit Cards and SEPA Direct Debit.
Sources can be directly charged without the need to supply payment method information again, or can be charged later automatically if a supporter has a subscription plan.
Payment Sources information
A payment source always refers to a Provider Method Profile and contains the information needed to create payments through the related payment method (e.g. credit card token and expiry date, bank account IBAN, SEPA DirectDebit mandate…).
It can optionally record the supporter’s data at the moment of creation (see Supporter Snapshots) and/or be linked to a mutable Supporter object. It can also hold mutable Custom Parameters to allow for advanced integrations and statistics.
Creating Payment Sources
Depending on the payment provider and method, a Payment Source can be created via the Payment Source API endpoint and/or together with a payment.
In the latter case, the payment will expose the created_payment_source_uuid
property and if the supporter declares this payment as a recurring one, the source will be automatically charged.
Payments created from a payment source will expose charged_payment_source_uuid
instead since the source already exists.
Single-Use or Reusable
Some payment methods can be reused (e.g. cards or bank debits) for additional payments without authorising and collecting payment details again.
Single-use payment methods (e.g. iDEAL) cannot be saved for supporters, because they are consumed after a payment attempt.
Reusable payment sources are useful for two use cases:
- To initiate an immediate one-off payment manually via the Payment Sources Charge API.
- For being automatically charged when making recurring payments.
Payment sources and subscriptions
A supporter can have a subscription plan to facilitate their recurring payments.
If a supporter creates a new payment and wants to set it up as a recurring one, we create a new subscription and save their payment source details alongside their personal info, .e.g., name, address, and so on.
The newly created subscription would then refer to the payment source being used to initiate the recurring payment. Hence, each time a supporter's subscription is due, the subscription's linked payment source gets charged.