When integrating donation campaigns into an eCommerce cart, checkout, or order, you must use the catalogReference object structure. This guide explains how to properly format and use the catalogReference object for donation campaigns in various eCommerce API methods.
Pass the catalogReference object as part of the lineItems array in the following eCommerce API methods:
The catalogReference object for donation campaigns includes the following fields:
| Field | Type | Description | 
|---|---|---|
| catalogItemId | String | Required. The donationCampaignIdof the donation campaign. | 
| appId | String | Required. The Wix Donation Campaigns app ID - always "333b456e-dd48-4d6b-b32b-9fd48d74e163" | 
| options | Object | Required. An object containing additional donation-specific settings (see below). | 
The options object contains the following fields:
| Field | Type | Description | 
|---|---|---|
| amount | Number | Required. The donation amount. Must be greater than 0. | 
| frequency | String | Subscription frequency for recurring donations. See values below. | 
When specifying a recurring donation, use one of these frequency values:
| Value | Description | 
|---|---|
| WEEK | Creates a weekly recurring donation. | 
| MONTH | Creates a monthly recurring donation. | 
| YEAR | Creates a yearly recurring donation. | 
frequency field is optional. If omitted, the donation will be processed as a one-time payment.appId value for the Wix Donation Campaigns app.