⚠️Important:
Adding a Transaction via the API does not collect a payment from your payment gateway (e.g., Stripe, GoCardless). You must process the payment separately using the gateway’s required method.
Add Transactions
A Transaction in Donorfy contains:
One payment
One or more allocations
When adding a new Transaction via the API:
A payment and its first allocation are created together.
To add additional allocations, use the AddAllocation method.
Example for Multiple Allocations
If a payment of £20 requires allocations of £15 and £5:
Add a Transaction for £15 using the relevant Product.
Add the £5 allocation using AddAllocation for the same Transaction.
📌 Note:
For Recurring Payment Instructions (RPIs), use the RPI PaymentCollected endpoint:
https://data.donorfy.com/api/v1/<your api key>/rpis/<id>/PaymentCollected
Mandatory and Optional Look-Up Properties
When adding or updating a Transaction, certain fields must reference valid values from your Donorfy settings.
Required Properties
Property | Must Match |
Product | A valid Product |
Campaign | A valid Campaign |
PaymentMethod | A valid Payment Method |
Fund | A valid Fund |
Optional Properties
Property | Requirement |
Channel | Must exist in Channels |
Currency | Must exist in Currencies |
Department | Must exist in Departments |
BankAccount | Must exist in Bank Accounts |
Acknowledgement | Must exist in Acknowledgements |
GiftAidDeclarationMethod | Required if AddGiftAidDeclaration = true |
Constituent Information
When adding a Transaction, you can:
Add a new constituent
Assign the Transaction to an existing constituent
Make the Transaction anonymous by using:
00000000-0000-0000-0000-000000000000as ExistingConstituentId
For more detail, see: Linking New Entities to a New or Existing Constituent in the related article.
Gift Aid Options
When adding a Transaction, the API supports the following properties:
Property | Description |
CanRecoverTax | If true, the Transaction is eligible for Gift Aid (subject to rules). |
GiftAidClaimed | Indicates Gift Aid has already been claimed; Donorfy will not reclaim it. |
AddGiftAidDeclaration | Creates a new declaration for a new or existing constituent if one does not already exist. |
GiftAidDeclarationMethod | Optional. Defaults to Web if not supplied. |
Update Transactions
To update a Transaction:
Pass in the Id of the payment element.
Only single-allocation Transactions can be updated.
If a Transaction has multiple allocations, use allocation-specific endpoints to make adjustments.
Connected Constituents and Beneficiaries
You can specify the ID of a connected constituent or beneficiary when adding or updating a Transaction.
To clear a connected constituent or beneficiary, pass:
00000000-0000-0000-0000-000000000000
Delete Transactions
To delete a Transaction:
Pass the Id of the payment element.
The payment and all associated allocations are deleted.
⚠️Important: The Donorfy API is a Professional only feature. Essential subscribers, please contact us to find out more about upgrading.
