> 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 # Package: donations # Namespace: donationCampaigns # Webhook link: https://dev.wix.com/docs/api-reference/business-solutions/donations/donation-campaigns/donation-campaign-updated.md ## Introduction Triggered when a donation campaign is updated. --- ## REST API ### Schema ``` Webhook: Donation Campaign Updated Description: Triggered when a donation campaign is updated. Event body: - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events. - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event. - name: slug | type: string | description: Event name. - name: entityId | type: string | description: ID of the entity associated with the event. - name: eventTime | type: string (date-time) | description: Event timestamp. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR. - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: updatedEvent | type: object | description: Updated event details. - name: currentEntity | type: DonationCampaign | description: The entity after the update. - 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: modifiedFields | type: Map | description: Fields that were updated and their values before the update. ``` ### Examples ```curl { "id": "8421619a-599b-48d1-926a-2d5c1654c994", "entityFqdn": "wix.donations.v2.donation_campaign", "slug": "updated", "entityId": "87f8066e-f0e9-41da-b4ca-4bceb2ecdf31", "updatedEvent": { "currentEntity": { "id": "87f8066e-f0e9-41da-b4ca-4bceb2ecdf31", "revision": "3", "createdDate": "2025-07-21T10:44:05.043Z", "updatedDate": "2025-07-21T12:02:00.859Z", "name": "Wildlife Protection Fund", "archived": true, "predefinedDonationAmounts": [ { "id": "549d4e0e-5311-4008-8e4c-8354e6f052b0", "price": { "amount": "50", "convertedAmount": "50", "formattedAmount": "€50.00", "formattedConvertedAmount": "€50.00" }, "description": "Protect one animal for a month" } ], "campaignGoal": { "targetAmount": { "amount": "25000", "convertedAmount": "25000", "formattedAmount": "€25,000.00", "formattedConvertedAmount": "€25,000.00" } }, "donationFrequencies": [ "ONE_TIME", "MONTH" ], "tags": { "publicTags": { "tagIds": [ "yg555", "p5627" ] } }, "askDonorCoverFee": true }, "modifiedFields": { "revision": "2", "updatedDate": "2025-07-21T10:53:06.206Z", "tags": null, "askDonorCoverFee": false } }, "eventTime": "2025-07-21T12:02:00.939662971Z", "triggeredByAnonymizeRequest": false, "entityEventSequence": "3" } ``` --- ## JavaScript SDK ### Schema ``` Webhook: onDonationCampaignUpdated Description: Triggered when a donation campaign is updated. Payload: DonationCampaignUpdatedEnvelope - name: entity | type: DonationCampaign | description: none - 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: modifiedFields | type: Map | description: Fields that were updated and their values before the update. - ONE-OF: - name: nullValue | type: | description: - name: numberValue | type: number | description: - name: stringValue | type: string | description: - name: boolValue | type: boolean | description: - name: structValue | type: object | description: - name: listValue | type: ListValue | description: - name: values | type: array | description: - name: metadata | type: EventMetadata | description: none - name: instanceId | type: string | description: App instance GUID. - name: eventType | type: string | description: Event type. - name: identity | type: IdentificationData | description: The identification type and identity data. - ONE-OF: - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site. - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site. - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.). - name: appId | type: string | description: GUID of an app. - name: identityType | type: WebhookIdentityType | description: - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP - name: accountInfo | type: AccountInfo | description: Details related to the account - name: accountId | type: string | description: GUID of the Wix account associated with the event. - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account. - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site. - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them. - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. - name: entityId | type: string | description: GUID of the entity associated with the event. - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR). - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. ``` ### Examples ```javascript import { donationCampaigns } from '@wix/donations'; donationCampaigns.onDonationCampaignUpdated((event) => { // handle your event here }); ``` ```javascript import { createClient, AppStrategy } from '@wix/sdk'; import { donationCampaigns } from '@wix/donations'; const wixClient = createClient({ auth: AppStrategy({ appId: 'MY-APP-ID', publicKey: 'YOUR_APP_PUBLIC_KEY', }), modules: { donationCampaigns, }, }); wixClient.donationCampaigns.onDonationCampaignUpdated((event) => { // handle your event here }); ``` ---