Amazon Simple Pay
Getting Started Guide (API Version 2010-08-28)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Creating a Basic Donation Button

If you are a non-profit organization, you can use Amazon Simple Pay to add a donation button to your website. Amazon Simple Pay donation buttons are an easy-to-use and secure way for US-based, IRS-certified 501(c)3 non-profit organizations to solicit donations. You can set a fixed or minimum amount, or let donors choose an amount, starting with as little as $1.00. Donations are charged to the donor's payment instrument and sent to the non-profit organization immediately.

[Note]Note

With the Amazon Simple Pay donation button you also have the option of enabling the marketplace feature, so that you as a third party can host the donation site for an organization and optionally collect a marketplace fee for this service. If you do want to use the marketplace feature of a donation button, see Creating a Marketplace-Enabled Donation Button instead.

When you create your account, we verify the tax-exempt status and respond to you by email. If your organization is eligible, you can begin using Amazon Simple Pay donation buttons to collect donations on your own behalf within 1-2 business days.

[Note]Note

Amazon Simple Pay donation buttons are intended to benefit US-based, IRS-certified 501(c)3 non-profit organizations. The Amazon Payments business account you use must be a Non-Profit Organization account type. To set this, go to https://payments.amazon.com, sign in, and navigate to Your Account tab, Edit My Account Settings page.

In this section you learn how to create an Amazon Simple Pay donation button and insert it on your web page.

How to Generate the HTML for a Donation Button

The following procedure guides you through generating the HTML for donation button.

[Important]Important

We strongly recommend that you create and test all of your requests in the sandbox before exposing them on your website. For more information, see Testing Your Simple Pay Buttons

To create the HTML for a donation button

[Note]Note

You can set many of the fields in the form to default values using your seller preferences. For more information, see Configuring Default Button Values.

  1. Go to http://payments.amazon.com and log into your Amazon Payments Business Account. For more information, see Before You Begin.

  2. From here, go to https://payments.amazon.com/sdui/sdui/donationbutton to show the Amazon Simple Pay > Donations page, which contains the following form for you to fill in.

    [Note]Note

    To create a button in the sandbox, go to https://payments-sandbox.amazon.com/sdui/sdui/donationbutton instead.

  3. Use the following table to fill in the entry fields.

    [Tip]Tip

    You can also hold the mouse pointer over most fields of the online form to display usage tips in the right side of the form.

    FieldAction
    Amount

    Select the amount type and enter the amount, where appropriate.

    • Any Amount allows the donor to specify any amount.

    • Minimum Amount requires the donor to contribute at least this amount.

      For example, if you specify $10, the donor must contribute at least $10 in order to complete the form.

      Corresponds to the minimumDonationAmount field in the button html.

    • Fixed Amount lets the donor contribute only the specified amount. If you specify $10, the donor must contribute exactly $10.

    Reason for donation

    Enter a purpose for the donation

    Corresponds to the description field in the button html.

    Reference

    Optionally enter an ID for your records that will uniquely identify the donation.

    Corresponds to the referenceId field in the button html.

    Return URL

    Optionally enter the URL where contributors should be redirected after completing the donation payment.

    This field overrides the setting in Your Account > Edit My Account Settings > Manage Developer and Seller Preferences, as described in How to Configure Default Button Values..

    Corresponds to the returnUrl field in the button html.

    User Abandon URL

    Optionally enter the URL where contributors should be redirected if they cancel their donation.

    This field overrides the setting in Your Account > Edit My Account Settings > Manage Developer and Seller Preferences, as described in How to Configure Default Button Values..

    Corresponds to the abandonUrl field in the button html.

    URL for Instant Payment Notification (IPN)

    Optionally, type the URL of your host page to which Amazon Payments should send the IPN transaction information. This is an advanced feature. For more information, see Using Instant Payment Notification.For more information, see Using Instant Payment Notification.

    This field overrides the setting in Your Account > Edit My Account Settings > Manage Developer and Seller Preferences, as described in How to Configure Default Button Values..

    Corresponds to the ipnUrl field in the button html.

    Immediate Return

    Optionally, if you want to skip the final status page in Amazon Payments, select this check box. If you select this option, you can parse the return values and display a final status page to the user yourself. This is an advanced feature. For more information, see Using Immediate Return.

    Corresponds to the immediateReturn field in the button html.

    Collect the shipping address?

    If you want Amazon Payments to return the subscriber's shipping address as part of the transaction information, select this check box.

    Corresponds to the collectShippingAddress field in the button html.

    Do you want to enable marketplace feature?

    Leave this check box cleared to create a basic donation button. For detailed information on properly enabling the marketplace feature for a donation button, see Creating a Marketplace-Enabled Donation Button

    Your website backgroundSelect the type of button background you need. The white option sets a white background. The color option produces a button with a transparent background (that is, your website theme colors will show).
    Button Type

    Select the button image that you want to appear on your website.

    Corresponds to the src attribute for the image in the button html.

  4. Click Generate HTML. Amazon Payments produces the HTML form for the donation button, and displays it in the text area underneath the Generate HTML button. Typical HTML for a standard button is shown in Donation Button HTML Components

    Copy the HTML and paste it in the appropriate page on your website. It will be displayed on the web page as a Donate button.

You can begin using your new button immediately. However, Amazon recommends you test every button before deploying it to production. A testing environment, the Amazon Payments sandbox, is provided for you to test any of the button types. To learn how to test your buttons, see Testing Your Simple Pay Buttons

[Important]Important

You are notified each time a contributor starts a donation. For more information, see Getting Notification about Your Payments.

Donation Button HTML Components

Here is a sample of an HTML form generated for a donation button.

<form action="https://authorize.payments.amazon.com/pba/paypipeline"
    method="POST">
    <input 
        type="image" 
        src=
"https://authorize.payments.amazon.com/pba/images/GSDonationWithLogo.png"
        border="0">
    <input 
        type="hidden" name="immediateReturn" value="1" >
    <input 
        type="hidden" name="collectShippingAddress" value="1" >
    <input 
        type="hidden" name="accessKey" value="YourAccessKeyId" >
    <input 
        type="hidden" name="minimumDonationAmount" value="USD 50" >
    <input 
        type="hidden" name="referenceId" value="MyTransaction-001" >
    <input 
        type="text" name="amount" size="8" value="50" >
    <input 
        type="hidden" name="isDonationWidget" value="1" >
    <input 
        type="hidden" name="fixedMarketplaceFee" value="" >
    <input 
        type="hidden" name="description" value="City Mission" >
    <input 
        type="hidden" name="ipnUrl" 
        value="http://yourwebsite.com/instantpaymentnotification" >
    <input 
        type="hidden" name="returnUrl" 
        value="http://yourwebsite.com/success" >
    <input 
        type="hidden" name="processImmediate" value="1" >
    <input 
        type="hidden" name="cobrandingStyle" value="logo" >
    <input 
        type="hidden" name="abandonUrl" 
        value="http://yourwebsite.com/abandon">
    <input 
        type="hidden" name="signature" 
        value="JL9k2iY4H2IQ0A+2zvFi31zLnPmOFEfMwzpLYG0Rao8=" >
    <input 
        type="hidden" name="signatureVersion" value="2" >
    <input 
        type="hidden" name="signatureMethod" value="HmacSHA256" >
</form>

Test Your Simple Pay Donation Button

Amazon Simple Pay provides a testing environment, the Amazon Payments Sandbox, for testing the buttons you create. Using the sandbox you can try out your applications without incurring charges or making purchases. We strongly recommend that you create and test all of your requests in the sandbox before exposing them on your website.

All the simple pay buttons are tested in the same way, and you can test a button whether you plan to use it in your website or not. To learn how to all test Amazon Simple Pay buttons, see Testing Your Simple Pay Buttons

Advanced Donation Button Features

Within this section, we present the following advanced topics in passing which are not required to implement basic features. Please refer to the sections for detailed information.

In the preceding procedure you worked with the features of the donation button that are quickest to build. There are many other features of Amazon Simple Pay and the Amazon Flexible Payments Service that can make your website more sophisticated and usable. Some of the topics which may be of interest to you are:

  • Customizing Amazon Simple Pay Buttons

  • Simulating Amazon Simple Pay Button Errors

  • Adding Amazon Simple Pay as an Additional Payment Option

  • Programmatic APIs for canceling, settling, and refunding transactions, as well as getting a transaction status, and verifying signatures in Return URL and IPN notifications.

  • Configuring Instant Payment Notification and Handling Instant Payment Notifications

  • Using Amazon Simple Pay Actions

To learn how to do some of these tasks, see the Amazon Simple Pay Advanced User Guide, For complete details on the capabilities of Amazon Simple Pay, please see the suggested documentation listed in Amazon Simple Pay Resources