{"title":"Donations with Sessions flow","category":"default","creationDate":1779206567,"content":"<div data-component-wrapper=\"in-page-filtering\">\n    <in-page-filtering\n        id=\"donations-sessions\"\n        :in-page-filtering=\"{&quot;guides&quot;:{&quot;web&quot;:{&quot;label&quot;:&quot;Web&quot;,&quot;integrations&quot;:{&quot;drop-in&quot;:{&quot;label&quot;:&quot;Drop-in&quot;,&quot;description&quot;:&quot;Use Drop-in to show the donation form on your website&quot;,&quot;displayVersionDropdown&quot;:true,&quot;visual_content&quot;:null,&quot;visual_images&quot;:null,&quot;external_content&quot;:null,&quot;external_icon&quot;:null,&quot;versions&quot;:{&quot;version-6.36.0&quot;:{&quot;sections&quot;:{&quot;intro&quot;:{&quot;$ref&quot;:&quot;845bb661fb8712738483dfe3e9ada35a&quot;},&quot;requirements&quot;:{&quot;$ref&quot;:&quot;bae68ae62fcccf22a777d5e0bb2a16aa&quot;},&quot;how_it_works&quot;:{&quot;$ref&quot;:&quot;172c5ba52ff85216a4e2f105c1a1e62f&quot;},&quot;show_giving&quot;:{&quot;$ref&quot;:&quot;c1fa9757f3acd6f17135d8a63407c405&quot;},&quot;get_donation_outcome&quot;:{&quot;$ref&quot;:&quot;3498b46bd6dd4d28b63312cc3ed57b0e&quot;},&quot;test_and_go_live&quot;:{&quot;$ref&quot;:&quot;f2752ad9f4944981259d57e5eda5379d&quot;},&quot;see_also&quot;:{&quot;$ref&quot;:&quot;25bc88c606a85e04434749802f1bbb36&quot;}},&quot;versions&quot;:{&quot;version&quot;:&quot;6.36.0&quot;},&quot;config&quot;:{&quot;published&quot;:true,&quot;visible&quot;:true,&quot;api_version&quot;:72}}},&quot;sections&quot;:[],&quot;components&quot;:{&quot;845bb661fb8712738483dfe3e9ada35a&quot;:&quot;&lt;p&gt;With the Sessions flow, Drop-in handles the donation flow automatically. After a successful payment, if the shopper is eligible to donate, Drop-in shows the donation form to the shopper.&lt;\\\/p&gt;\\n&lt;p&gt;If the shopper chooses to donate, the donation transaction uses the same payment method that the shopper used for the original payment.&lt;\\\/p&gt;\\n&lt;p&gt;You can accept donations for fixed amounts, or allow the shopper to round up their transaction amount as a donation.&lt;\\\/p&gt;\\n&lt;p&gt;You do not need to pass any donation-specific parameters in your &lt;code&gt;\\\/sessions&lt;\\\/code&gt; request. Drop-in manages the full donation flow, including presenting the campaign and processing the donation.&lt;\\\/p&gt;&quot;,&quot;bae68ae62fcccf22a777d5e0bb2a16aa&quot;:&quot;&lt;h2&gt;Requirements&lt;\\\/h2&gt;\\n&lt;p&gt;In addition to the &lt;a href=\\&quot;\\\/online-payments\\\/donations#requirements\\&quot;&gt;general Adyen Giving requirements&lt;\\\/a&gt;, take into account the following requirements.&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Requirement&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Integration type&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have integrated with: &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\\/?platform=Web&amp;amp;integration=Drop-in&amp;amp;version=6.36.0\\&quot;&gt;Web Drop-in v6.36.0 or later using the Sessions flow&lt;\\\/a&gt;&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;Checkout API v72 or later&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;&lt;a href=\\&quot;\\\/account\\\/user-roles\\&quot;&gt;Customer Area roles&lt;\\\/a&gt;&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have the &lt;strong&gt;&lt;a href=\\&quot;\\\/account\\\/user-roles\\\/#manage-donation-campaigns\\&quot;&gt;Donation campaigns manager&lt;\\\/a&gt;&lt;\\\/strong&gt; role.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;&lt;a href=\\&quot;\\\/development-resources\\\/webhooks\\&quot;&gt;Webhooks&lt;\\\/a&gt;&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Subscribe to the following webhooks: &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;Standard webhooks&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;a href=\\&quot;\\\/development-resources\\\/webhooks\\\/webhook-types\\\/#other-webhooks\\&quot;&gt;Adyen Giving merchant webhook&lt;\\\/a&gt;&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Setup steps&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Before you begin: &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;To check if your &lt;a href=\\&quot;https:\\\/\\\/ca-test.adyen.com\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Customer Area&lt;\\\/a&gt; user has the required roles, go to &lt;strong&gt;Account&lt;\\\/strong&gt; &amp;gt; &lt;strong&gt;Users&lt;\\\/strong&gt;. If you need additional roles, contact your admin user.&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;Set up a Drop-in integration for the &lt;a href=\\&quot;\\\/online-payments\\\/donations#supported-payment-methods\\&quot;&gt;payment methods&lt;\\\/a&gt; that you want to support.&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;a href=\\&quot;\\\/online-payments\\\/donations\\\/#donation-campaign\\&quot;&gt;Create and activate a donation campaign&lt;\\\/a&gt;.&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;&quot;,&quot;172c5ba52ff85216a4e2f105c1a1e62f&quot;:&quot;&lt;h2&gt;How it works&lt;\\\/h2&gt;\\n&lt;ol&gt;\\n&lt;li&gt;The shopper goes to the checkout page.&lt;\\\/li&gt;\\n&lt;li&gt;Your server &lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\\/?platform=Web&amp;amp;integration=Drop-in#create-a-payment-session\\&quot;&gt;creates a payment session&lt;\\\/a&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;When you create a &lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\\/?platform=Web&amp;amp;integration=Drop-in#configure\\&quot;&gt;global configuration object for &lt;code&gt;AdyenCheckout&lt;\\\/code&gt;&lt;\\\/a&gt;, optionally &lt;a href=\\&quot;\\\/online-payments\\\/donations\\\/integration-options\\\/sessions-flow\\\/#add-giving-configuration\\&quot;&gt;add a configuration object for donations&lt;\\\/a&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;Drop-in shows the payment form.&lt;\\\/li&gt;\\n&lt;li&gt;The shopper uses submits the payment on your checkout page.&lt;\\\/li&gt;\\n&lt;li&gt;Drop-in handles the payment flow.&lt;\\\/li&gt;\\n&lt;li&gt;If the payment is successful, Drop-in checks if you have an active donation campaign in your Adyen Customer Area.&lt;\\\/li&gt;\\n&lt;li&gt;If you have an active donation campaign, Drop-in shows the donation form.&lt;\\\/li&gt;\\n&lt;li&gt;The shopper chooses to donate or declines.&lt;\\\/li&gt;\\n&lt;li&gt;Drop-in handles the donation flow.&lt;\\\/li&gt;\\n&lt;li&gt;&lt;a href=\\&quot;#get-the-donation-outcome\\&quot;&gt;Get the donation result&lt;\\\/a&gt; from the &lt;code&gt;donation.onDonationSuccess&lt;\\\/code&gt; callback&lt;\\\/li&gt;\\n&lt;li&gt;Adyen sends a webhook message with the donation outcome.&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&lt;div id=\\&quot;mermaid-6a0c8e9865933-wrapper\\&quot;&gt;&lt;div id=\\&quot;mermaid-6a0c8e9865933\\&quot; class=\\&quot;mermaid-shortcode loading\\&quot;&gt;CnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgUyBhcyBTaG9wcGVyCiAgICBwYXJ0aWNpcGFudCBGIGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNWIGFzIFlvdXIgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBIGFzIEFkeWVuCiAgICBwYXJ0aWNpcGFudCBXIGFzIFlvdXIgd2ViaG9vayBzZXJ2ZXIKCiAgICBTLT4+RjogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgU1YtPj5BOiAyLiBDcmVhdGUgcGF5bWVudCBzZXNzaW9uCiAgICBBLS0+PlNWOiBSZXR1cm4gc2Vzc2lvbiBkYXRhCiAgICBTVi0tPj5GOiBQYXNzIHNlc3Npb24gZGF0YQogICAgTm90ZSBvdmVyIEY6IDMuIEFkZCBvcHRpb25hbCBkb25hdGlvbiBjb25maWd1cmF0aW9uIGFuZCBpbml0aWFsaXplIERyb3AtaW4KICAgIEYtPj5TOiA0LiBEcm9wLWluIHNob3dzIHBheW1lbnQgZm9ybQogICAgUy0+PkY6IDUuIFN1Ym1pdCBwYXltZW50CiAgICBOb3RlIG92ZXIgRjogNi4gRHJvcC1pbiBoYW5kbGVzIHBheW1lbnQgZmxvdwogICAgRi0+PkE6IERyb3AtaW4gc2VuZHMgcGF5bWVudCBkYXRhCiAgICBOb3RlIG92ZXIgQTogNy4gQ2hlY2sgZm9yIGFjdGl2ZSBkb25hdGlvbiBjYW1wYWlnbgogICAgQS0tPj5GOiBTZXNzaW9uIHJlc3VsdCBhbmQgZG9uYXRpb24gY2FtcGFpZ24gZGF0YQogICAgb3B0IElmIHlvdSBoYXZlIGFjdGl2ZSBkb25hdGlvbiBjYW1wYWlnbgogICAgICAgIEYtPj5TOiA4LiBEcm9wLWluIHNob3dzIGRvbmF0aW9uIGZvcm0KICAgICAgICBTLT4+RjogOS4gRG9uYXRlIG9yIGRlY2xpbmUKICAgICAgICBOb3RlIG92ZXIgRjogMTAuIERyb3AtaW4gaGFuZGxlcyBkb25hdGlvbiBmbG93CiAgICAgICAgRi0+PkE6IERyb3AtaW4gc2VuZHMgZG9uYXRpb24gZGF0YQogICAgICAgIEEtLT4+RjogMTEuIERvbmF0aW9uIHJlc3VsdCAKICAgICAgICBBLT4+VzogMTIuIFdlYmhvb2sgbWVzc2FnZSB3aXRoIGRvbmF0aW9uIG91dGNvbWUKICAgIGVuZAogICAgQS0+Plc6IDEzLiBXZWJob29rIG1lc3NhZ2Ugd2l0aCBwYXltZW50IG91dGNvbWUgCg==&lt;\\\/div&gt;&lt;\\\/div&gt;&quot;,&quot;c1fa9757f3acd6f17135d8a63407c405&quot;:&quot;&lt;h2 id=\\&quot;add-giving-configuration\\&quot;&gt;Add Giving configuration&lt;\\\/h2&gt;\\n&lt;p&gt;When you create a &lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\\/?platform=Web&amp;amp;integration=Drop-in#configure\\&quot;&gt;global configuration object for Drop-in&lt;\\\/a&gt;, you can optionally add configuration for donations.&lt;\\\/p&gt;\\n&lt;p&gt;To receive donation results and customize behavior, add a &lt;code&gt;donation&lt;\\\/code&gt; object to your checkout configuration. The &lt;code&gt;donation&lt;\\\/code&gt; configuration is optional, but if you include it, you must include the event handlers to get donation outcomes on your client website.&lt;\\\/p&gt;\\n&lt;p&gt;Event handlers:&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Property&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Required&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;code&gt;onDonationSuccess&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;span class=\\&quot;hint--bottom\\&quot; data-hint=\\&quot;Required\\&quot; markdown=\\&quot;1\\&quot;&gt;&lt;img style=\\&quot;width: 25px;\\&quot; alt=\\&quot;Required\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/image-library\\\/01.icons\\\/required\\\/required.svg?decoding=auto&amp;amp;fetchpriority=auto\\&quot; \\\/&gt;&lt;\\\/span&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Called when the donation is completed or the shopper declines to donate. Receives an object with &lt;code&gt;didDonate&lt;\\\/code&gt;: &lt;strong&gt;true&lt;\\\/strong&gt; or &lt;strong&gt;false&lt;\\\/strong&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;code&gt;onDonationFailure&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;span class=\\&quot;hint--bottom\\&quot; data-hint=\\&quot;Required\\&quot; markdown=\\&quot;1\\&quot;&gt;&lt;img style=\\&quot;width: 25px;\\&quot; alt=\\&quot;Required\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/image-library\\\/01.icons\\\/required\\\/required.svg?decoding=auto&amp;amp;fetchpriority=auto\\&quot; \\\/&gt;&lt;\\\/span&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Called when an error occurs in the donation creation or when a donation fails.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;p&gt;Configuration parameters:&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Property&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Required&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;code&gt;autoMount&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Specifies if Drop-in automatically shows the donation form after a successful payment. Set to &lt;strong&gt;false&lt;\\\/strong&gt; to not show the donation form after the payment is completed. Default: &lt;strong&gt;true&lt;\\\/strong&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;code&gt;delay&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;The delay in milliseconds after a successful payment before Drop-in shows the donation form.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Example Drop-in configuration with donation callbacks&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;js\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;const globalConfiguration = {\\\\n    session: {\\\\n        id: sessionId,\\\\n        sessionData: sessionData\\\\n    \\\\\\\/\\\\\\\/ ...Other configuration.\\\\n    donation: {\\\\n        \\\\\\\/\\\\\\\/ Handles the \\\\n        onDonationSuccess: (result) =&amp;gt; {\\\\n            if (result.didDonate) {\\\\n                console.log(\\\\\\&quot;Shopper donated\\\\\\&quot;);\\\\n            } else {\\\\n                console.log(\\\\\\&quot;Shopper declined to donate\\\\\\&quot;);\\\\n            }\\\\n        },\\\\n        onDonationFailure: (error) =&amp;gt; {\\\\n            console.error(\\\\\\&quot;Donation error:\\\\\\&quot;, error);\\\\n        }\\\\n    },\\\\n    onPaymentCompleted: (result, component) =&amp;gt; {\\\\n        console.log(\\\\\\&quot;Payment completed:\\\\\\&quot;, result);\\\\n    }\\\\n};\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;After a successful payment, if the shopper is eligible to donate, Drop-in shows the donation form. By default, the donation form is mounted in the same container as Drop-in.&lt;\\\/p&gt;\\n&lt;p&gt;You do not need to create or configure the Donation component separately. Drop-in handles the full donation flow, including:&lt;\\\/p&gt;\\n&lt;ul&gt;\\n&lt;li&gt;Showing the donation campaign details (nonprofit name, description, logo, banner).&lt;\\\/li&gt;\\n&lt;li&gt;Presenting the donation amounts or round-up option, depending on the &lt;a href=\\&quot;\\\/online-payments\\\/donations#donation-types\\&quot;&gt;donation type&lt;\\\/a&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;Processing the donation.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;&quot;,&quot;3498b46bd6dd4d28b63312cc3ed57b0e&quot;:&quot;&lt;h2 id=\\&quot;get-the-donation-outcome\\&quot;&gt;Get the donation outcome&lt;\\\/h2&gt;\\n&lt;p&gt;You can get the outcome of each donation in a webhook message. This enables you to inform shoppers by email or mobile messaging about their donation, provided you have the shopper&#039;s contact details.&lt;\\\/p&gt;\\n&lt;p&gt;To receive these webhook messages, enable the &lt;a href=\\&quot;\\\/development-resources\\\/webhooks\\\/webhook-types#other-webhooks\\&quot;&gt;Adyen Giving merchant webhook&lt;\\\/a&gt;, which includes &lt;code&gt;eventCode&lt;\\\/code&gt;: &lt;span translate=\\&quot;no\\&quot;&gt;&lt;strong&gt;DONATION&lt;\\\/strong&gt;&lt;\\\/span&gt;.&lt;\\\/p&gt;\\n&lt;p&gt;For a successful donation, the event contains:&lt;\\\/p&gt;\\n&lt;ul&gt;\\n&lt;li&gt;&lt;code&gt;success&lt;\\\/code&gt;: &lt;span translate=\\&quot;no\\&quot;&gt;&lt;strong&gt;true&lt;\\\/strong&gt;&lt;\\\/span&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;&lt;code&gt;originalReference&lt;\\\/code&gt;: use this value to associate the donation with the shopper&#039;s original transaction.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Successful donation webhook event&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;json\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;{\\\\n  \\\\\\&quot;live\\\\\\&quot;: \\\\\\&quot;false\\\\\\&quot;,\\\\n  \\\\\\&quot;notificationItems\\\\\\&quot;: [\\\\n    {\\\\n      \\\\\\&quot;NotificationRequestItem\\\\\\&quot;: {\\\\n        \\\\\\&quot;additionalData\\\\\\&quot;: {\\\\n          \\\\\\&quot;originalMerchantAccountCode\\\\\\&quot;: \\\\\\&quot;YOUR_MERCHANT_ACCOUNT\\\\\\&quot;\\\\n        },\\\\n        \\\\\\&quot;amount\\\\\\&quot;: {\\\\n          \\\\\\&quot;currency\\\\\\&quot;: \\\\\\&quot;EUR\\\\\\&quot;,\\\\n          \\\\\\&quot;value\\\\\\&quot;: 500\\\\n        },\\\\n        \\\\\\&quot;originalReference\\\\\\&quot;: \\\\\\&quot;V4HZ4RBFJGXXGN82\\\\\\&quot;,\\\\n        \\\\\\&quot;eventCode\\\\\\&quot;: \\\\\\&quot;DONATION\\\\\\&quot;,\\\\n        \\\\\\&quot;eventDate\\\\\\&quot;: \\\\\\&quot;2022-07-07T13:18:13+02:00\\\\\\&quot;,\\\\n        \\\\\\&quot;merchantAccountCode\\\\\\&quot;: \\\\\\&quot;CHARITY_DONATION_ACCOUNT\\\\\\&quot;,\\\\n        \\\\\\&quot;merchantReference\\\\\\&quot;: \\\\\\&quot;YOUR_DONATION_REFERENCE\\\\\\&quot;,\\\\n        \\\\\\&quot;paymentMethod\\\\\\&quot;: \\\\\\&quot;visa\\\\\\&quot;,\\\\n        \\\\\\&quot;pspReference\\\\\\&quot;: \\\\\\&quot;Z58FGTKBRCQ2WN27\\\\\\&quot;,\\\\n        \\\\\\&quot;reason\\\\\\&quot;: \\\\\\&quot;033899:1111:03\\\\\\\/2030\\\\\\&quot;,\\\\n        \\\\\\&quot;success\\\\\\&quot;: \\\\\\&quot;true\\\\\\&quot;\\\\n      }\\\\n    }\\\\n  ]\\\\n}\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;&quot;,&quot;f2752ad9f4944981259d57e5eda5379d&quot;:&quot;&lt;h2&gt;Test and go live&lt;\\\/h2&gt;\\n&lt;p&gt;Before going live with your integration, &lt;a href=\\&quot;\\\/online-payments\\\/donations\\\/testing\\&quot;&gt;use our test cards to test your integration&lt;\\\/a&gt;.&lt;\\\/p&gt;&quot;,&quot;25bc88c606a85e04434749802f1bbb36&quot;:&quot;&lt;h2 id=\\&quot;see-also\\&quot;&gt;See also&lt;\\\/h2&gt;\\n&lt;div class=\\&quot;see-also-links output-inline\\&quot; id=\\&quot;see-also85876\\&quot;&gt;\\n&lt;ul&gt;&lt;li&gt;&lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\&quot;\\n                        target=\\&quot;_self\\&quot;\\n                        &gt;\\n                    Sessions flow integration guide\\n                &lt;\\\/a&gt;&lt;\\\/li&gt;&lt;li&gt;&lt;a href=\\&quot;\\\/online-payments\\\/donations\\\/integration-options\\\/advanced-flow\\&quot;\\n                        target=\\&quot;_self\\&quot;\\n                        &gt;\\n                    Donations with Advanced flow\\n                &lt;\\\/a&gt;&lt;\\\/li&gt;&lt;li&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/#\\\/Webhooks\\\/v1\\\/overview\\&quot;\\n                        target=\\&quot;_blank\\&quot;\\n                         class=\\&quot;external\\&quot;&gt;\\n                    Webhooks\\n                &lt;\\\/a&gt;&lt;\\\/li&gt;&lt;li&gt;&lt;a href=\\&quot;https:\\\/\\\/www.adyen.com\\\/giving\\&quot;\\n                        target=\\&quot;_blank\\&quot;\\n                         class=\\&quot;external\\&quot;&gt;\\n                    Giving on adyen.com\\n                &lt;\\\/a&gt;&lt;\\\/li&gt;&lt;li&gt;&lt;a href=\\&quot;\\\/reporting\\\/monitor-donations\\\/\\&quot;\\n                        target=\\&quot;_self\\&quot;\\n                        &gt;\\n                    Monitor donations\\n                &lt;\\\/a&gt;&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/div&gt;\\n&quot;}},&quot;components&quot;:{&quot;label&quot;:&quot;Components&quot;,&quot;description&quot;:&quot;Use the Component to show the donation form on your website&quot;,&quot;displayVersionDropdown&quot;:true,&quot;visual_content&quot;:null,&quot;visual_images&quot;:null,&quot;external_content&quot;:null,&quot;external_icon&quot;:null,&quot;versions&quot;:{&quot;version-6.36.0&quot;:{&quot;sections&quot;:{&quot;intro&quot;:{&quot;$ref&quot;:&quot;62db3fff643997c62fbc2b93e24e7238&quot;},&quot;requirements&quot;:{&quot;$ref&quot;:&quot;65e41d14895890ea9df35e38271c6b23&quot;},&quot;how_it_works&quot;:{&quot;$ref&quot;:&quot;f42292e1d75ec589b91c88cbc069970f&quot;},&quot;show_giving&quot;:{&quot;$ref&quot;:&quot;3fba753897ab4a5f08dcc31b7fc3cae6&quot;},&quot;get_donation_outcome&quot;:{&quot;$ref&quot;:&quot;3498b46bd6dd4d28b63312cc3ed57b0e&quot;},&quot;test_and_go_live&quot;:{&quot;$ref&quot;:&quot;f2752ad9f4944981259d57e5eda5379d&quot;},&quot;see_also&quot;:{&quot;$ref&quot;:&quot;0bcee5fa6c439fa9fdf8675ff48191d0&quot;}},&quot;versions&quot;:{&quot;version&quot;:&quot;6.36.0&quot;},&quot;config&quot;:{&quot;published&quot;:true,&quot;visible&quot;:true,&quot;api_version&quot;:72}}},&quot;sections&quot;:[],&quot;components&quot;:{&quot;62db3fff643997c62fbc2b93e24e7238&quot;:&quot;&lt;p&gt;With the Sessions flow, the Component handles the donation flow automatically. After a successful payment, if the shopper is eligible to donate, the Component shows the donation form to the shopper.&lt;\\\/p&gt;\\n&lt;p&gt;If the shopper chooses to donate, the donation transaction uses the same payment method that the shopper used for the original payment.&lt;\\\/p&gt;\\n&lt;p&gt;You can accept donations for fixed amounts, or allow the shopper to round up their transaction amount as a donation.&lt;\\\/p&gt;\\n&lt;p&gt;You do not need to pass any donation-specific parameters in your &lt;code&gt;\\\/sessions&lt;\\\/code&gt; request. the Component manages the full donation flow, including presenting the campaign and processing the donation.&lt;\\\/p&gt;&quot;,&quot;65e41d14895890ea9df35e38271c6b23&quot;:&quot;&lt;h2&gt;Requirements&lt;\\\/h2&gt;\\n&lt;p&gt;In addition to the &lt;a href=\\&quot;\\\/online-payments\\\/donations#requirements\\&quot;&gt;general Adyen Giving requirements&lt;\\\/a&gt;, take into account the following requirements.&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Requirement&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Integration type&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have integrated with: &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\\/?platform=Web&amp;amp;integration=Components&amp;amp;version=6.36.0\\&quot;&gt;Web the Component v6.36.0 or later using the Sessions flow&lt;\\\/a&gt;&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;Checkout API v72 or later&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;&lt;a href=\\&quot;\\\/account\\\/user-roles\\&quot;&gt;Customer Area roles&lt;\\\/a&gt;&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have the &lt;strong&gt;&lt;a href=\\&quot;\\\/account\\\/user-roles\\\/#manage-donation-campaigns\\&quot;&gt;Donation campaigns manager&lt;\\\/a&gt;&lt;\\\/strong&gt; role.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;&lt;a href=\\&quot;\\\/development-resources\\\/webhooks\\&quot;&gt;Webhooks&lt;\\\/a&gt;&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Subscribe to the following webhooks: &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;Standard webhooks&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;a href=\\&quot;\\\/development-resources\\\/webhooks\\\/webhook-types\\\/#other-webhooks\\&quot;&gt;Adyen Giving merchant webhook&lt;\\\/a&gt;&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Setup steps&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Before you begin: &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;To check if your &lt;a href=\\&quot;https:\\\/\\\/ca-test.adyen.com\\\/\\&quot;&gt;Customer Area&lt;\\\/a&gt; user has the required roles, go to &lt;strong&gt;Account&lt;\\\/strong&gt; &amp;gt; &lt;strong&gt;Users&lt;\\\/strong&gt;. If you need additional roles, contact your admin user.&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;Set up a the Component integration for the &lt;a href=\\&quot;\\\/online-payments\\\/donations#supported-payment-methods\\&quot;&gt;payment methods&lt;\\\/a&gt; that you want to support.&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;a href=\\&quot;\\\/online-payments\\\/donations\\\/#donation-campaign\\&quot;&gt;Create and activate a donation campaign&lt;\\\/a&gt;.&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;&quot;,&quot;f42292e1d75ec589b91c88cbc069970f&quot;:&quot;&lt;h2&gt;How it works&lt;\\\/h2&gt;\\n&lt;ol&gt;\\n&lt;li&gt;The shopper goes to the checkout page.&lt;\\\/li&gt;\\n&lt;li&gt;Your server &lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\\/?platform=Web&amp;amp;integration=Components#create-a-payment-session\\&quot;&gt;creates a payment session&lt;\\\/a&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;When you create a &lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\\/?platform=Web&amp;amp;integration=Components#configure\\&quot;&gt;global configuration object for &lt;code&gt;AdyenCheckout&lt;\\\/code&gt;&lt;\\\/a&gt;, optionally &lt;a href=\\&quot;\\\/online-payments\\\/donations\\\/integration-options\\\/sessions-flow\\\/#add-giving-configuration\\&quot;&gt;add a configuration object for donations&lt;\\\/a&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;The Component shows the payment form.&lt;\\\/li&gt;\\n&lt;li&gt;The shopper submits the payment on your checkout page.&lt;\\\/li&gt;\\n&lt;li&gt;The Component handles the payment flow.&lt;\\\/li&gt;\\n&lt;li&gt;If the payment is successful, the Component checks if you have an active donation campaign in your Adyen Customer Area.&lt;\\\/li&gt;\\n&lt;li&gt;If you have an active donation campaign, the Component shows the donation form.&lt;\\\/li&gt;\\n&lt;li&gt;The shopper chooses to donate or declines.&lt;\\\/li&gt;\\n&lt;li&gt;The Component handles the donation flow.&lt;\\\/li&gt;\\n&lt;li&gt;&lt;a href=\\&quot;#get-the-donation-outcome\\&quot;&gt;Get the donation result&lt;\\\/a&gt; from the &lt;code&gt;donation.onDonationSuccess&lt;\\\/code&gt; callback&lt;\\\/li&gt;\\n&lt;li&gt;Adyen sends a webhook message with the donation outcome.&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&lt;div id=\\&quot;mermaid-6a0c8e986ffc3-wrapper\\&quot;&gt;&lt;div id=\\&quot;mermaid-6a0c8e986ffc3\\&quot; class=\\&quot;mermaid-shortcode loading\\&quot;&gt;CnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgUyBhcyBTaG9wcGVyCiAgICBwYXJ0aWNpcGFudCBGIGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNWIGFzIFlvdXIgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBIGFzIEFkeWVuCiAgICBwYXJ0aWNpcGFudCBXIGFzIFlvdXIgd2ViaG9vayBzZXJ2ZXIKCiAgICBTLT4+RjogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgU1YtPj5BOiAyLiBDcmVhdGUgcGF5bWVudCBzZXNzaW9uCiAgICBBLS0+PlNWOiBSZXR1cm4gc2Vzc2lvbiBkYXRhCiAgICBTVi0tPj5GOiBQYXNzIHNlc3Npb24gZGF0YQogICAgTm90ZSBvdmVyIEY6IDMuIEFkZCBvcHRpb25hbCBkb25hdGlvbiBjb25maWd1cmF0aW9uIGFuZCBpbml0aWFsaXplIENvbXBvbmVudAogICAgRi0+PlM6IDQuIENvbXBvbmVudCBzaG93cyBwYXltZW50IGZvcm0KICAgIFMtPj5GOiA1LiBTdWJtaXQgcGF5bWVudAogICAgTm90ZSBvdmVyIEY6IDYuIENvbXBvbmVudCBoYW5kbGVzIHBheW1lbnQgZmxvdwogICAgRi0+PkE6IENvbXBvbmVudCBzZW5kcyBwYXltZW50IGRhdGEKICAgIE5vdGUgb3ZlciBBOiA3LiBDaGVjayBmb3IgYWN0aXZlIGRvbmF0aW9uIGNhbXBhaWduCiAgICBBLS0+PkY6IFNlc3Npb24gcmVzdWx0IGFuZCBkb25hdGlvbiBjYW1wYWlnbiBkYXRhCiAgICBvcHQgSWYgeW91IGhhdmUgYWN0aXZlIGRvbmF0aW9uIGNhbXBhaWduCiAgICAgICAgRi0+PlM6IDguIENvbXBvbmVudCBzaG93cyBkb25hdGlvbiBmb3JtCiAgICAgICAgUy0+PkY6IDkuIERvbmF0ZSBvciBkZWNsaW5lCiAgICAgICAgTm90ZSBvdmVyIEY6IDEwLiBDb21wb25lbnQgaGFuZGxlcyBkb25hdGlvbiBmbG93CiAgICAgICAgRi0+PkE6IENvbXBvbmVudCBzZW5kcyBkb25hdGlvbiBkYXRhCiAgICAgICAgQS0tPj5GOiAxMS4gRG9uYXRpb24gcmVzdWx0IAogICAgICAgIEEtPj5XOiAxMi4gV2ViaG9vayBtZXNzYWdlIHdpdGggZG9uYXRpb24gb3V0Y29tZQogICAgZW5kCiAgICBBLT4+VzogMTMuIFdlYmhvb2sgbWVzc2FnZSB3aXRoIHBheW1lbnQgb3V0Y29tZSAK&lt;\\\/div&gt;&lt;\\\/div&gt;&quot;,&quot;3fba753897ab4a5f08dcc31b7fc3cae6&quot;:&quot;&lt;h2 id=\\&quot;add-giving-configuration\\&quot;&gt;Add Giving configuration&lt;\\\/h2&gt;\\n&lt;p&gt;When you create a &lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\\/?platform=Web&amp;amp;integration=Components#configure\\&quot;&gt;global configuration object for the Component&lt;\\\/a&gt;, you can optionally add configuration for donations.&lt;\\\/p&gt;\\n&lt;p&gt;To receive donation results and customize behavior, add a &lt;code&gt;donation&lt;\\\/code&gt; object to your checkout configuration. The &lt;code&gt;donation&lt;\\\/code&gt; configuration is optional, but if you include it, you must include the event handlers to get donation outcomes on your client website.&lt;\\\/p&gt;\\n&lt;p&gt;Event handlers:&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Property&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Required&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;code&gt;onDonationSuccess&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;span class=\\&quot;hint--bottom\\&quot; data-hint=\\&quot;Required\\&quot; markdown=\\&quot;1\\&quot;&gt;&lt;img style=\\&quot;width: 25px;\\&quot; alt=\\&quot;Required\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/image-library\\\/01.icons\\\/required\\\/required.svg?decoding=auto&amp;amp;fetchpriority=auto\\&quot; \\\/&gt;&lt;\\\/span&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Called when the donation is completed or the shopper declines to donate. Receives an object with &lt;code&gt;didDonate&lt;\\\/code&gt;: &lt;strong&gt;true&lt;\\\/strong&gt; or &lt;strong&gt;false&lt;\\\/strong&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;code&gt;onDonationFailure&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;span class=\\&quot;hint--bottom\\&quot; data-hint=\\&quot;Required\\&quot; markdown=\\&quot;1\\&quot;&gt;&lt;img style=\\&quot;width: 25px;\\&quot; alt=\\&quot;Required\\&quot; src=\\&quot;\\\/user\\\/pages\\\/reuse\\\/image-library\\\/01.icons\\\/required\\\/required.svg?decoding=auto&amp;amp;fetchpriority=auto\\&quot; \\\/&gt;&lt;\\\/span&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Called when an error occurs in the donation creation or when a donation fails.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;p&gt;Configuration parameters:&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Property&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Required&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;code&gt;autoMount&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Specifies if the Component automatically shows the donation form after a successful payment. Set to &lt;strong&gt;false&lt;\\\/strong&gt; to not automatically show the donation form after the payment is completed. You can &lt;a href=\\&quot;#show-the-donation-form-in-a-separate-container\\&quot;&gt;show the donation form in a separate container&lt;\\\/a&gt; by creating a new Donation Component instead. Default: &lt;strong&gt;true&lt;\\\/strong&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;code&gt;delay&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;The delay in milliseconds after a successful payment before the Component shows the donation form.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Example Component configuration with donation callbacks&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;js\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;const globalConfiguration = {\\\\n    session: {\\\\n        id: sessionId,\\\\n        sessionData: sessionData\\\\n    },\\\\n    \\\\\\\/\\\\\\\/ ...Other configuration.\\\\n    donation: {\\\\n        onDonationSuccess: (result) =&amp;gt; {\\\\n            if (result.didDonate) {\\\\n                console.log(\\\\\\&quot;Shopper donated\\\\\\&quot;);\\\\n            } else {\\\\n                console.log(\\\\\\&quot;Shopper declined to donate\\\\\\&quot;);\\\\n            }\\\\n        },\\\\n        onDonationFailure: (error) =&amp;gt; {\\\\n            console.error(\\\\\\&quot;Donation error:\\\\\\&quot;, error);\\\\n        }\\\\n    },\\\\n    onPaymentCompleted: (result, component) =&amp;gt; {\\\\n        console.log(\\\\\\&quot;Payment completed:\\\\\\&quot;, result);\\\\n    }\\\\n};\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;h3&gt;Show the donation form in a separate container&lt;\\\/h3&gt;\\n&lt;p&gt;By default, the Component mounts the donation form in the same container as the original Component. To mount it in a different container:&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;Set &lt;code&gt;donation.autoMount&lt;\\\/code&gt; to &lt;strong&gt;false&lt;\\\/strong&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;Create a new Donation Component in the &lt;code&gt;onPaymentCompleted&lt;\\\/code&gt; callback, passing the reference to the DOM element that you want to mount the Component into.&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Example configuration for showing the donation form in a separate container&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;js&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;const globalConfiguration = {\\\\n    session: {\\\\n        id: sessionId,\\\\n        sessionData: sessionData\\\\n    },\\\\n    \\\\\\\/\\\\\\\/... Other configuration.\\\\n    donation: {\\\\n        \\\\\\\/\\\\\\\/ 1. Set autoMount to false.\\\\n        autoMount: false,\\\\n        onDonationSuccess: (result) =&amp;gt; {\\\\n            console.log(\\\\&amp;quot;Donation result:\\\\&amp;quot;, result);\\\\n        },\\\\n        onDonationFailure: (error) =&amp;gt; {\\\\n            console.error(\\\\&amp;quot;Donation error:\\\\&amp;quot;, error);\\\\n        }\\\\n    },\\\\n    onPaymentCompleted: (result, element) =&amp;gt; {\\\\n        if (result.askDonation === true) {\\\\n            \\\\\\\/\\\\\\\/ 2. Create a new Donation Component, passing the reference to the DOM element.\\\\n            new Donation(element.core, {\\\\n                rootNode: &#039;#donation-container&#039;,\\\\n                commercialTxAmount: element.props.amount.value\\\\n            });\\\\n        }\\\\n    }\\\\n};&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;&quot;,&quot;3498b46bd6dd4d28b63312cc3ed57b0e&quot;:&quot;&lt;h2 id=\\&quot;get-the-donation-outcome\\&quot;&gt;Get the donation outcome&lt;\\\/h2&gt;\\n&lt;p&gt;You can get the outcome of each donation in a webhook message. This enables you to inform shoppers by email or mobile messaging about their donation, provided you have the shopper&#039;s contact details.&lt;\\\/p&gt;\\n&lt;p&gt;To receive these webhook messages, enable the &lt;a href=\\&quot;\\\/development-resources\\\/webhooks\\\/webhook-types#other-webhooks\\&quot;&gt;Adyen Giving merchant webhook&lt;\\\/a&gt;, which includes &lt;code&gt;eventCode&lt;\\\/code&gt;: &lt;span translate=\\&quot;no\\&quot;&gt;&lt;strong&gt;DONATION&lt;\\\/strong&gt;&lt;\\\/span&gt;.&lt;\\\/p&gt;\\n&lt;p&gt;For a successful donation, the event contains:&lt;\\\/p&gt;\\n&lt;ul&gt;\\n&lt;li&gt;&lt;code&gt;success&lt;\\\/code&gt;: &lt;span translate=\\&quot;no\\&quot;&gt;&lt;strong&gt;true&lt;\\\/strong&gt;&lt;\\\/span&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;&lt;code&gt;originalReference&lt;\\\/code&gt;: use this value to associate the donation with the shopper&#039;s original transaction.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Successful donation webhook event&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;json\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;{\\\\n  \\\\\\&quot;live\\\\\\&quot;: \\\\\\&quot;false\\\\\\&quot;,\\\\n  \\\\\\&quot;notificationItems\\\\\\&quot;: [\\\\n    {\\\\n      \\\\\\&quot;NotificationRequestItem\\\\\\&quot;: {\\\\n        \\\\\\&quot;additionalData\\\\\\&quot;: {\\\\n          \\\\\\&quot;originalMerchantAccountCode\\\\\\&quot;: \\\\\\&quot;YOUR_MERCHANT_ACCOUNT\\\\\\&quot;\\\\n        },\\\\n        \\\\\\&quot;amount\\\\\\&quot;: {\\\\n          \\\\\\&quot;currency\\\\\\&quot;: \\\\\\&quot;EUR\\\\\\&quot;,\\\\n          \\\\\\&quot;value\\\\\\&quot;: 500\\\\n        },\\\\n        \\\\\\&quot;originalReference\\\\\\&quot;: \\\\\\&quot;V4HZ4RBFJGXXGN82\\\\\\&quot;,\\\\n        \\\\\\&quot;eventCode\\\\\\&quot;: \\\\\\&quot;DONATION\\\\\\&quot;,\\\\n        \\\\\\&quot;eventDate\\\\\\&quot;: \\\\\\&quot;2022-07-07T13:18:13+02:00\\\\\\&quot;,\\\\n        \\\\\\&quot;merchantAccountCode\\\\\\&quot;: \\\\\\&quot;CHARITY_DONATION_ACCOUNT\\\\\\&quot;,\\\\n        \\\\\\&quot;merchantReference\\\\\\&quot;: \\\\\\&quot;YOUR_DONATION_REFERENCE\\\\\\&quot;,\\\\n        \\\\\\&quot;paymentMethod\\\\\\&quot;: \\\\\\&quot;visa\\\\\\&quot;,\\\\n        \\\\\\&quot;pspReference\\\\\\&quot;: \\\\\\&quot;Z58FGTKBRCQ2WN27\\\\\\&quot;,\\\\n        \\\\\\&quot;reason\\\\\\&quot;: \\\\\\&quot;033899:1111:03\\\\\\\/2030\\\\\\&quot;,\\\\n        \\\\\\&quot;success\\\\\\&quot;: \\\\\\&quot;true\\\\\\&quot;\\\\n      }\\\\n    }\\\\n  ]\\\\n}\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;&quot;,&quot;f2752ad9f4944981259d57e5eda5379d&quot;:&quot;&lt;h2&gt;Test and go live&lt;\\\/h2&gt;\\n&lt;p&gt;Before going live with your integration, &lt;a href=\\&quot;\\\/online-payments\\\/donations\\\/testing\\&quot;&gt;use our test cards to test your integration&lt;\\\/a&gt;.&lt;\\\/p&gt;&quot;,&quot;0bcee5fa6c439fa9fdf8675ff48191d0&quot;:&quot;&lt;h2 id=\\&quot;see-also\\&quot;&gt;See also&lt;\\\/h2&gt;\\n&lt;div class=\\&quot;see-also-links output-inline\\&quot; id=\\&quot;see-also33433\\&quot;&gt;\\n&lt;ul&gt;&lt;li&gt;&lt;a href=\\&quot;\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\&quot;\\n                        target=\\&quot;_self\\&quot;\\n                        &gt;\\n                    Sessions flow integration guide\\n                &lt;\\\/a&gt;&lt;\\\/li&gt;&lt;li&gt;&lt;a href=\\&quot;\\\/online-payments\\\/donations\\\/integration-options\\\/advanced-flow\\&quot;\\n                        target=\\&quot;_self\\&quot;\\n                        &gt;\\n                    Donations with Advanced flow\\n                &lt;\\\/a&gt;&lt;\\\/li&gt;&lt;li&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/#\\\/Webhooks\\\/v1\\\/overview\\&quot;\\n                        target=\\&quot;_blank\\&quot;\\n                         class=\\&quot;external\\&quot;&gt;\\n                    Webhooks\\n                &lt;\\\/a&gt;&lt;\\\/li&gt;&lt;li&gt;&lt;a href=\\&quot;https:\\\/\\\/www.adyen.com\\\/giving\\&quot;\\n                        target=\\&quot;_blank\\&quot;\\n                         class=\\&quot;external\\&quot;&gt;\\n                    Giving on adyen.com\\n                &lt;\\\/a&gt;&lt;\\\/li&gt;&lt;li&gt;&lt;a href=\\&quot;\\\/reporting\\\/monitor-donations\\\/\\&quot;\\n                        target=\\&quot;_self\\&quot;\\n                        &gt;\\n                    Monitor donations\\n                &lt;\\\/a&gt;&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/div&gt;\\n&quot;}}}}}}\"\n        query-param-tab=\"platform\"\n        query-param-box=\"integration\"\n        query-param-dropdown=\"version\">\n    <\/in-page-filtering>\n<\/div>\n<div class=\"version_docs__image-placeholder u-display-none\">\n    <\/div>\n","url":"https:\/\/docs.adyen.com\/online-payments\/donations\/integration-options\/sessions-flow","articleFields":{"feedback_component":true,"description":"Accept donations using the Sessions flow with Web Drop-in or Components.","filters_component":true,"filters_config_folder":"donations-sessions","dynamic_minitoc":true,"dynamic_minitoc_context":".in-page-filtering--content"},"algolia":[{"url":"https:\/\/docs.adyen.com\/online-payments\/donations\/integration-options\/sessions-flow","title":"Donations with Sessions flow","content":"With the Sessions flow, Drop-in handles the donation flow automatically. After a successful payment, if the shopper is eligible to donate, Drop-in shows the donation form to the shopper.\nIf the shopper chooses to donate, the donation transaction uses the same payment method that the shopper used for the original payment.\nYou can accept donations for fixed amounts, or allow the shopper to round up their transaction amount as a donation.\nYou do not need to pass any donation-specific parameters in your \/sessions request. Drop-in manages the full donation flow, including presenting the campaign and processing the donation.Requirements\nIn addition to the general Adyen Giving requirements, take into account the following requirements.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have integrated with: Web Drop-in v6.36.0 or later using the Sessions flowCheckout API v72 or later\n\n\nCustomer Area roles\nMake sure that you have the Donation campaigns manager role.\n\n\nWebhooks\nSubscribe to the following webhooks: Standard webhooksAdyen Giving merchant webhook\n\n\nSetup steps\nBefore you begin: To check if your Customer Area user has the required roles, go to Account &gt; Users. If you need additional roles, contact your admin user.Set up a Drop-in integration for the payment methods that you want to support.Create and activate a donation campaign.\n\n\nHow it works\n\nThe shopper goes to the checkout page.\nYour server creates a payment session.\nWhen you create a global configuration object for AdyenCheckout, optionally add a configuration object for donations.\nDrop-in shows the payment form.\nThe shopper uses submits the payment on your checkout page.\nDrop-in handles the payment flow.\nIf the payment is successful, Drop-in checks if you have an active donation campaign in your Adyen Customer Area.\nIf you have an active donation campaign, Drop-in shows the donation form.\nThe shopper chooses to donate or declines.\nDrop-in handles the donation flow.\nGet the donation result from the donation.onDonationSuccess callback\nAdyen sends a webhook message with the donation outcome.\n\nCnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgUyBhcyBTaG9wcGVyCiAgICBwYXJ0aWNpcGFudCBGIGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNWIGFzIFlvdXIgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBIGFzIEFkeWVuCiAgICBwYXJ0aWNpcGFudCBXIGFzIFlvdXIgd2ViaG9vayBzZXJ2ZXIKCiAgICBTLT4+RjogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgU1YtPj5BOiAyLiBDcmVhdGUgcGF5bWVudCBzZXNzaW9uCiAgICBBLS0+PlNWOiBSZXR1cm4gc2Vzc2lvbiBkYXRhCiAgICBTVi0tPj5GOiBQYXNzIHNlc3Npb24gZGF0YQogICAgTm90ZSBvdmVyIEY6IDMuIEFkZCBvcHRpb25hbCBkb25hdGlvbiBjb25maWd1cmF0aW9uIGFuZCBpbml0aWFsaXplIERyb3AtaW4KICAgIEYtPj5TOiA0LiBEcm9wLWluIHNob3dzIHBheW1lbnQgZm9ybQogICAgUy0+PkY6IDUuIFN1Ym1pdCBwYXltZW50CiAgICBOb3RlIG92ZXIgRjogNi4gRHJvcC1pbiBoYW5kbGVzIHBheW1lbnQgZmxvdwogICAgRi0+PkE6IERyb3AtaW4gc2VuZHMgcGF5bWVudCBkYXRhCiAgICBOb3RlIG92ZXIgQTogNy4gQ2hlY2sgZm9yIGFjdGl2ZSBkb25hdGlvbiBjYW1wYWlnbgogICAgQS0tPj5GOiBTZXNzaW9uIHJlc3VsdCBhbmQgZG9uYXRpb24gY2FtcGFpZ24gZGF0YQogICAgb3B0IElmIHlvdSBoYXZlIGFjdGl2ZSBkb25hdGlvbiBjYW1wYWlnbgogICAgICAgIEYtPj5TOiA4LiBEcm9wLWluIHNob3dzIGRvbmF0aW9uIGZvcm0KICAgICAgICBTLT4+RjogOS4gRG9uYXRlIG9yIGRlY2xpbmUKICAgICAgICBOb3RlIG92ZXIgRjogMTAuIERyb3AtaW4gaGFuZGxlcyBkb25hdGlvbiBmbG93CiAgICAgICAgRi0+PkE6IERyb3AtaW4gc2VuZHMgZG9uYXRpb24gZGF0YQogICAgICAgIEEtLT4+RjogMTEuIERvbmF0aW9uIHJlc3VsdCAKICAgICAgICBBLT4+VzogMTIuIFdlYmhvb2sgbWVzc2FnZSB3aXRoIGRvbmF0aW9uIG91dGNvbWUKICAgIGVuZAogICAgQS0+Plc6IDEzLiBXZWJob29rIG1lc3NhZ2Ugd2l0aCBwYXltZW50IG91dGNvbWUgCg==Add Giving configuration\nWhen you create a global configuration object for Drop-in, you can optionally add configuration for donations.\nTo receive donation results and customize behavior, add a donation object to your checkout configuration. The donation configuration is optional, but if you include it, you must include the event handlers to get donation outcomes on your client website.\nEvent handlers:\n\n\n\nProperty\nRequired\nDescription\n\n\n\n\nonDonationSuccess\n\nCalled when the donation is completed or the shopper declines to donate. Receives an object with didDonate: true or false.\n\n\nonDonationFailure\n\nCalled when an error occurs in the donation creation or when a donation fails.\n\n\n\nConfiguration parameters:\n\n\n\nProperty\nRequired\nDescription\n\n\n\n\nautoMount\n\nSpecifies if Drop-in automatically shows the donation form after a successful payment. Set to false to not show the donation form after the payment is completed. Default: true.\n\n\ndelay\n\nThe delay in milliseconds after a successful payment before Drop-in shows the donation form.\n\n\n\n\n    \n\nAfter a successful payment, if the shopper is eligible to donate, Drop-in shows the donation form. By default, the donation form is mounted in the same container as Drop-in.\nYou do not need to create or configure the Donation component separately. Drop-in handles the full donation flow, including:\n\nShowing the donation campaign details (nonprofit name, description, logo, banner).\nPresenting the donation amounts or round-up option, depending on the donation type.\nProcessing the donation.\nGet the donation outcome\nYou can get the outcome of each donation in a webhook message. This enables you to inform shoppers by email or mobile messaging about their donation, provided you have the shopper's contact details.\nTo receive these webhook messages, enable the Adyen Giving merchant webhook, which includes eventCode: DONATION.\nFor a successful donation, the event contains:\n\nsuccess: true.\noriginalReference: use this value to associate the donation with the shopper's original transaction.\n\n\n    \nTest and go live\nBefore going live with your integration, use our test cards to test your integration.See also\n\n\n                    Sessions flow integration guide\n                \n                    Donations with Advanced flow\n                \n                    Webhooks\n                \n                    Giving on adyen.com\n                \n                    Monitor donations\n                \n","type":"page","locale":"en","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Donations using Giving","lvl3":"Integrate Adyen Giving with online payments","lvl4":"Donations with Sessions flow"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/online-payments","lvl2":"https:\/\/docs.adyen.com\/online-payments\/donations","lvl3":"https:\/\/docs.adyen.com\/online-payments\/donations\/integration-options","lvl4":"\/online-payments\/donations\/integration-options\/sessions-flow"},"levels":5,"category":"Online Payments","category_color":"green","tags":["Donations","Sessions"]},{"url":"https:\/\/docs.adyen.com\/online-payments\/donations\/integration-options\/sessions-flow?platform=Web&integration=Drop-in","title":"Web Drop-in","content":"With the Sessions flow, Drop-in handles the donation flow automatically. After a successful payment, if the shopper is eligible to donate, Drop-in shows the donation form to the shopper.\nIf the shopper chooses to donate, the donation transaction uses the same payment method that the shopper used for the original payment.\nYou can accept donations for fixed amounts, or allow the shopper to round up their transaction amount as a donation.\nYou do not need to pass any donation-specific parameters in your \/sessions request. Drop-in manages the full donation flow, including presenting the campaign and processing the donation.Requirements\nIn addition to the general Adyen Giving requirements, take into account the following requirements.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have integrated with: Web Drop-in v6.36.0 or later using the Sessions flowCheckout API v72 or later\n\n\nCustomer Area roles\nMake sure that you have the Donation campaigns manager role.\n\n\nWebhooks\nSubscribe to the following webhooks: Standard webhooksAdyen Giving merchant webhook\n\n\nSetup steps\nBefore you begin: To check if your Customer Area user has the required roles, go to Account &gt; Users. If you need additional roles, contact your admin user.Set up a Drop-in integration for the payment methods that you want to support.Create and activate a donation campaign.\n\n\nHow it works\n\nThe shopper goes to the checkout page.\nYour server creates a payment session.\nWhen you create a global configuration object for AdyenCheckout, optionally add a configuration object for donations.\nDrop-in shows the payment form.\nThe shopper uses submits the payment on your checkout page.\nDrop-in handles the payment flow.\nIf the payment is successful, Drop-in checks if you have an active donation campaign in your Adyen Customer Area.\nIf you have an active donation campaign, Drop-in shows the donation form.\nThe shopper chooses to donate or declines.\nDrop-in handles the donation flow.\nGet the donation result from the donation.onDonationSuccess callback\nAdyen sends a webhook message with the donation outcome.\n\nCnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgUyBhcyBTaG9wcGVyCiAgICBwYXJ0aWNpcGFudCBGIGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNWIGFzIFlvdXIgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBIGFzIEFkeWVuCiAgICBwYXJ0aWNpcGFudCBXIGFzIFlvdXIgd2ViaG9vayBzZXJ2ZXIKCiAgICBTLT4+RjogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgU1YtPj5BOiAyLiBDcmVhdGUgcGF5bWVudCBzZXNzaW9uCiAgICBBLS0+PlNWOiBSZXR1cm4gc2Vzc2lvbiBkYXRhCiAgICBTVi0tPj5GOiBQYXNzIHNlc3Npb24gZGF0YQogICAgTm90ZSBvdmVyIEY6IDMuIEFkZCBvcHRpb25hbCBkb25hdGlvbiBjb25maWd1cmF0aW9uIGFuZCBpbml0aWFsaXplIERyb3AtaW4KICAgIEYtPj5TOiA0LiBEcm9wLWluIHNob3dzIHBheW1lbnQgZm9ybQogICAgUy0+PkY6IDUuIFN1Ym1pdCBwYXltZW50CiAgICBOb3RlIG92ZXIgRjogNi4gRHJvcC1pbiBoYW5kbGVzIHBheW1lbnQgZmxvdwogICAgRi0+PkE6IERyb3AtaW4gc2VuZHMgcGF5bWVudCBkYXRhCiAgICBOb3RlIG92ZXIgQTogNy4gQ2hlY2sgZm9yIGFjdGl2ZSBkb25hdGlvbiBjYW1wYWlnbgogICAgQS0tPj5GOiBTZXNzaW9uIHJlc3VsdCBhbmQgZG9uYXRpb24gY2FtcGFpZ24gZGF0YQogICAgb3B0IElmIHlvdSBoYXZlIGFjdGl2ZSBkb25hdGlvbiBjYW1wYWlnbgogICAgICAgIEYtPj5TOiA4LiBEcm9wLWluIHNob3dzIGRvbmF0aW9uIGZvcm0KICAgICAgICBTLT4+RjogOS4gRG9uYXRlIG9yIGRlY2xpbmUKICAgICAgICBOb3RlIG92ZXIgRjogMTAuIERyb3AtaW4gaGFuZGxlcyBkb25hdGlvbiBmbG93CiAgICAgICAgRi0+PkE6IERyb3AtaW4gc2VuZHMgZG9uYXRpb24gZGF0YQogICAgICAgIEEtLT4+RjogMTEuIERvbmF0aW9uIHJlc3VsdCAKICAgICAgICBBLT4+VzogMTIuIFdlYmhvb2sgbWVzc2FnZSB3aXRoIGRvbmF0aW9uIG91dGNvbWUKICAgIGVuZAogICAgQS0+Plc6IDEzLiBXZWJob29rIG1lc3NhZ2Ugd2l0aCBwYXltZW50IG91dGNvbWUgCg==Add Giving configuration\nWhen you create a global configuration object for Drop-in, you can optionally add configuration for donations.\nTo receive donation results and customize behavior, add a donation object to your checkout configuration. The donation configuration is optional, but if you include it, you must include the event handlers to get donation outcomes on your client website.\nEvent handlers:\n\n\n\nProperty\nRequired\nDescription\n\n\n\n\nonDonationSuccess\n\nCalled when the donation is completed or the shopper declines to donate. Receives an object with didDonate: true or false.\n\n\nonDonationFailure\n\nCalled when an error occurs in the donation creation or when a donation fails.\n\n\n\nConfiguration parameters:\n\n\n\nProperty\nRequired\nDescription\n\n\n\n\nautoMount\n\nSpecifies if Drop-in automatically shows the donation form after a successful payment. Set to false to not show the donation form after the payment is completed. Default: true.\n\n\ndelay\n\nThe delay in milliseconds after a successful payment before Drop-in shows the donation form.\n\n\n\n\n    \n\nAfter a successful payment, if the shopper is eligible to donate, Drop-in shows the donation form. By default, the donation form is mounted in the same container as Drop-in.\nYou do not need to create or configure the Donation component separately. Drop-in handles the full donation flow, including:\n\nShowing the donation campaign details (nonprofit name, description, logo, banner).\nPresenting the donation amounts or round-up option, depending on the donation type.\nProcessing the donation.\nGet the donation outcome\nYou can get the outcome of each donation in a webhook message. This enables you to inform shoppers by email or mobile messaging about their donation, provided you have the shopper's contact details.\nTo receive these webhook messages, enable the Adyen Giving merchant webhook, which includes eventCode: DONATION.\nFor a successful donation, the event contains:\n\nsuccess: true.\noriginalReference: use this value to associate the donation with the shopper's original transaction.\n\n\n    \nTest and go live\nBefore going live with your integration, use our test cards to test your integration.See also\n\n\n                    Sessions flow integration guide\n                \n                    Donations with Advanced flow\n                \n                    Webhooks\n                \n                    Giving on adyen.com\n                \n                    Monitor donations\n                \n","type":"page","locale":"en","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Donations using Giving","lvl3":"Integrate Adyen Giving with online payments","lvl4":"Donations with Sessions flow"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/online-payments","lvl2":"https:\/\/docs.adyen.com\/online-payments\/donations","lvl3":"https:\/\/docs.adyen.com\/online-payments\/donations\/integration-options","lvl4":"\/online-payments\/donations\/integration-options\/sessions-flow"},"levels":5,"category":"Online Payments","category_color":"green","tags":["Web","Drop-in"]},{"url":"https:\/\/docs.adyen.com\/online-payments\/donations\/integration-options\/sessions-flow?platform=Web&integration=Components","title":"Web Components","content":"With the Sessions flow, the Component handles the donation flow automatically. After a successful payment, if the shopper is eligible to donate, the Component shows the donation form to the shopper.\nIf the shopper chooses to donate, the donation transaction uses the same payment method that the shopper used for the original payment.\nYou can accept donations for fixed amounts, or allow the shopper to round up their transaction amount as a donation.\nYou do not need to pass any donation-specific parameters in your \/sessions request. the Component manages the full donation flow, including presenting the campaign and processing the donation.Requirements\nIn addition to the general Adyen Giving requirements, take into account the following requirements.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have integrated with: Web the Component v6.36.0 or later using the Sessions flowCheckout API v72 or later\n\n\nCustomer Area roles\nMake sure that you have the Donation campaigns manager role.\n\n\nWebhooks\nSubscribe to the following webhooks: Standard webhooksAdyen Giving merchant webhook\n\n\nSetup steps\nBefore you begin: To check if your Customer Area user has the required roles, go to Account &gt; Users. If you need additional roles, contact your admin user.Set up a the Component integration for the payment methods that you want to support.Create and activate a donation campaign.\n\n\nHow it works\n\nThe shopper goes to the checkout page.\nYour server creates a payment session.\nWhen you create a global configuration object for AdyenCheckout, optionally add a configuration object for donations.\nThe Component shows the payment form.\nThe shopper submits the payment on your checkout page.\nThe Component handles the payment flow.\nIf the payment is successful, the Component checks if you have an active donation campaign in your Adyen Customer Area.\nIf you have an active donation campaign, the Component shows the donation form.\nThe shopper chooses to donate or declines.\nThe Component handles the donation flow.\nGet the donation result from the donation.onDonationSuccess callback\nAdyen sends a webhook message with the donation outcome.\n\nCnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgUyBhcyBTaG9wcGVyCiAgICBwYXJ0aWNpcGFudCBGIGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNWIGFzIFlvdXIgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBIGFzIEFkeWVuCiAgICBwYXJ0aWNpcGFudCBXIGFzIFlvdXIgd2ViaG9vayBzZXJ2ZXIKCiAgICBTLT4+RjogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgU1YtPj5BOiAyLiBDcmVhdGUgcGF5bWVudCBzZXNzaW9uCiAgICBBLS0+PlNWOiBSZXR1cm4gc2Vzc2lvbiBkYXRhCiAgICBTVi0tPj5GOiBQYXNzIHNlc3Npb24gZGF0YQogICAgTm90ZSBvdmVyIEY6IDMuIEFkZCBvcHRpb25hbCBkb25hdGlvbiBjb25maWd1cmF0aW9uIGFuZCBpbml0aWFsaXplIENvbXBvbmVudAogICAgRi0+PlM6IDQuIENvbXBvbmVudCBzaG93cyBwYXltZW50IGZvcm0KICAgIFMtPj5GOiA1LiBTdWJtaXQgcGF5bWVudAogICAgTm90ZSBvdmVyIEY6IDYuIENvbXBvbmVudCBoYW5kbGVzIHBheW1lbnQgZmxvdwogICAgRi0+PkE6IENvbXBvbmVudCBzZW5kcyBwYXltZW50IGRhdGEKICAgIE5vdGUgb3ZlciBBOiA3LiBDaGVjayBmb3IgYWN0aXZlIGRvbmF0aW9uIGNhbXBhaWduCiAgICBBLS0+PkY6IFNlc3Npb24gcmVzdWx0IGFuZCBkb25hdGlvbiBjYW1wYWlnbiBkYXRhCiAgICBvcHQgSWYgeW91IGhhdmUgYWN0aXZlIGRvbmF0aW9uIGNhbXBhaWduCiAgICAgICAgRi0+PlM6IDguIENvbXBvbmVudCBzaG93cyBkb25hdGlvbiBmb3JtCiAgICAgICAgUy0+PkY6IDkuIERvbmF0ZSBvciBkZWNsaW5lCiAgICAgICAgTm90ZSBvdmVyIEY6IDEwLiBDb21wb25lbnQgaGFuZGxlcyBkb25hdGlvbiBmbG93CiAgICAgICAgRi0+PkE6IENvbXBvbmVudCBzZW5kcyBkb25hdGlvbiBkYXRhCiAgICAgICAgQS0tPj5GOiAxMS4gRG9uYXRpb24gcmVzdWx0IAogICAgICAgIEEtPj5XOiAxMi4gV2ViaG9vayBtZXNzYWdlIHdpdGggZG9uYXRpb24gb3V0Y29tZQogICAgZW5kCiAgICBBLT4+VzogMTMuIFdlYmhvb2sgbWVzc2FnZSB3aXRoIHBheW1lbnQgb3V0Y29tZSAKAdd Giving configuration\nWhen you create a global configuration object for the Component, you can optionally add configuration for donations.\nTo receive donation results and customize behavior, add a donation object to your checkout configuration. The donation configuration is optional, but if you include it, you must include the event handlers to get donation outcomes on your client website.\nEvent handlers:\n\n\n\nProperty\nRequired\nDescription\n\n\n\n\nonDonationSuccess\n\nCalled when the donation is completed or the shopper declines to donate. Receives an object with didDonate: true or false.\n\n\nonDonationFailure\n\nCalled when an error occurs in the donation creation or when a donation fails.\n\n\n\nConfiguration parameters:\n\n\n\nProperty\nRequired\nDescription\n\n\n\n\nautoMount\n\nSpecifies if the Component automatically shows the donation form after a successful payment. Set to false to not automatically show the donation form after the payment is completed. You can show the donation form in a separate container by creating a new Donation Component instead. Default: true.\n\n\ndelay\n\nThe delay in milliseconds after a successful payment before the Component shows the donation form.\n\n\n\n\n    \n\nShow the donation form in a separate container\nBy default, the Component mounts the donation form in the same container as the original Component. To mount it in a different container:\n\nSet donation.autoMount to false.\nCreate a new Donation Component in the onPaymentCompleted callback, passing the reference to the DOM element that you want to mount the Component into.\n\n\n    \nGet the donation outcome\nYou can get the outcome of each donation in a webhook message. This enables you to inform shoppers by email or mobile messaging about their donation, provided you have the shopper's contact details.\nTo receive these webhook messages, enable the Adyen Giving merchant webhook, which includes eventCode: DONATION.\nFor a successful donation, the event contains:\n\nsuccess: true.\noriginalReference: use this value to associate the donation with the shopper's original transaction.\n\n\n    \nTest and go live\nBefore going live with your integration, use our test cards to test your integration.See also\n\n\n                    Sessions flow integration guide\n                \n                    Donations with Advanced flow\n                \n                    Webhooks\n                \n                    Giving on adyen.com\n                \n                    Monitor donations\n                \n","type":"page","locale":"en","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Donations using Giving","lvl3":"Integrate Adyen Giving with online payments","lvl4":"Donations with Sessions flow"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/online-payments","lvl2":"https:\/\/docs.adyen.com\/online-payments\/donations","lvl3":"https:\/\/docs.adyen.com\/online-payments\/donations\/integration-options","lvl4":"\/online-payments\/donations\/integration-options\/sessions-flow"},"levels":5,"category":"Online Payments","category_color":"green","tags":["Web","Components"]}]}
