# Amazon Simple Pay Standard examples

## Example for Amazon Simple Pay Merchants

This section includes examples to help you understand how to form the string to sign . New lines have been inserted to make the examples easier to read. Explicit '\n' is used wherever new line is required.

Example Amazon Simple Pay request using POST :

        <form action="https://authorize.payments-sandbox.amazon.com/pba/paypipeline" method="POST">
            <input type="image" src="https://authorize.payments-sandbox.amazon.com/pba/images/payNowButton.png" border="0">
            <input type="hidden" name="signatureVersion" value="2" >
            <input type="hidden" name="immediateReturn" value="0" >
            <input type="hidden" name="signature" value="Base64Encode(HmacSHA256(string-to-sign))" >
            <input type="hidden" name="amount" value="USD 1.1" >
            <input type="hidden" name="signatureMethod" value="HmacSHA256" >
            <input type="hidden" name="description" value="Test Widget" >
            <input type="hidden" name="ipnUrl" value="http://yourwebsite.com/ipn" >
            <input type="hidden" name="accessKey" value="YourCallerKey" >
            <input type="hidden" name="cobrandingStyle" value="logo" >
            <input type="hidden" name="processImmediate" value="1" >
            <input type="hidden" name="returnUrl" value="http://yourwebsite.com/return.html" >
            <input type="hidden" name="referenceId" value="YourReferenceId" >
        </form>

String to sign :

        POST\n
        authorize.payments-sandbox.amazon.com\n
        /pba/paypipeline\n
        accessKey=YourCallerKey
        &amount=USD%201.1
        &cobrandingStyle=logo
        &description=Test%20Widget
        &immediateReturn=0
        &ipnUrl=http%3A%2F%2Fyourwebsite.com%2Fipn
        &processImmediate=1
        &referenceId=YourReferenceId
        &returnUrl=http%3A%2F%2Fyourwebsite.com%2Freturn.html
        &signatureMethod=HmacSHA256
        &signatureVersion=2