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...

Overview of Advanced Features

As its name implies, this guide gets you up and running with Amazon Simple Pay. Within the sections, we present advanced features, which are not required to implement the buttons. This section provides more background for selected features to help you understand their role in Amazon Simple Pay.

Creating More than One Button per Page

Each button is set up for a certain amount of money and a certain description, so each button is limited to a single item for sale. Depending on your application, you may want to place more than one Amazon Simple Pay button on a page. You can have multiple Amazon Simple Pay buttons of each type on a page by adding them one at a time.

The number of buttons you have to add might influence whether you place them manually or programmatically.

QuantityTechnique
1 to 10 Items

If you have more than one item, but only a limited number of items for sale, you can create Amazon Simple Pay buttons one at a time using the same procedures in Creating Simple Pay Buttons. Be sure that the amount and the description for each button that you place on your web page is correct with respect to the intended item for sale.

More than 10 Items

If you have so many items that creating them singly is undesirable, you can generate all Amazon Simple Pay buttons programmatically and automatically place them on the web page.

Creating buttons programmatically is something you must do as a developer, which requires an Amazon Payments developer account. For more information, see the Amazon Simple Pay Advanced User Guide, as well as the Developer tab accessible through your Amazon Payments business account.

Settling Immediately

When you create an Amazon Simple Pay button, you have the choice of charging the buyer's payment instrument immediately or later, such as when a product is shipped. To charge a buyer immediately, make sure you select the Do you want to settle immediately? check box when you are creating the button. However, if you clear this check box, the buyer is not charged until you send a Settle request.

It's much simpler to allow Amazon Payments to settle immediately, but at times you will need to settle afterwards. You have two ways you can do this. The first way is to settle using the form available through your Amazon Payments business account. For information on using the form, see the following section, Using the Settle and Refund User Interfaces.

The second way to settle is to use code. However, to exercise programmatic control over your transactions, you must have an Amazon Payments Developer account. For more information, see "Settling and Refunding Transactions Programmatically" in the Amazon Simple Pay Advanced User Guide.

[Note]Note

You can only opt to settle later with standard, marketplace, and donation buttons.

Using the Settle and Refund User Interfaces

This section describes how to use the user interface to settle charges and make refunds. Settling and refunds go hand in hand, so both procedures are listed following.

Using the Settle User Interface

When you create a button, if the Do you want to settle immediately? check box is cleared, you will have to make any settlements that come up. You can manually settle a transaction using the Settle user interface, or programmatically using the Settle API. The one you choose typically depends upon the number of settlements you need to make. The more settlements you need to make, the more likely you'll prefer to do so programmatically. For more information, see Settling and Refunding Transactions Programmatically in the Amazon Simple Pay Advanced User Guide.

If you have relatively few settlements to make, use the following procedure.

To settle a transaction using the Amazon Payments UI

  1. Go to https://payments.amazon.com/.

  2. Click the Your Account tab.

  3. In the Account Activity section of the Your Account tab, search for the transaction you want to settle.

  4. Click the Settle button associated with the transaction that you reserved.

  5. Enter the amount you want to settle and click Confirm.

Using the Refund User Interface

Along with settling, Amazon Simple Pay offers you the opportunity to manually refund money either by using the Refund user interface, or programmatically using the Refund API. The one you choose typically depends upon the number of refunds you need to make. For more information on programmatic refunding, see Settling and Refunding Transactions Programmatically in the Amazon Simple Pay Advanced User Guide.

To refund a transaction using the user interface

  1. If the transaction was reserved, settle it using the procedure described in the previous procedure, Using the Settle User Interface.

  2. Go to https://payments.amazon.com/.

  3. In the Account Activity section of the Your Account tab, search for the transaction you want to refund.

  4. Click the Details link for the transaction you want to refund.

  5. Enter the amount you want to refund and click Refund associated with the transaction.

Refunds are processed in batch so they often take a while before completing.

[Important]Important

Only the recipients of payments can use the Amazon Payments user interface to make refunds. Recipients, however, cannot refund a marketplace fee (if any) that was charged by a marketplace developer. The marketplace developer must use a programmatic Refund request to refund the marketplace fees he or she collected. For more information, see Settling and Refunding Transactions Programmatically in the Amazon Simple Pay Advanced User Guide.

Handling the Return URL

When a user clicks an Amazon Simple Pay button you have included on your web page, control is transferred to Amazon Payments. Once the payment has been authorized, the user is redirected to your return URL. Included in the redirection are transaction details about the purchase just made.

You can choose to ignore the information contained within the return URL, because you are also notified of this information through other methods. However, if you want to process the transaction information in a custom way immediately, you must work as a developer and write custom code.

To learn about using the Return URL to validate and process payment response, the values it returns, and validating the returnUrl signatures, see Handling Button Response Data in the Amazon Simple Pay Advanced User Guide. The Advanced Guide also has information on getting a developer account in the section, Amazon Payments Developer Account.

For more information on the types of notification Amazon Simple Pay provides, see Getting Notification about Your Payments.

Using Immediate Return

When a user clicks an Amazon Simple Pay button you have included on your web page, control is transferred to Amazon payments. Typically the user goes through a number of actions, such as include signing up and signing in. Once the payment has been authorized, the last thing Amazon does before the user is redirected to your Return URL is to display an Amazon Thank You page which details the purchase the buyer just made. A Continue button is provided to navigate to your Return URL.

Each Simple Pay button provides you with the choice to skip this final Amazon Payments status page, redirecting to your Return URL right away. In this case, if you want to display any information typically presented to the buyer on the Amazon Payments final status page, your Return URL page must contain code to present it.

[Note]Note

This is an optional feature. Do not check this check box if you want the convenience of the Amazon Payments final status page.

Using Instant Payment Notification

Instant Payment Notification (IPN) is an optional feature of Amazon Payments. All the Amazon Simple Pay buttons may take advantage of this service.

IPN works by sending a separate HTTP POST from Amazon Payments to a custom script you have provided. The IPN POST is sent separately from the final status page, which uses the value specified for Return URL.

Among other things, IPN gives you the ability to check the transaction sent to your Return URL. To take advantage of IPN features and of the transaction information provided by the service, you must work as a developer with custom code. This in turn requires an Amazon Payments Developer account..

For more information about IPN, the transaction information it provides, and verifying the signature, see "Setting Up Instant Payment Notification" in the Amazon Simple Pay Advanced User Guide. The Advanced Guide also has information on getting a developer account in the section, Amazon Payments Developer Account.

Advantages of Signing Your Buttons

When you create Simple Pay buttons, they are configured to use Secure Sockets Layer transmission (SSL). This protects the form from being modified while it is being submitted. However, this doesn't prevent a malicious buyer from copying the form's source HTML from your web page, modifying the parameters, and sending a hijacked form.

A signed button protects you from this vulnerability. You can specify that Amazon sign your buttons by choosing the Sign the Buttons option in your Developer and Seller Preferences. For more information, see Configuring Default Button Values.

The minor trade off for signing Simple Pay buttons when you create them is –once signed– any changes you want to make to the button (such as changing the price) require you to create the button again. If the button is unsigned, you can change the parameters freely.

Once you determine that signing is to your benefit, you need to decide whether the signature generated during button creation is secure enough.

With the Sign the Buttons option set, all buttons you create with Amazon Simple Pay contain a signature based on Amazon's access identifiers. This provides enhanced security to the request that you send to Amazon. Amazon cannot sign the return to you without your access identifiers. While the chance of tampering is not great, nevertheless for the greatest security, you can consider generating a signature using your own AWS Access Key ID.

Signing with your own AWS Access Key ID is an optional security enhancement that protects the transaction information Amazon Payments sends to you. If you do choose to use your own AWS Access Key ID, you must modify the HTML generated whenever you create a Simple Pay button. Instructions for doing this are found in the "Creating Button Forms Dynamically" section of the Amazon Simple Pay Advanced User Guide. For more information on AWS Access Key ID, see "Using Access Identifiers" on the Amazon Simple Pay Advanced User Guide page Amazon Simple Pay Concepts.

Note that whether you choose to the sign button or not, you can still check the conditions of each payment using the information in your Amazon Payments business account Activity Center. In addition, you can programmatically verify the price and other parameters using Instant Payment Notification. For more information, see "Using Instant Payment Notification" in the Amazon Simple Pay Advanced User Guide.

Other Advanced Features of Amazon Simple Pay

This Getting Started Guide gives you the basics for using Amazon Simple Pay. There are many other features of Amazon Simple Pay and the Amazon Flexible Payments Service that can make your web site more sophisticated. Some of the topics which may be of interest to you are:

  • Customizing Amazon Simple Pay Buttons

  • Simulating Amazon Simple Pay Button Errors

  • Generating signatures based on your AWS Access Key ID

    [Note]Note

    You can now rotate your AWS access keys that you use to sign the buttons. For more information, see https://aws-portal.amazon.com/gp/ aws/developer/account/index.html?ie=UTF8 &action=access-keyCredentials, on the Amazon Web Services web site.

  • Validating signatures in returnURL and IPN using the VerifySignature API.

  • Adding Amazon Simple Pay as an Additional Payment Option

  • Programmatic APIs for Cancel, Settle, and Refund

  • 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.