Accept donations for a nonprofit with the Giving API-only integration that gives you the flexibility to customize the donation flow. You build your own donation form to accept donations, and have full control of the style, visual elements, and user interface.
If the shopper chooses to make a donation, the donation transaction uses the same payment method that the shopper used to make the original payment.
With an API-only integration, you can accept donations for fixed amounts, or allow the shopper to round up their transaction amount as a donation. You can present the option to donate before or after the shopper completes the payment for the original transaction.
Requirements
Adyen Help
Our Giving section answers your questions about donations with Giving.
This page assumes you have already:
Before starting your Giving integration:
- Enable and integrate a supported payment method.
- Reach out to your Adyen contact to create a campaign.
- Use the Campaign Manager to set up your donation campaign preferences.
- Set up the Adyen Giving merchant webhook in your Customer Area.
How it works
The donation flow depends on the donation moment:
Step 1: Get details of your active donation campaigns
Depending on the donation moment that you choose, get the details of your active donation campaigns at either moment:
- When a shopper proceeds to pay for their original transaction with a payment method that supports donations.
- When a shopper completes their original transaction with a payment method that supports donations, and the /payments or /payments/details (for iDeal payments) response includes the donationToken field.
When you make a request to get your active donation campaigns, the response you receive depends on your donation type:
Step 2: Present the option to donate
Step 3: Make a donation
Depending on the donation moment for the campaign, you make a donation request at either time:
- Pre-checkout donation: you first make a /payments request. If the payment is authorized, and the /payments or /payments/details (for iDeal payments) response includes the donationToken field, you make a donation request.
- Post-checkout donation: you present the option to donate after the shopper completes the payment for their original transaction, you make a donation request and use the donationToken you received in the /payments or /payments/details (for iDeal payments) response.
Step 4: Get the donation outcome
You get the donation outcome for fixed amount and round-up donations in a webhook.
You get the donation outcome of each donation in a webhook. To receive these webhooks, enable the Adyen Giving merchant webhook, which includes eventCode
: DONATION.
For a successful donation, the event contains success
: true.
Use the originalReference
to associate the donation to the shopper's original transaction.
Test and go live
Before going live with your integration, use our test cards to test your integration.