Amazon Simple Pay IPN Sample in C#

Sample Code & Libraries>Amazon FPS>Amazon Simple Pay IPN Sample in C#
Community Contributed Software

  • Amazon Web Services provides links to these packages as a convenience for our customers, but software not authored by an "@AWS" account has not been reviewed or screened by AWS.
  • Please review this software to ensure it meets your needs before using it.

Demonstrates how to construct and sign an Amazon Simple Pay button on your ASP.NET website. This also demonstrates how to receive and validate a Simple Pay Instant Payment Notification.


Submitted By: Jeff
AWS Products Used: Amazon FPS
Language(s): C#
License: Apache License 2.0
Created On: November 1, 2008 12:44 AM GMT
Last Updated: February 5, 2009 3:11 AM GMT

Demonstrates how to construct and sign an Amazon Simple Pay form. It also demonstrates how to validate the Instant Payment Notification (IPN) sent to your web site and validate the signature for the IPN returned from Amazon SimplePay.


  • You must have an Amazon Payments Sandbox Business Account.
  • You must have an Amazon Web Services developer account.
  • You must use the same email address and password for your Amazon Payments Business Account and your Amazon Web Services developer account.
  • You must have ASP.NET version 2.0 or higher installed.

Setting up the Sample

  1. Unzip the sample.
  2. Edit PayNowWidgetUtils.cs file
    • Enter your AWS Access Key ID
    • Enter your Secret Access Key
    • Enter the path to the log file used to record IPNs (this file will need write permissions on your server)
  3. Edit default.aspx.cs and enter values for:


Example Usage

  1. A customer clicks on your Amazon SimplePay button.
  2. The customer is redirected to the co-branded user interface pipeline where they enter their payment credentials.
  3. After the customer completes the pipeline they are redirected back to your website.
  4. When the transaction completes, Amazon SimplePay will send an IPN to your IPN URL.
  5. The page at the IPN URL receives data from an HTTP POST.
  6. Use the PayNowWidgetUtils class to validate the IPN.
©2017, Amazon Web Services, Inc. or its affiliates. All rights reserved.