Custom Parameters
What are Custom Parameters?
Custom Parameters are key/string-value pairs that can be attached to RaiseNow objects such as Supporters, Subscriptions, Payments and Payment Sources. Custom Parameters are stored with the object and can be retrieved and updated via the respective APIs. They can be used to implement custom business workflows. For example adding an identifier from an internal CRM to Supporters. Keys and values of Custom Parameters must be strings.
Precedence and Propagation of Custom Parameters
In some scenarios Custom Parameters of one object will be propagated to the newly created objects.
Creating a Payment Source and Subscription via a Payment
The Initialise Payment endpoint can be used to not only create a Payment but also to set up a Payment Source, a Subscription and a Supporter at the same time. This is useful for setting up recurring payments or storing payment details for off-session use in a Payment Source. The Supporter and Subscription will have their own Custom Parameters which can be specified in the request, whereas the Payment Source inherits the Custom Parameters of the Payment itself.
Creating and charging a standalone Payment Source
The Create Payment Source endpoint allows setting Custom Parameters. If a Payment Source later is charged using the Charge Payment Source endpoint the resulting Payment will have the Custom Parameters from the stored Payment Source merged with the Custom Parameters from the Charge Payment Source request. For any conflicting keys the values from the request will be used.
Creating an Invoice through Subscription charging API
An automatically created Invoice for a Subscription will inherit the Custom Parameters from the Subscription. If a new Invoice is created through the Create Invoice endpoint the new Invoice will have the Customer Parameters from the Subscription merged with the Custom Parameters from the Create Invoice request. For any conflicting keys the values from the request will be used.
Charging an Invoice
Charging an Invoice either manually via the Create Charge Attempt endpoint or automatically (according to the Subscription schedule) will create a new Payment that inherits the merged Custom Parameters from the Invoice and the Payment Source. If there are conflicting keys the values from the Invoice will be used.