Specifying Donation Amount in Custom Checkouts
Last week we released a small update to our custom checkout API that streamlines and offers additional flexibility to how you can define the donation amount. There are three ways now at your disposal.
- You can tell us the total amount
- You can tell us which donation level the user selected and we can determine the amount from your campaign’s donation level settings
- You can tell us the total amount AND the level the user selected.
Let’s Get Technical
The following is taken from our Donation Checkout documentation.
To determine the amount of the donation to be processed, you must either pass a
donation_total or a
donation_level_id. The following details various post cases and how they are handled.
- donation_total ONLY - If you post a
donation_totalonly, this is the the value that will be charged.
- donation_level_id ONLY - If you post a
donation_level_idonly, first we will check that the ID matches a level for the campaign you are posting to and if so it will charge the value that is associated with that level.
- donation_total AND donation_level_id - If you post both a
donation_totalwill be the value charged; however, we will also store the level information along with the donation record.
This case allows you to post a
donation_total that is greater than the level amount while still allowing for records to document that a specific level was chosen.