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. The third is my favorite!

«Back to Updates

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.

  1. You can tell us the total amount
  2. You can tell us which donation level the user selected and we can determine the amount from your campaign’s donation level settings
  3. You can tell us the total amount AND the level the user selected.

The second and third options are new and the third option is my favorite. Say for example you give a donor certain donation levels to choose from but you also want to offer him/her an opportunity to donate more than the value of the level. With a little Javascript fun and option 3 above you can totally do this. Specify the amount and tell us the level and we will charge the amount you want and record the level selected for record keeping. It’s a double win.

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.

  1. donation_total ONLY - If you post a donation_total only, this is the the value that will be charged.
  2. donation_level_id ONLY - If you post a donation_level_id only, 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.
  3. donation_total AND donation_level_id - If you post both a donation_total and adonation_level_id then the donation_total will 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.

blog comments powered by Disqus