> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # BulkCreateDonationCampaigns # Package: donations # Namespace: DonationCampaignService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/donations/donation-campaigns/bulk-create-donation-campaigns.md ## Permission Scopes: Manage Donation Campaigns: SCOPE.DONATIONS.MANAGE-CAMPAIGNS ## Introduction Creates multiple donation campaigns in a single request. The campaigns are created in an active state and can immediately accept donations. > **Note:** Other than the fields marked as required, **one or both** of the following fields must be passed on create: > + `customAmountEnabled` > + `predefinedDonationAmounts` To create a single donation campaign, use [Create Donation Campaign](https://dev.wix.com/docs/rest/business-solutions/donations/donation-campaigns/create-donation-campaign.md). --- ## REST API ### Schema ``` Method: bulkCreateDonationCampaigns Description: Creates multiple donation campaigns in a single request. The campaigns are created in an active state and can immediately accept donations. > **Note:** Other than the fields marked as required, **one or both** of the following fields must be passed on create: > + `customAmountEnabled` > + `predefinedDonationAmounts` To create a single donation campaign, use [Create Donation Campaign](https://dev.wix.com/docs/rest/business-solutions/donations/donation-campaigns/create-donation-campaign.md). URL: https://www.wixapis.com/donation-campaigns/v2/bulk/donation-campaigns/create Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: donationCampaigns, donationCampaigns.name, donationCampaigns.donationFrequencies, donationCampaigns.campaignGoal.targetAmount Method parameters: param name: donationCampaigns | type: array | description: Donation campaigns to create. | required: true - name: name | type: string | description: Name of the donation campaign. | required: true - name: archived | type: boolean | description: Whether the donation campaign is archived and hidden from site visitors. Archived campaigns can't accept donations. Default: `false` - name: coverImage | type: Image | description: Cover image for the donation campaign. - name: id | type: string | description: WixMedia image GUID. - name: url | type: string | description: Image URL. - name: altText | type: string | description: Image alt text. - name: customAmountEnabled | type: boolean | description: Whether donors can specify their own donation amount. If custom amounts are disabled, at least one predefined amount must be provided. Default: `false` - name: customAmountOptions | type: CustomAmountOptions | description: Optional settings for custom donation amounts. - name: minimum | type: MultiCurrencyPrice | description: Minimum donation amount. - name: amount | type: string | description: Amount. - name: maximum | type: MultiCurrencyPrice | description: Maximum donation amount. - name: predefinedDonationAmounts | type: array | description: Predefined donation amounts. Each amount can include an optional description explaining its impact. For example, "Feed 5 families for a week". - name: id | type: string | description: Predefined amount GUID. You must provide this GUID when creating or updating campaigns. - name: price | type: MultiCurrencyPrice | description: Donation amount. Currently supports the site's default currency only. - name: description | type: string | description: Description explaining the impact of this donation amount. For example, "Feed 5 families for a week" or "Plant 10 trees". - name: campaignGoal | type: CampaignGoal | description: Campaign fundraising goal. - name: targetAmount | type: MultiCurrencyPrice | description: Target fundraising amount. Currently supports the site's default currency only. | required: true - name: endDate | type: string | description: Campaign end date in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. The behavior after this date is controlled by `acceptDonationsAfterEndDate`. - name: acceptDonationsAfterEndDate | type: boolean | description: Whether donations are accepted after `endDate`. This field is ignored if `endDate` is not set. Default: `false` - name: acceptDonationsAfterGoal | type: boolean | description: Whether donations are accepted after reaching `targetAmount`. Default: `true` - name: commentsEnabled | type: boolean | description: Whether donors can add comments to their donations. Default: `false` - name: donationFrequencies | type: array | description: Donation frequencies available for this campaign. At least one frequency must be specified. | required: true - enum: - ONE_TIME: One-time donation. - WEEK: Weekly recurring donation. - MONTH: Monthly recurring donation. - YEAR: Yearly recurring donation. - name: askDonorCoverFee | type: boolean | description: Whether to ask donors during checkout if they want to add 2.9% to their donation to cover fees. When `false`, fees are deducted from the donation amount, meaning the campaign receives less than the donor's original contribution. When `true`, donors are presented with an option in the checkout UI to add a 2.9% fee on top of their donation. This fee helps offset processing costs, ensuring more of the original donation reaches the campaign. The donor always has the choice — they are never automatically charged the fee. For recurring donations, if the donor opts to cover fees, the 2.9% fee is applied to each recurring payment (not just the first one). > **Notes:** > + The 2.9% rate is fixed and cannot be customized by campaign owners. > + This feature works with all payment methods and currencies. Default: `false` - name: extendedFields | type: ExtendedFields | description: Custom field data for the program definition object. [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: tags | type: Tags | description: Tags assigned to this donation campaign. - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors. - name: tagIds | type: array | description: List of tag GUIDs. - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors. param name: returnEntity | type: returnEntity | description: Whether to return the created donation campaigns in the response. Default: `false` Return type: BulkCreateDonationCampaignsResponse - name: results | type: array | description: Results of the bulk create operation including campaigns and metadata. - name: itemMetadata | type: ItemMetadata | description: Metadata about a single create operation. - name: id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed. - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action for this item was successful. When `false`, the `error` field is returned. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: item | type: DonationCampaign | description: Created campaign. Only present if `returnEntity` was `true`. - name: id | type: string | description: Donation campaign GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the donation campaign is updated. To prevent conflicting changes, the current `revision` must be specified when updating the donation campaign. Ignored when creating a donation campaign. - name: createdDate | type: string | description: Date and time the donation campaign was created. - name: updatedDate | type: string | description: Date and time the donation campaign was last updated. - name: name | type: string | description: Name of the donation campaign. - name: archived | type: boolean | description: Whether the donation campaign is archived and hidden from site visitors. Archived campaigns can't accept donations. Default: `false` - name: status | type: Status | description: Current status of the donation campaign. The status is automatically calculated based on campaign settings and current progress: - `COLLECTING`: Campaign is active and accepting donations - `EXPIRED`: Campaign has passed its end date and `acceptDonationsAfterEndDate` is `false` - `GOAL_REACHED`: Campaign has reached its target amount and `acceptDonationsAfterGoal` is `false` - enum: - COLLECTING: Campaign is actively accepting donations. - EXPIRED: Campaign has passed its `endDate` and `acceptDonationsAfterEndDate` is `false`. - GOAL_REACHED: Campaign has reached its `targetAmount` and `acceptDonationsAfterGoal` is `false`. - name: coverImage | type: Image | description: Cover image for the donation campaign. - name: id | type: string | description: WixMedia image GUID. - name: url | type: string | description: Image URL. - name: height | type: integer | description: Original image height. - name: width | type: integer | description: Original image width. - name: altText | type: string | description: Image alt text. - name: filename | type: string | description: Image filename. - name: customAmountEnabled | type: boolean | description: Whether donors can specify their own donation amount. If custom amounts are disabled, at least one predefined amount must be provided. Default: `false` - name: customAmountOptions | type: CustomAmountOptions | description: Optional settings for custom donation amounts. - name: minimum | type: MultiCurrencyPrice | description: Minimum donation amount. - name: amount | type: string | description: Amount. - name: convertedAmount | type: string | description: Converted amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: formattedConvertedAmount | type: string | description: Converted amount formatted with currency symbol. - name: maximum | type: MultiCurrencyPrice | description: Maximum donation amount. - name: predefinedDonationAmounts | type: array | description: Predefined donation amounts. Each amount can include an optional description explaining its impact. For example, "Feed 5 families for a week". - name: id | type: string | description: Predefined amount GUID. You must provide this GUID when creating or updating campaigns. - name: price | type: MultiCurrencyPrice | description: Donation amount. Currently supports the site's default currency only. - name: description | type: string | description: Description explaining the impact of this donation amount. For example, "Feed 5 families for a week" or "Plant 10 trees". - name: campaignGoal | type: CampaignGoal | description: Campaign fundraising goal. - name: targetAmount | type: MultiCurrencyPrice | description: Target fundraising amount. Currently supports the site's default currency only. - name: endDate | type: string | description: Campaign end date in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. The behavior after this date is controlled by `acceptDonationsAfterEndDate`. - name: acceptDonationsAfterEndDate | type: boolean | description: Whether donations are accepted after `endDate`. This field is ignored if `endDate` is not set. Default: `false` - name: acceptDonationsAfterGoal | type: boolean | description: Whether donations are accepted after reaching `targetAmount`. Default: `true` - name: commentsEnabled | type: boolean | description: Whether donors can add comments to their donations. Default: `false` - name: donationFrequencies | type: array | description: Donation frequencies available for this campaign. At least one frequency must be specified. - enum: - ONE_TIME: One-time donation. - WEEK: Weekly recurring donation. - MONTH: Monthly recurring donation. - YEAR: Yearly recurring donation. - name: askDonorCoverFee | type: boolean | description: Whether to ask donors during checkout if they want to add 2.9% to their donation to cover fees. When `false`, fees are deducted from the donation amount, meaning the campaign receives less than the donor's original contribution. When `true`, donors are presented with an option in the checkout UI to add a 2.9% fee on top of their donation. This fee helps offset processing costs, ensuring more of the original donation reaches the campaign. The donor always has the choice — they are never automatically charged the fee. For recurring donations, if the donor opts to cover fees, the 2.9% fee is applied to each recurring payment (not just the first one). > **Notes:** > + The 2.9% rate is fixed and cannot be customized by campaign owners. > + This feature works with all payment methods and currencies. Default: `false` - name: extendedFields | type: ExtendedFields | description: Custom field data for the program definition object. [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: tags | type: Tags | description: Tags assigned to this donation campaign. - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors. - name: tagIds | type: array | description: List of tag GUIDs. - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors. - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk operation. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: EMPTY_CAMPAIGN_NAME | Description: Campaign `name` can't be empty. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NON_POSITIVE_PREDEFINED_AMOUNT | Description: All amounts in `predefinedDonationAmounts` must be greater than 0. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: DUPLICATE_PREDEFINED_AMOUNTS | Description: The `predefinedDonationAmounts` array contains duplicate amounts. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_CUSTOM_AMOUNT_RANGE | Description: The `customAmountOptions.maximum` must be greater than `customAmountOptions.minimum`. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NON_POSITIVE_CAMPAIGN_GOAL_AMOUNT | Description: The `campaignGoal.targetAmount` must be greater than 0. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NO_PAYMENT_DEFINITION | Description: Either `customAmountEnabled` must be set to `true` or at least one amount must be provided in `predefinedDonationAmounts`. HTTP Code: 500 | Status Code: INTERNAL | Application Code: SITE_CURRENCY_UNAVAILABLE | Description: Site currency settings are temporarily unavailable. Try again later. ``` ### Examples ### // @Bulk Create Donation Campaigns @description: Creates 2 donation campaigns in one request import { donationCampaigns } from "@wix/donations"; ```curl const donationCampaignsList = [ { name: "Wildlife Protection Fund", campaignGoal: { targetAmount: { amount: "25000.00" } }, predefinedDonationAmounts: [ { _id: "549d4e0e-5311-4008-8e4c-8354e6f052b0", price: { amount: "50.00" }, description: "Protect one animal for a month", }, ], donationFrequencies: ["ONE_TIME", "MONTH"], }, { name: "Clean Water Initiative", campaignGoal: { targetAmount: { amount: "75000.00" } }, customAmountEnabled: true, donationFrequencies: ["ONE_TIME"], askDonorCoverFee: true, }, ]; ``` ### Bulk Create Donation Campaigns Creates 2 donation campaigns in one request ```curl curl -X POST \ 'https://www.wixapis.com/donation-campaigns/v2/bulk/donation-campaigns/create' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d '{ "donationCampaigns": [ { "name": "Wildlife Protection Fund", "campaignGoal": { "targetAmount": {"amount": "25000.00"} }, "predefinedDonationAmounts": [ { "id": "549d4e0e-5311-4008-8e4c-8354e6f052b0", "price": {"amount": "50.00"}, "description": "Protect one animal for a month" } ], "donationFrequencies": ["ONE_TIME", "MONTH"] }, { "name": "Clean Water Initiative", "campaignGoal": { "targetAmount": {"amount": "75000.00"} }, "customAmountEnabled": true, "donationFrequencies": ["ONE_TIME"], "askDonorCoverFee": true } ], "returnEntity": true }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.donations.DonationCampaignService.bulkCreateDonationCampaigns(donationCampaigns, options) Description: Creates multiple donation campaigns in a single request. The campaigns are created in an active state and can immediately accept donations. > **Note:** Other than the fields marked as required, **one or both** of the following fields must be passed on create: > + `customAmountEnabled` > + `predefinedDonationAmounts` To create a single donation campaign, use [Create Donation Campaign](https://dev.wix.com/docs/rest/business-solutions/donations/donation-campaigns/create-donation-campaign.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: donationCampaigns, donationCampaigns.name, donationCampaigns.donationFrequencies, donationCampaigns.campaignGoal.targetAmount Method parameters: param name: donationCampaigns | type: array | description: Donation campaigns to create. | required: true - name: name | type: string | description: Name of the donation campaign. | required: true - name: archived | type: boolean | description: Whether the donation campaign is archived and hidden from site visitors. Archived campaigns can't accept donations. Default: `false` - name: coverImage | type: string | description: Cover image for the donation campaign. - name: customAmountEnabled | type: boolean | description: Whether donors can specify their own donation amount. If custom amounts are disabled, at least one predefined amount must be provided. Default: `false` - name: customAmountOptions | type: CustomAmountOptions | description: Optional settings for custom donation amounts. - name: minimum | type: MultiCurrencyPrice | description: Minimum donation amount. - name: amount | type: string | description: Amount. - name: maximum | type: MultiCurrencyPrice | description: Maximum donation amount. - name: predefinedDonationAmounts | type: array | description: Predefined donation amounts. Each amount can include an optional description explaining its impact. For example, "Feed 5 families for a week". - name: _id | type: string | description: Predefined amount GUID. You must provide this GUID when creating or updating campaigns. - name: price | type: MultiCurrencyPrice | description: Donation amount. Currently supports the site's default currency only. - name: description | type: string | description: Description explaining the impact of this donation amount. For example, "Feed 5 families for a week" or "Plant 10 trees". - name: campaignGoal | type: CampaignGoal | description: Campaign fundraising goal. - name: targetAmount | type: MultiCurrencyPrice | description: Target fundraising amount. Currently supports the site's default currency only. | required: true - name: endDate | type: Date | description: Campaign end date in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. The behavior after this date is controlled by `acceptDonationsAfterEndDate`. - name: acceptDonationsAfterEndDate | type: boolean | description: Whether donations are accepted after `endDate`. This field is ignored if `endDate` is not set. Default: `false` - name: acceptDonationsAfterGoal | type: boolean | description: Whether donations are accepted after reaching `targetAmount`. Default: `true` - name: commentsEnabled | type: boolean | description: Whether donors can add comments to their donations. Default: `false` - name: donationFrequencies | type: array | description: Donation frequencies available for this campaign. At least one frequency must be specified. | required: true - enum: - ONE_TIME: One-time donation. - WEEK: Weekly recurring donation. - MONTH: Monthly recurring donation. - YEAR: Yearly recurring donation. - name: askDonorCoverFee | type: boolean | description: Whether to ask donors during checkout if they want to add 2.9% to their donation to cover fees. When `false`, fees are deducted from the donation amount, meaning the campaign receives less than the donor's original contribution. When `true`, donors are presented with an option in the checkout UI to add a 2.9% fee on top of their donation. This fee helps offset processing costs, ensuring more of the original donation reaches the campaign. The donor always has the choice — they are never automatically charged the fee. For recurring donations, if the donor opts to cover fees, the 2.9% fee is applied to each recurring payment (not just the first one). > **Notes:** > + The 2.9% rate is fixed and cannot be customized by campaign owners. > + This feature works with all payment methods and currencies. Default: `false` - name: extendedFields | type: ExtendedFields | description: Custom field data for the program definition object. [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: tags | type: Tags | description: Tags assigned to this donation campaign. - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors. - name: tagIds | type: array | description: List of tag GUIDs. - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors. param name: options | type: BulkCreateDonationCampaignsOptions none - name: returnEntity | type: boolean | description: Whether to return the created donation campaigns in the response. Default: `false` Return type: PROMISE - name: results | type: array | description: Results of the bulk create operation including campaigns and metadata. - name: itemMetadata | type: ItemMetadata | description: Metadata about a single create operation. - name: _id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed. - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action for this item was successful. When `false`, the `error` field is returned. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: item | type: DonationCampaign | description: Created campaign. Only present if `returnEntity` was `true`. - name: _id | type: string | description: Donation campaign GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the donation campaign is updated. To prevent conflicting changes, the current `revision` must be specified when updating the donation campaign. Ignored when creating a donation campaign. - name: _createdDate | type: Date | description: Date and time the donation campaign was created. - name: _updatedDate | type: Date | description: Date and time the donation campaign was last updated. - name: name | type: string | description: Name of the donation campaign. - name: archived | type: boolean | description: Whether the donation campaign is archived and hidden from site visitors. Archived campaigns can't accept donations. Default: `false` - name: status | type: Status | description: Current status of the donation campaign. The status is automatically calculated based on campaign settings and current progress: - `COLLECTING`: Campaign is active and accepting donations - `EXPIRED`: Campaign has passed its end date and `acceptDonationsAfterEndDate` is `false` - `GOAL_REACHED`: Campaign has reached its target amount and `acceptDonationsAfterGoal` is `false` - enum: - COLLECTING: Campaign is actively accepting donations. - EXPIRED: Campaign has passed its `endDate` and `acceptDonationsAfterEndDate` is `false`. - GOAL_REACHED: Campaign has reached its `targetAmount` and `acceptDonationsAfterGoal` is `false`. - name: coverImage | type: string | description: Cover image for the donation campaign. - name: customAmountEnabled | type: boolean | description: Whether donors can specify their own donation amount. If custom amounts are disabled, at least one predefined amount must be provided. Default: `false` - name: customAmountOptions | type: CustomAmountOptions | description: Optional settings for custom donation amounts. - name: minimum | type: MultiCurrencyPrice | description: Minimum donation amount. - name: amount | type: string | description: Amount. - name: convertedAmount | type: string | description: Converted amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: formattedConvertedAmount | type: string | description: Converted amount formatted with currency symbol. - name: maximum | type: MultiCurrencyPrice | description: Maximum donation amount. - name: predefinedDonationAmounts | type: array | description: Predefined donation amounts. Each amount can include an optional description explaining its impact. For example, "Feed 5 families for a week". - name: _id | type: string | description: Predefined amount GUID. You must provide this GUID when creating or updating campaigns. - name: price | type: MultiCurrencyPrice | description: Donation amount. Currently supports the site's default currency only. - name: description | type: string | description: Description explaining the impact of this donation amount. For example, "Feed 5 families for a week" or "Plant 10 trees". - name: campaignGoal | type: CampaignGoal | description: Campaign fundraising goal. - name: targetAmount | type: MultiCurrencyPrice | description: Target fundraising amount. Currently supports the site's default currency only. - name: endDate | type: Date | description: Campaign end date in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. The behavior after this date is controlled by `acceptDonationsAfterEndDate`. - name: acceptDonationsAfterEndDate | type: boolean | description: Whether donations are accepted after `endDate`. This field is ignored if `endDate` is not set. Default: `false` - name: acceptDonationsAfterGoal | type: boolean | description: Whether donations are accepted after reaching `targetAmount`. Default: `true` - name: commentsEnabled | type: boolean | description: Whether donors can add comments to their donations. Default: `false` - name: donationFrequencies | type: array | description: Donation frequencies available for this campaign. At least one frequency must be specified. - enum: - ONE_TIME: One-time donation. - WEEK: Weekly recurring donation. - MONTH: Monthly recurring donation. - YEAR: Yearly recurring donation. - name: askDonorCoverFee | type: boolean | description: Whether to ask donors during checkout if they want to add 2.9% to their donation to cover fees. When `false`, fees are deducted from the donation amount, meaning the campaign receives less than the donor's original contribution. When `true`, donors are presented with an option in the checkout UI to add a 2.9% fee on top of their donation. This fee helps offset processing costs, ensuring more of the original donation reaches the campaign. The donor always has the choice — they are never automatically charged the fee. For recurring donations, if the donor opts to cover fees, the 2.9% fee is applied to each recurring payment (not just the first one). > **Notes:** > + The 2.9% rate is fixed and cannot be customized by campaign owners. > + This feature works with all payment methods and currencies. Default: `false` - name: extendedFields | type: ExtendedFields | description: Custom field data for the program definition object. [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: tags | type: Tags | description: Tags assigned to this donation campaign. - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors. - name: tagIds | type: array | description: List of tag GUIDs. - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors. - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk operation. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: EMPTY_CAMPAIGN_NAME | Description: Campaign `name` can't be empty. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NON_POSITIVE_PREDEFINED_AMOUNT | Description: All amounts in `predefinedDonationAmounts` must be greater than 0. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: DUPLICATE_PREDEFINED_AMOUNTS | Description: The `predefinedDonationAmounts` array contains duplicate amounts. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: INVALID_CUSTOM_AMOUNT_RANGE | Description: The `customAmountOptions.maximum` must be greater than `customAmountOptions.minimum`. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NON_POSITIVE_CAMPAIGN_GOAL_AMOUNT | Description: The `campaignGoal.targetAmount` must be greater than 0. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NO_PAYMENT_DEFINITION | Description: Either `customAmountEnabled` must be set to `true` or at least one amount must be provided in `predefinedDonationAmounts`. HTTP Code: 500 | Status Code: INTERNAL | Application Code: SITE_CURRENCY_UNAVAILABLE | Description: Site currency settings are temporarily unavailable. Try again later. ``` ### Examples ### bulkCreateDonationCampaigns ```javascript import { donationCampaigns } from '@wix/donations'; async function bulkCreateDonationCampaigns(donationCampaigns,options) { const response = await donationCampaigns.bulkCreateDonationCampaigns(donationCampaigns,options); }; ``` ### bulkCreateDonationCampaigns (with elevated permissions) ```javascript import { donationCampaigns } from '@wix/donations'; import { auth } from '@wix/essentials'; async function myBulkCreateDonationCampaignsMethod(donationCampaigns,options) { const elevatedBulkCreateDonationCampaigns = auth.elevate(donationCampaigns.bulkCreateDonationCampaigns); const response = await elevatedBulkCreateDonationCampaigns(donationCampaigns,options); } ``` ### bulkCreateDonationCampaigns (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { donationCampaigns } from '@wix/donations'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { donationCampaigns }, // Include the auth strategy and host as relevant }); async function bulkCreateDonationCampaigns(donationCampaigns,options) { const response = await myWixClient.donationCampaigns.bulkCreateDonationCampaigns(donationCampaigns,options); }; ``` ---