{"title":"Donations","category":"default","creationDate":1781186417,"content":"<p>Adyen Giving is our donations feature. It lets your shoppers donate to a nonprofit as part of your payment flow. If the shopper chooses to make a donation, the donation amount is charged to the same payment method that was used for the original transaction. Drop-in handles the donation flow, including showing the donation campaign and processing the donation. <\/p>\n<h2>Requirements<\/h2>\n<p>In addition to the <a href=\"\/online-payments\/donations#requirements\">general Adyen Giving requirements<\/a>, take into account the following requirements.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">A standard payments integration with Drop-in.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/account\/user-roles\">Customer Area roles<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have the <strong><a href=\"\/account\/user-roles\/#manage-donation-campaigns\">Donation campaigns manager<\/a><\/strong> role.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/development-resources\/webhooks\">Webhooks<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">Subscribe to the following webhooks: <ul><li markdown=\"1\">Standard webhooks<\/li><li markdown=\"1\"><a href=\"\/development-resources\/webhooks\/webhook-types\/#other-webhooks\">Adyen Giving merchant webhook<\/a><\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\">Before you begin: <ul><li markdown=\"1\">Make sure you meet all the <a href=\"\/online-payments\/donations#requirements\">requirements for Adyen Giving<\/a>.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<ol>\n<li>The shopper goes to the checkout page.<\/li>\n<li>Your server <a href=\"\/online-payments\/build-your-integration\/sessions-flow\/?platform=Web&amp;integration=Drop-in#create-a-payment-session\">creates a payment session<\/a>. You do not need to pass any donation-specific parameters in your request to create a payment session.<\/li>\n<li>When you create a <a href=\"\/online-payments\/build-your-integration\/sessions-flow\/?platform=Web&amp;integration=Drop-in#configure\">global configuration object for <code>AdyenCheckout<\/code><\/a>, optionally <a href=\"#add-giving-configuration\">add a configuration object for donations<\/a>.<\/li>\n<li>Drop-in shows the payment form.<\/li>\n<li>The shopper submits the payment on your checkout page.<\/li>\n<li>Drop-in handles the payment flow.<\/li>\n<li>If the payment is successful, Drop-in checks if you have an active donation campaign in your Adyen Customer Area.<\/li>\n<li>If you have an active donation campaign, Drop-in shows the donation form.<\/li>\n<li>The shopper chooses to donate or declines.<\/li>\n<li>Drop-in handles the donation flow.<\/li>\n<li><a href=\"#get-the-donation-outcome\">Get the donation result<\/a> from the <code>donation.onDonationSuccess<\/code> callback.<\/li>\n<li>Adyen sends a webhook message with the donation outcome.<\/li>\n<li>Adyen sends a webhook message with the payment outcome.<\/li>\n<\/ol>\n<div id=\"mermaid-6a2ac62fc6a3b-wrapper\"><div id=\"mermaid-6a2ac62fc6a3b\" class=\"mermaid-shortcode loading\">CnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgUyBhcyBTaG9wcGVyCiAgICBwYXJ0aWNpcGFudCBGIGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNWIGFzIFlvdXIgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBIGFzIEFkeWVuCiAgICBwYXJ0aWNpcGFudCBXIGFzIFlvdXIgd2ViaG9vayBzZXJ2ZXIKCiAgICBTLT4+RjogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgU1YtPj5BOiAyLiBDcmVhdGUgcGF5bWVudCBzZXNzaW9uCiAgICBBLS0+PlNWOiBSZXR1cm4gc2Vzc2lvbiBkYXRhCiAgICBTVi0tPj5GOiBQYXNzIHNlc3Npb24gZGF0YQogICAgTm90ZSBvdmVyIEY6IDMuIEFkZCBvcHRpb25hbCBkb25hdGlvbiBjb25maWd1cmF0aW9uIGFuZCBpbml0aWFsaXplIERyb3AtaW4KICAgIEYtPj5TOiA0LiBEcm9wLWluIHNob3dzIHBheW1lbnQgZm9ybQogICAgUy0+PkY6IDUuIFN1Ym1pdCBwYXltZW50CiAgICBOb3RlIG92ZXIgRjogNi4gRHJvcC1pbiBoYW5kbGVzIHBheW1lbnQgZmxvdwogICAgRi0+PkE6IERyb3AtaW4gc2VuZHMgcGF5bWVudCBkYXRhCiAgICBOb3RlIG92ZXIgQTogNy4gQ2hlY2sgZm9yIGFjdGl2ZSBkb25hdGlvbiBjYW1wYWlnbgogICAgQS0tPj5GOiBTZXNzaW9uIHJlc3VsdCBhbmQgZG9uYXRpb24gY2FtcGFpZ24gZGF0YQogICAgb3B0IElmIHlvdSBoYXZlIGFjdGl2ZSBkb25hdGlvbiBjYW1wYWlnbgogICAgICAgIEYtPj5TOiA4LiBEcm9wLWluIHNob3dzIGRvbmF0aW9uIGZvcm0KICAgICAgICBTLT4+RjogOS4gRG9uYXRlIG9yIGRlY2xpbmUKICAgICAgICBOb3RlIG92ZXIgRjogMTAuIERyb3AtaW4gaGFuZGxlcyBkb25hdGlvbiBmbG93CiAgICAgICAgRi0+PkE6IERyb3AtaW4gc2VuZHMgZG9uYXRpb24gZGF0YQogICAgICAgIEEtLT4+RjogMTEuIERvbmF0aW9uIHJlc3VsdCAKICAgICAgICBBLT4+VzogMTIuIFdlYmhvb2sgbWVzc2FnZSB3aXRoIGRvbmF0aW9uIG91dGNvbWUKICAgIGVuZAogICAgQS0+Plc6IDEzLiBXZWJob29rIG1lc3NhZ2Ugd2l0aCBwYXltZW50IG91dGNvbWUgCg==<\/div><\/div>\n<h2 id=\"add-giving-configuration\">Add Giving configuration<\/h2>\n<p>When you create a <a href=\"\/standard\/integration\/drop-in\/#configure\">global configuration object for Drop-in<\/a>, you add configuration for donations to enable the feature.<\/p>\n<p>Event handlers:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Property<\/th>\n<th style=\"text-align: left;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>onDonationSuccess<\/code><\/td>\n<td style=\"text-align: left;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">Called when the donation is completed or the shopper declines to donate. Receives an object with <code>didDonate<\/code>: <strong>true<\/strong> or <strong>false<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>onDonationFailure<\/code><\/td>\n<td style=\"text-align: left;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">Called when an error occurs in the donation creation or when a donation fails.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Configuration parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Property<\/th>\n<th style=\"text-align: left;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>autoMount<\/code><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\">Specifies if Drop-in automatically shows the donation form after a successful payment. Set to <strong>false<\/strong> to not show the donation form after the payment is completed. Default: <strong>true<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>delay<\/code><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\">The delay in milliseconds after a successful payment before Drop-in shows the donation form.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example global configuration with donation callbacks'\" :id=\"''\" :code-data='[{\"language\":\"js\",\"tabTitle\":\"\",\"content\":\"const globalConfiguration = {\\n    session: {\\n        id: sessionId,\\n        sessionData: sessionData\\n    },\\n    \\\/\\\/ ...Other configuration.\\n    donation: {\\n        onDonationSuccess: (result) =&gt; {\\n            if (result.didDonate) {\\n                console.log(\\\"Shopper donated\\\");\\n            } else {\\n                console.log(\\\"Shopper declined to donate\\\");\\n            }\\n        },\\n        onDonationFailure: (error) =&gt; {\\n            console.error(\\\"Donation error:\\\", error);\\n        }\\n    },\\n    onPaymentCompleted: (result, component) =&gt; {\\n        console.log(\\\"Payment completed:\\\", result);\\n    }\\n};\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>After a successful payment, if you have an active donation campaign configured, Drop-in shows the donation form. By default, the donation form is mounted in the same container as Drop-in.<\/p>\n<p>Drop-in handles the full donation flow, including:<\/p>\n<ul>\n<li>Showing the donation campaign details (nonprofit name, description, logo, and banner).<\/li>\n<li>Showing the donation amount options.<\/li>\n<li>Processing the donation.<\/li>\n<\/ul>\n<h2 id=\"get-the-donation-outcome\">Get the donation outcome<\/h2>\n<p>After Drop-in finishes the payment flow, you can inform the shopper about the current payment status. <\/p>\n<h3 id=\"inform-the-shopper\">Inform the shopper<\/h3>\n<p>Depending on whether the donation was successful, the <code>onDonationSuccess<\/code> or <code>onDonationFailure<\/code> event is triggered. From the relevant event, you can get the <code>result<\/code> object to inform the shopper.<\/p>\n<h3>Get the webhook message<\/h3>\n<p>You also get the outcome of each donation in a webhook message. <\/p>\n<p>For a successful donation, the event contains:<\/p>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>eventCode<\/code><\/td>\n<td><span translate='no'><strong>DONATION<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>success<\/code><\/td>\n<td><span translate='no'><strong>true<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>originalReference<\/code><\/td>\n<td>Use this value to associate the donation with the shopper's original transaction.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example webhook message for a successful donation'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"live\\\": \\\"false\\\",\\n  \\\"notificationItems\\\": [\\n    {\\n      \\\"NotificationRequestItem\\\": {\\n        \\\"additionalData\\\": {\\n          \\\"originalMerchantAccountCode\\\": \\\"ADYEN_MERCHANT_ACCOUNT\\\"\\n        },\\n        \\\"amount\\\": {\\n          \\\"currency\\\": \\\"EUR\\\",\\n          \\\"value\\\": 500\\n        },\\n        \\\"originalReference\\\": \\\"V4HZ4RBFJGXXGN82\\\",\\n        \\\"eventCode\\\": \\\"DONATION\\\",\\n        \\\"eventDate\\\": \\\"2022-07-07T13:18:13+02:00\\\",\\n        \\\"merchantAccountCode\\\": \\\"CHARITY_DONATION_ACCOUNT\\\",\\n        \\\"merchantReference\\\": \\\"YOUR_DONATION_REFERENCE\\\",\\n        \\\"paymentMethod\\\": \\\"visa\\\",\\n        \\\"pspReference\\\": \\\"Z58FGTKBRCQ2WN27\\\",\\n        \\\"reason\\\": \\\"033899:1111:03\\\/2030\\\",\\n        \\\"success\\\": \\\"true\\\"\\n      }\\n    }\\n  ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Test and go live<\/h2>\n<p>Before you go live with donations, test your integration to make sure that your nonprofit receives the donations from your shoppers. We recommend to test your integration in the <a href=\"#test-environment\">test environment<\/a>, and <a href=\"#live-environment\">live environment<\/a>. In each environment, test the following:<\/p>\n<ol>\n<li>Creating and activating a donation campaign.<\/li>\n<li>Making a donation.<\/li>\n<li>Getting the donation outcome in the <a href=\"\/development-resources\/webhooks\/webhook-types\/#other-webhooks\">webhook message (Adyen Giving merchant webhook)<\/a>.<\/li>\n<\/ol>\n<h3>Test environment<\/h3>\n<h4>Create and activate a test donation campaign<\/h4>\n<ol>\n<li>In your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">test Customer Area<\/a>, go to <strong>Giving<\/strong> &gt; <strong>Campaigns<\/strong>.<\/li>\n<li><a href=\"\/online-payments\/donations\/#managing-donation-campaigns\">Create a test campaign<\/a> using one of our demo nonprofits.<\/li>\n<li>Select <strong>Start campaign<\/strong> for the campaign you configured to:\n<ul>\n<li>Activate the campaign.<\/li>\n<li>Start receiving the <code>donationToken<\/code> in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> or  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> responses.<\/li>\n<\/ul><\/li>\n<\/ol>\n<h4>Make a test donation<\/h4>\n<div class=\"notices green\">\n<p>To test donations using iDEAL, contact our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a> for additional configuration.<\/p>\n<\/div>\n<p>After you have started a campaign, verify that the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> or  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> response contains a <code>donationToken<\/code>.<\/p>\n<p>When you make a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/donationCampaigns\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/donationCampaigns<\/a> request, verify that the details returned in the response are correct.<\/p>\n<p>Using your integration, make test donations using our <a href=\"#test-cards\">test cards<\/a>.<\/p>\n<h4>Get the test donation outcome<\/h4>\n<p>For each test donation that you make, verify that you get a <a href=\"\/development-resources\/webhooks\/webhook-types\/#other-webhooks\">webhook message<\/a>.<\/p>\n<h3>Live environment<\/h3>\n<h4>Create and activate a live donation campaign<\/h4>\n<ol>\n<li>In your Live <a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>, go to <strong>Giving<\/strong> &gt; <strong>Campaigns<\/strong>.\n<div class=\"notices green\">\n<p>If you do not see <strong>Giving<\/strong> section in your Customer Area, reach out to your Adyen contact or our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a>.<\/p>\n<\/div><\/li>\n<li><a href=\"\/online-payments\/donations\/#managing-donation-campaigns\">Create a campaign<\/a> for your nonprofit.<\/li>\n<li>Select <strong>Start campaign<\/strong> for the campaign you configured to:\n<ul>\n<li>Activate the campaign.<\/li>\n<li>Start receiving the <code>donationToken<\/code> in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> or  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> responses.<\/li>\n<\/ul><\/li>\n<\/ol>\n<h4>Enable the webhook for the live environment<\/h4>\n<p>In your live <a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>, enable the <a href=\"\/development-resources\/webhooks\/webhook-types\/#other-webhooks\">Adyen Giving merchant webhook<\/a>.<\/p>\n<h4>Make donations for your live campaign<\/h4>\n<p>After you have started a campaign, verify that the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> or  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> response contains a <code>donationToken<\/code>.<\/p>\n<p>When you make a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/donationCampaigns\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/donationCampaigns<\/a> request, verify that the details returned in the response are correct.<\/p>\n<p>Using your integration, make a donation to your nonprofit.<\/p>\n<h4>Get the donation outcome<\/h4>\n<p>You can verify the outcome of the donation by either:<\/p>\n<ul>\n<li>Getting the webhook message for your donation.<\/li>\n<li>Finding the donation in a <a href=\"\/reporting\/monitor-donations\">Giving report or dashboard<\/a>.<\/li>\n<\/ul>\n<h2>Troubleshooting<\/h2>\n<p>If an issue occurs with your test donation requests, you can find more details in the <a href=\"\/development-resources\/logs-resources\/api-logs\/\">API logs<\/a>.<\/p>\n<h2 id=\"test-cards\">Test cards for donations<\/h2>\n<p>You can use the test card details below to make test donations.<\/p>\n<table>\n<thead>\n<tr>\n<th>Card Number<\/th>\n<th>Card Type<\/th>\n<th>Issuing Country\/region<\/th>\n<th>Expiry Date<\/th>\n<th>CVC<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>3700 0000 0000 002<\/td>\n<td>American Express<\/td>\n<td>NL<\/td>\n<td>03\/2030<\/td>\n<td>7373<\/td>\n<\/tr>\n<tr>\n<td>3700 0000 0100 018<\/td>\n<td>American Express<\/td>\n<td>NL<\/td>\n<td>03\/2030<\/td>\n<td>7373<\/td>\n<\/tr>\n<tr>\n<td>5555 3412 4444 1115<\/td>\n<td>Mastercard Consumer<\/td>\n<td>NL<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<tr>\n<td>5201 2820 5004 2993<\/td>\n<td>Mastercard<\/td>\n<td>RU<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<tr>\n<td>5454 5464 9832 4682<\/td>\n<td>Mastercard<\/td>\n<td>PL<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<tr>\n<td>2223 5204 4356 0010<\/td>\n<td>Mastercard Debit<\/td>\n<td>NL<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<tr>\n<td>5103 2219 1119 9245<\/td>\n<td>Mastercard Prepaid<\/td>\n<td>BR<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<tr>\n<td>3569 9900 1009 5841<\/td>\n<td>JCB<\/td>\n<td>US<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<tr>\n<td>6011 6011 6011 6611<\/td>\n<td>Discover<\/td>\n<td>US<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<tr>\n<td>6445 6445 6445 6445<\/td>\n<td>Discover<\/td>\n<td>GB<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<tr>\n<td>6445 6445 6445 6445<\/td>\n<td>Carte Bancaire<\/td>\n<td>FR<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<tr>\n<td>4871 0499 9999 9910<\/td>\n<td>Bancontact<\/td>\n<td>BE<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The following test card doesn't require the CVC when entering the card details. You must use this card to test Visa payments.<\/p>\n<table>\n<thead>\n<tr>\n<th>Card Number<\/th>\n<th>Card Type<\/th>\n<th>Issuing Country\/region<\/th>\n<th>Expiry Date<\/th>\n<th>CVC<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>4111 1111 4555 1142<\/td>\n<td>Visa<\/td>\n<td>NL<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Test 3D Secure 2 authentication with donations<\/h3>\n<p>The following test cards are enrolled in 3D Secure 2.<\/p>\n<table>\n<thead>\n<tr>\n<th>Card Number<\/th>\n<th>Card Type<\/th>\n<th>Issuing Country\/region<\/th>\n<th>Expiry Date<\/th>\n<th>CVC<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>3714 4963 5398 431<\/td>\n<td>American Express<\/td>\n<td>US<\/td>\n<td>03\/2030<\/td>\n<td>7373<\/td>\n<\/tr>\n<tr>\n<td>6011 1111 1111 1117<\/td>\n<td>Discover<\/td>\n<td>US<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<tr>\n<td>5111 1200 3000 8958<\/td>\n<td>Mastercard<\/td>\n<td>NL<\/td>\n<td>03\/2030<\/td>\n<td>737<\/td>\n<\/tr>\n<\/tbody>\n<\/table>","url":"https:\/\/docs.adyen.com\/standard\/integration\/drop-in\/donations","articleFields":{"description":"Accept donations with the Adyen Giving feature in your Drop-in integration."},"algolia":{"url":"https:\/\/docs.adyen.com\/standard\/integration\/drop-in\/donations","title":"Donations","content":"Adyen Giving is our donations feature. It lets your shoppers donate to a nonprofit as part of your payment flow. If the shopper chooses to make a donation, the donation amount is charged to the same payment method that was used for the original transaction. Drop-in handles the donation flow, including showing the donation campaign and processing the donation. \nRequirements\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\nA standard payments integration with Drop-in.\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: Make sure you meet all the requirements for Adyen Giving.\n\n\n\nHow it works\n\nThe shopper goes to the checkout page.\nYour server creates a payment session. You do not need to pass any donation-specific parameters in your request to create 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 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.\nAdyen sends a webhook message with the payment outcome.\n\nCnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgUyBhcyBTaG9wcGVyCiAgICBwYXJ0aWNpcGFudCBGIGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNWIGFzIFlvdXIgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBIGFzIEFkeWVuCiAgICBwYXJ0aWNpcGFudCBXIGFzIFlvdXIgd2ViaG9vayBzZXJ2ZXIKCiAgICBTLT4+RjogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgU1YtPj5BOiAyLiBDcmVhdGUgcGF5bWVudCBzZXNzaW9uCiAgICBBLS0+PlNWOiBSZXR1cm4gc2Vzc2lvbiBkYXRhCiAgICBTVi0tPj5GOiBQYXNzIHNlc3Npb24gZGF0YQogICAgTm90ZSBvdmVyIEY6IDMuIEFkZCBvcHRpb25hbCBkb25hdGlvbiBjb25maWd1cmF0aW9uIGFuZCBpbml0aWFsaXplIERyb3AtaW4KICAgIEYtPj5TOiA0LiBEcm9wLWluIHNob3dzIHBheW1lbnQgZm9ybQogICAgUy0+PkY6IDUuIFN1Ym1pdCBwYXltZW50CiAgICBOb3RlIG92ZXIgRjogNi4gRHJvcC1pbiBoYW5kbGVzIHBheW1lbnQgZmxvdwogICAgRi0+PkE6IERyb3AtaW4gc2VuZHMgcGF5bWVudCBkYXRhCiAgICBOb3RlIG92ZXIgQTogNy4gQ2hlY2sgZm9yIGFjdGl2ZSBkb25hdGlvbiBjYW1wYWlnbgogICAgQS0tPj5GOiBTZXNzaW9uIHJlc3VsdCBhbmQgZG9uYXRpb24gY2FtcGFpZ24gZGF0YQogICAgb3B0IElmIHlvdSBoYXZlIGFjdGl2ZSBkb25hdGlvbiBjYW1wYWlnbgogICAgICAgIEYtPj5TOiA4LiBEcm9wLWluIHNob3dzIGRvbmF0aW9uIGZvcm0KICAgICAgICBTLT4+RjogOS4gRG9uYXRlIG9yIGRlY2xpbmUKICAgICAgICBOb3RlIG92ZXIgRjogMTAuIERyb3AtaW4gaGFuZGxlcyBkb25hdGlvbiBmbG93CiAgICAgICAgRi0+PkE6IERyb3AtaW4gc2VuZHMgZG9uYXRpb24gZGF0YQogICAgICAgIEEtLT4+RjogMTEuIERvbmF0aW9uIHJlc3VsdCAKICAgICAgICBBLT4+VzogMTIuIFdlYmhvb2sgbWVzc2FnZSB3aXRoIGRvbmF0aW9uIG91dGNvbWUKICAgIGVuZAogICAgQS0+Plc6IDEzLiBXZWJob29rIG1lc3NhZ2Ugd2l0aCBwYXltZW50IG91dGNvbWUgCg==\nAdd Giving configuration\nWhen you create a global configuration object for Drop-in, you add configuration for donations to enable the feature.\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 you have an active donation campaign configured, Drop-in shows the donation form. By default, the donation form is mounted in the same container as Drop-in.\nDrop-in handles the full donation flow, including:\n\nShowing the donation campaign details (nonprofit name, description, logo, and banner).\nShowing the donation amount options.\nProcessing the donation.\n\nGet the donation outcome\nAfter Drop-in finishes the payment flow, you can inform the shopper about the current payment status. \nInform the shopper\nDepending on whether the donation was successful, the onDonationSuccess or onDonationFailure event is triggered. From the relevant event, you can get the result object to inform the shopper.\nGet the webhook message\nYou also get the outcome of each donation in a webhook message. \nFor a successful donation, the event contains:\n\n\n\nField\nDescription\n\n\n\n\neventCode\nDONATION\n\n\nsuccess\ntrue\n\n\noriginalReference\nUse this value to associate the donation with the shopper's original transaction.\n\n\n\n\n    \n\nTest and go live\nBefore you go live with donations, test your integration to make sure that your nonprofit receives the donations from your shoppers. We recommend to test your integration in the test environment, and live environment. In each environment, test the following:\n\nCreating and activating a donation campaign.\nMaking a donation.\nGetting the donation outcome in the webhook message (Adyen Giving merchant webhook).\n\nTest environment\nCreate and activate a test donation campaign\n\nIn your test Customer Area, go to Giving &gt; Campaigns.\nCreate a test campaign using one of our demo nonprofits.\nSelect Start campaign for the campaign you configured to:\n\nActivate the campaign.\nStart receiving the donationToken in the  \/payments or  \/payments\/details responses.\n\n\nMake a test donation\n\nTo test donations using iDEAL, contact our Support Team for additional configuration.\n\nAfter you have started a campaign, verify that the  \/payments or  \/payments\/details response contains a donationToken.\nWhen you make a  \/donationCampaigns request, verify that the details returned in the response are correct.\nUsing your integration, make test donations using our test cards.\nGet the test donation outcome\nFor each test donation that you make, verify that you get a webhook message.\nLive environment\nCreate and activate a live donation campaign\n\nIn your Live Customer Area, go to Giving &gt; Campaigns.\n\nIf you do not see Giving section in your Customer Area, reach out to your Adyen contact or our Support Team.\n\nCreate a campaign for your nonprofit.\nSelect Start campaign for the campaign you configured to:\n\nActivate the campaign.\nStart receiving the donationToken in the  \/payments or  \/payments\/details responses.\n\n\nEnable the webhook for the live environment\nIn your live Customer Area, enable the Adyen Giving merchant webhook.\nMake donations for your live campaign\nAfter you have started a campaign, verify that the  \/payments or  \/payments\/details response contains a donationToken.\nWhen you make a  \/donationCampaigns request, verify that the details returned in the response are correct.\nUsing your integration, make a donation to your nonprofit.\nGet the donation outcome\nYou can verify the outcome of the donation by either:\n\nGetting the webhook message for your donation.\nFinding the donation in a Giving report or dashboard.\n\nTroubleshooting\nIf an issue occurs with your test donation requests, you can find more details in the API logs.\nTest cards for donations\nYou can use the test card details below to make test donations.\n\n\n\nCard Number\nCard Type\nIssuing Country\/region\nExpiry Date\nCVC\n\n\n\n\n3700 0000 0000 002\nAmerican Express\nNL\n03\/2030\n7373\n\n\n3700 0000 0100 018\nAmerican Express\nNL\n03\/2030\n7373\n\n\n5555 3412 4444 1115\nMastercard Consumer\nNL\n03\/2030\n737\n\n\n5201 2820 5004 2993\nMastercard\nRU\n03\/2030\n737\n\n\n5454 5464 9832 4682\nMastercard\nPL\n03\/2030\n737\n\n\n2223 5204 4356 0010\nMastercard Debit\nNL\n03\/2030\n737\n\n\n5103 2219 1119 9245\nMastercard Prepaid\nBR\n03\/2030\n737\n\n\n3569 9900 1009 5841\nJCB\nUS\n03\/2030\n737\n\n\n6011 6011 6011 6611\nDiscover\nUS\n03\/2030\n737\n\n\n6445 6445 6445 6445\nDiscover\nGB\n03\/2030\n737\n\n\n6445 6445 6445 6445\nCarte Bancaire\nFR\n03\/2030\n737\n\n\n4871 0499 9999 9910\nBancontact\nBE\n03\/2030\n737\n\n\n\nThe following test card doesn't require the CVC when entering the card details. You must use this card to test Visa payments.\n\n\n\nCard Number\nCard Type\nIssuing Country\/region\nExpiry Date\nCVC\n\n\n\n\n4111 1111 4555 1142\nVisa\nNL\n03\/2030\n737\n\n\n\nTest 3D Secure 2 authentication with donations\nThe following test cards are enrolled in 3D Secure 2.\n\n\n\nCard Number\nCard Type\nIssuing Country\/region\nExpiry Date\nCVC\n\n\n\n\n3714 4963 5398 431\nAmerican Express\nUS\n03\/2030\n7373\n\n\n6011 1111 1111 1117\nDiscover\nUS\n03\/2030\n737\n\n\n5111 1200 3000 8958\nMastercard\nNL\n03\/2030\n737\n\n\n","type":"page","locale":"en","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Standard payments integration","lvl2":"Build your integration","lvl3":"Drop-in","lvl4":"Donations"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/standard","lvl2":"https:\/\/docs.adyen.com\/standard\/integration","lvl3":"https:\/\/docs.adyen.com\/standard\/integration\/drop-in","lvl4":"\/standard\/integration\/drop-in\/donations"},"levels":5,"category":"","category_color":"","tags":["Donations"]}}
