Home  |  About Us  |  Contact Us  |  FAQs  |  Products  |  Privacy Policy |  Warranties  |  Customer Service |  |Shipping Policy   
     THE ELECTRIC SCOOTER FACTORY
STEP 2 STEP 2 STEP 2 STEP 2 STEP 2 STEP STEP 2 STEP 2 STEP 2 STEP 2 STEP 2 STEP 2 STEP 2 STEP 2 STEP STEP 2 STEP 2 STEP 2 Step 2. Build and create an Amazon Pay button If the payment amount used for your button is variable, like when customers use a shopping cart to make purchases, then you need to use JavaScript to add the Amazon Pay button to your website. This topic includes an example of what your code might look like. When the amount changes on the checkout page and cannot be preloaded, the signature must be recalculated for each request. You should calculate the signature immediately before passing the payment parameters to hostedParametersProvider. The following example shows how you might do this by using a JQuery.getJSON call to your backend and then hooking up a successful response with the hostedParametersProvider done function. The done function ends the Amazon button creation steps. Example: Making a getJSON call to the backend and hooking in the hostedParametersProvider done function for the Amazon Pay button:
The parameters in the sample above are described in Step 3: Specify the parameter values. Security warning: Do not expose your MWS secret key in your webpage’s JavaScript or HTML code. Because your MWS secret key is used for authentication, keep it private in your backend. Step 3.-----------------------------------------------------------------------------------------------------------------------3 Step 3. Specify the parameter values After the Amazon Pay button has been selected, you must direct the buyer to the checkout page hosted by Amazon Pay. The URL should contain all data necessary to complete the flow and must be signed with your MWS secret key to ensure that data that has been tampered with can be detected and handled appropriately. Parameter Equivalent HTML interface parameter Required Need to sign Description sellerId (data-ap-seller-id) Yes Yes This is your unique Seller ID. This is the same as your Merchant ID that appears in Seller Central. You can view your Merchant ID by clicking Settings and then Integration Settings. Example: ADEMO3053M41F7EXAMPLE amount (data-ap-amount) Yes Yes The amount of the payment. Example: 25.50 returnURL (data-ap-return-url) Yes Yes The URL that you want Amazon Pay to return responses to. This must include the scheme name (either HTTP or HTTPS). Example: https://www.merchant.com/merchantResponseHandler If the cancelReturnURL parameter is provided, only successful responses will be returned to this URL. cancelReturnURL (data-ap-cancel-return-url) No Yes The URL that you want Amazon Pay to return responses to in the event that the buyer abandons the checkout or the transaction fails. This must include the scheme name (either HTTP or HTTPS). Example: https://www.example.com/merchantCancelURL accessKey (data-ap-access-key) Yes Yes Your Amazon MWS public access key. Example: ADEMOBRU3PYWWEXAMPLE signature (data-ap-signature) Yes No The signature used to sign your request. The signature ensures that the button parameters have not been tampered with. For more information about how to generate the signature, see Step 5: Generate a signature for the payment request. lwaClientId (data-ap-lwa-client-id) Yes Yes The Login with Amazon Client ID of your application. Example: amzn1.application-oa2-client.demoa234d9024af28f4f6f8078example currencyCode (data-ap-currency-code) No Yes * The currency to use for charging the buyer. Default: current seller region Example: USD sellerNote (data-ap-note) No Yes * The message that will appear in the checkout pages. Max length: 1024 characters sellerOrderId (data-ap-seller-order-id) No Yes * The seller-specified identifier for this order. This is shown in buyer emails and in the transaction history on the Amazon Pay website. We recommend that you use the following characters only: lowercase a-z uppercase A-Z numbers 0-9 dash (-) underscore (_) Max length: 50 characters shippingAddressRequired (data-ap-shipping-address-required) No Yes * A flag indicating whether the buyer should choose a shipping address. Note: Because this is not a Boolean, enter these values enclosed in quotation marks. Default: true Valid values: true false paymentAction (data-ap-payment-action) No Yes * Specifies what happens when a buyer clicks Pay Now at the end of the checkout flow. Acceptable values: None—Results in Set and Confirm actions only. (You need to initiate authorize and capture actions separately using API requests.) Authorize—Reserves a specified amount against the payment method(s) stored in the order reference. AuthorizeAndCapture—Reserves a specified amount against the payment method(s) stored in the order reference and transfers funds from an authorized payment instrument. Default: None *These parameters are required when signing only if you designated a value other than the default. The following parameters are available in the HTML interface only. These parameters do not require signing. HTML parameter Required Need to sign Description data-ap-widget-type Yes No The type of widget to include on the page. Valid value: expressPaymentButton Step 4. ----------------------------------------------------------------------------------------------------------Step 4. Step 4. Collect the payment Express integration lets you make separate API calls for authorization and capture of payment. There are two options: Set the Amazon Pay button paymentAction parameter to none, which creates a confirmed orderReferenceId. When an order is placed, an orderReferenceId is provided in the return URL to be used in the Authorize API call. The Authorize API call returns an AmazonAuthorizationID, which can be used for future Capture API requests. For details, see Using the Authorize API below. Set the Amazon Pay button paymentAction parameter to Authorize, which creates a confirmed orderReferenceId and AmazonAuthorizationId. To make Capture API requests, you can retrieve the AmazonAuthorizationId by making a getOrderReferenceDetails API request. This call returns an IdList containing the AmazonAuthorizationId, which can be used for Capture API requests. For details, see Capture using an API Call below. For either option, check the status of the authorization before making the Capture using an API call API call to make sure that it is in an open state. You can do this by making a GetAuthorizationDetails API call. Using the Authorize API The Authorize API call reserves a specified amount against the payment methods stored in the order reference. Description The Authorize operation reserves a specified amount against the payment methods stored in the order reference. To charge the payment methods, you must either set the CaptureNow request parameter to true or call the Capture operation after you call this operation. An authorization is only valid for a particular time period, which is specified in the response of the operation. At the end of the time period, the authorization expires and a notification is sent to you if you have set up Instant Payment Notifications. For more information about Instant Payment Notifications, see Synchronizing your systems with Amazon Pay in the Amazon Pay recurring payments integration guide. You can also query the details about an authorization by calling the GetAuthorizationDetails operation. This operation has a maximum request quota of 10 and a restore rate of one request every second in the production environment. It has a maximum request quota of two and a restore rate of one request every two seconds in the sandbox environment. For definitions of throttling terminology and for a complete explanation of throttling, see Throttling: Limits to how often you can submit requests in the Amazon MWS Developer Guide. Request parameters For more information about the request parameters that are required for all Amazon MWS operations, see Required request parameters in the Amazon MWS Developer Guide. Parameter name Required Type Description AmazonOrderReferenceId Yes xs:string The order reference identifier. This value is retrieved from the Amazon Button widget after the buyer has successfully authenticated with Amazon. AuthorizationReferenceId Yes xs:string The identifier for this authorization transaction that you specify. This identifier must be unique for all your authorization transactions. Amazon recommends that you use only the following characters: lowercase a-z uppercase A-Z numbers 0-9 dash (-) underscore (_) Maximum: 32 characters AuthorizationAmount Yes Price Represents the amount to be authorized. Maximum value: US: $150,000 UK: £150,000 Germany: €150,000 SellerAuthorizationNote No xs:string A description for the transaction that is shown in emails to the buyer. Maximum: 255 characters TransactionTimeout No xs:nonnegativeInteger The number of minutes after which the authorization is automatically be closed and you cannot capture funds against the authorization. Note: In asynchronous mode, the Authorize operation always returns the State as Pending. The authorization remains in this state until it is processed by Amazon. The processing time varies and can be a minute or more. After processing is complete, Amazon notifies you of the final processing status. For more information, see Instant Payment Notification (IPN) in the Amazon Pay and Login with Amazon integration guide. Valid values: Zero or integer values in multiples of five (5, 10, 15, etc.). Set the value to zero for synchronous mode. Set the value to greater than zero for asynchronous mode. TransactionTimeout values in synchronous mode: Must be 0 TransactionTimeout values in asynchronous mode: Minimum: 5 Maximum: 1440 Default: 1440 CaptureNow No xs:boolean Indicates whether to directly capture a specified amount against an order reference (without needing to call Capture and without waiting until the order ships). The captured amount is disbursed to your account in the next disbursement cycle. Note: The Amazon Pay policy states that you charge your buyer when you fulfill the items in the order. You should not collect funds prior to fulfilling the order. Allowed values: true—The specified amount is directly captured. You do not need to call the Capture operation. false—To capture the funds specified in this authorization, you must call the Capture operation . Default: false SoftDescriptor No xs:string The description to be shown on the buyer's payment instrument statement if CaptureNow is set to true. The soft descriptor sent to the payment processor is: “AMZ* ”. Default: “AMZ* amzn.com/pmts WA” Maximum: 16 characters Response elements Element name Description AuthorizationDetails Encapsulates details about the Authorization object including the status, amount captured, and fee charged. Type: AuthorizationDetails Sample query request POST /OffAmazonPayments/2013-01-01 HTTP/1.1 Content-Type: x-www-form-urlencoded Host: mws.amazonservices.com User-Agent: AWSAccessKeyId=AKIAFBM3LG5JEEXAMPLE &Action=Authorize &AmazonOrderReferenceId=P01-1234567-1234567 &AuthorizationAmount.Amount=94.50 &AuthorizationAmount.CurrencyCode=USD &AuthorizationReferenceId=test_authorize_1 &MWSAuthToken=amzn.mws.4ea38b7b-f563-7709-4bae-87aeaEXAMPLE &SellerAuthorizationNote=Lorem ipsum &SellerId=YOUR_SELLER_ID_HERE &SignatureMethod=HmacSHA256 &SignatureVersion=2 &Timestamp=2012-10-03T19:01:11Z &TransactionTimeout=60 &Version=2013-01-01 &Signature=WlQ708aqyHXMkoUBk69Hjxj8qdh3aDcqpY71hVgEXAMPLE Sample response P01-1234567-1234567-0000001 test_authorize_1 Lorem ipsum USD 94.50 USD 0 Pending 2012-11-03T19:10:16Z 2012-11-02T19:10:16Z 2012-12-02T19:10:16Z b4ab4bc3-c9ea-44f0-9a3d-67cccef565c6 Using the Capture API The Capture API call captures funds from an authorized payment instrument. Description To capture funds from an authorized payment instrument, call the Capture operation. To successfully capture a payment, you must call this operation on an Authorization object before it expires, as specified by the ExpirationTimestamp returned in response of the Authorize operation call. You must specify a capture amount, and the amount cannot exceed the original amount that was authorized. You can query the status of a capture request by calling the GetCaptureDetails operation. This operation has a maximum request quota of 10 and a restore rate of one request every second in the production environment. It has a maximum request quota of two and a restore rate of one request every two seconds in the sandbox environment. For definitions of throttling terminology and for a complete explanation of throttling, see Throttling: Limits to how often you can submit requests in the Amazon MWS Developer Guide. Request parameters For more information about the request parameters that are required for all Amazon MWS operations, see Required request parameters in the Amazon MWS Developer Guide. Parameter name Required Type Description AmazonAuthorizationId Yes xs:string The authorization identifier that was generated by Amazon in the earlier call to Authorize or AuthorizeOnBillingAgreement. CaptureReferenceId Yes xs:string The identifier for this capture transaction that you specify. This identifier must be unique for all your capture transactions. Amazon recommends that you use only the following characters: lowercase a-z uppercase A-Z numbers 0-9 dash (-) underscore (_) Maximum: 32 characters CaptureAmount Yes Price The amount to capture in this transaction. This amount cannot exceed the original amount that was authorized less any previously captured amount on this authorization. Maximumvalue: US: $150,000 UK: £150,000 Germany: €150,000 SellerCaptureNote No xs:string A description for the capture transaction that is shown in emails to the buyer. Maximum: 255 characters SoftDescriptor No xs:string The description to be shown on the buyer's payment instrument statement. The soft descriptor sent to the payment processor is: “AMZ* ”. Default: “AMZ* amzn.com/pmts WA” Maximum: 16 characters Response elements Element name Description CaptureDetails Encapsulates details about the Capture object and its status. Type: CaptureDetails Sample query request POST /OffAmazonPayments/2013-01-01 HTTP/1.1 Content-Type: x-www-form-urlencoded Host: mws.amazonservices.com User-Agent: AWSAccessKeyId=AKIAFBM3LG5JEEXAMPLE &Action=Capture &AmazonAuthorizationId=P01-1234567-1234567-0000001 &CaptureAmount.Amount=94.50 &CaptureAmount.CurrencyCode=USD &CaptureReferenceId=test_capture_1 &MWSAuthToken=amzn.mws.4ea38b7b-f563-7709-4bae-87aeaEXAMPLE &SellerCaptureNote=Lorem ipsum &SellerId=YOUR_SELLER_ID_HERE &SignatureMethod=HmacSHA256 &SignatureVersion=2 &Timestamp=2012-11-05T19:01:11Z &Version=2013-01-01 &Signature=WlQ708aqyHXMkoUBk69Hjxj8qdh3aDcqpY71hVgEXAMPLE Sample response P01-1234567-1234567-0000002 test_capture_1 Lorem ipsum USD 94.50 Completed 2012-11-03T19:10:16Z 2012-11-03T19:10:16Z b4ab4bc3-c9ea-44f0-9a3d-67cccef565c6 Step 5.------------------------------------------------------------------------------------------------------ Step 5. Step 5. Generate a signature for the payment request If you are using the Amazon Pay API, you must include a signature in the request parameters so that Amazon can authenticate your payment requests. If you do not include a signature or if the signature is incorrect, the buyer is directed to an error page that redirects to your specified returnURL for failure handling. Note: If you are using the express integration with the Button Generator, the signature is generated automatically and you can skip this step. To generate the signature, do this: Construct the string to sign. Sign the string with your MWS secret access key. Add the signature to the Amazon Pay button parameters. To create a valid signature, you need to construct the string to sign according to the Amazon MWS V2 signature spec. The string consists of the following elements, with each section separated by a new line: The HTTP action. For an Amazon Pay request, it is always POST. The request domain. For an Amazon Pay request, it is always a forward slash (/). Sorted parameters in query string format, with the URL encoded parameter name and value. Note: When generating a signature, include only the parameters that must be signed. The required parameters are: sellerId amount returnURL accessKey lwaClientId You should include the following parameters when generating a signature only if you designated a value other than the default: currencyCode sellerNote sellerOrderId shippingAddressRequired paymentAction cancelReturnURL The following example shows what your string to sign might look like. Note that you must replace the value of each field according to the parameter values that you want to use. POST payments.amazon.com / accessKey=ACCESSKEY &amount=1.01 &cancelReturnURL=https://cancelReturnURL ¤cyCode=USD &lwaClientId=LWACLIENTID &paymentAction=None &returnURL=https://returnURL &sellerId=SELLERID &sellerNote=SELLERNOTE &sellerOrderId=SELLERORDERID &shippingAddressRequired=true Security recommendation: You should use HTTPS when generating the signature. This will help prevent third parties from eavesdropping on sensitive payment information. Step 6. ------------------------------------------------------------------------------------------------------------ Step 6. Step 6. Integrate return URL parameters Whether the request was successful or failed, Amazon Pay returns a URL containing parameters that you can integrate into your order management system. For example, if the request was successful, at the conclusion of the checkout flow, the buyer is redirected back to the URL that you specified in the button request, along with parameters describing the successful transaction. Similarly, if a buyer abandons the checkout process by clicking Cancel on one of the checkout pages, they are redirected to your website where return URL parameters can provide the reason for abandonment. This topic describes Amazon Pay return URL parameters. There are two types of return URLs, a returnURL and a cancelReturnURL. All responses are sent to the returnURL. If you elect to use the cancelReturnURL, only successful responses are directed to the returnURL. For more informatio,n see Step 3: Specify the parameter values. Important: Before fulfilling orders on a successful response, you should verify the signature, amount, sellerOrderId, and currencyCode parameters to ensure that the response was sent by Amazon Pay and that it has been properly processed. Alternatively, you can make backend calls via the MWS Amazon Pay API using the OrderReferenceId. Note: Integrating return URL parameters is one way to monitor the status of transactions on your webpage, but we recommend that you also use Instant Payment Notification (IPN) to monitor transactions. IPN is a HTML POST notification that is sent when a transaction either completes successfully or fails. You can specify the default URL to handle IPN in your Amazon Pay account settings. For more information on IPN, see Monitoring Payment Object state transitions in the Amazon Pay and Login with Amazon integration guide. To see transactions in Seller Central, sign in, click Orders, and then click Manage Transactions. Common parameters Parameter Required Description resultCode Yes The response indicating whether checkout was successful. Valid values: Success Failure sellerId Yes The Seller ID used for the request. A solution provider uses this parameter to identify the merchant that the call was made for. Success parameters Parameter Required Description orderReferenceId Yes The ID of the order reference. The order reference is the contract that encapsulates the payment agreement between you and the buyer. amount Yes The amount that the buyer has agreed to pay. currencyCode Yes A code that indicates the type of currency: USD (dollars), EUR (euros), or GBP (pounds). paymentAction Yes The specified request parameter. Valid values: None Authorize AuthorizeAndCapture sellerOrderId No The seller-specified ID for this order. This is returned only if it is provided as a button parameter. accessKey Yes The Amazon MWS private key's corresponding public key used to create the response signature. signature Yes A signature used to ensure that the Amazon Pay response parameters have not been tampered with. If you detect a signature mismatch, then ignore the response. For information about how to calculate the signature, see Step 5. Generate a signature for the payment request. Failure parameters Parameter Required Description failureCode Yes The code describing the error. Examples: BuyerAbandoned AmazonRejected RequestSignatureFailure InvalidParameterValue MissingParameter InvalidSellerAccountStatus TemporarySystemIssue The following sample shows what the response might look like if the transaction is successful. Note that the sample includes line breaks so that it is easier to read; a real response would be returned as a single, continuous string. http://www.courtandcherry.com/AmazonResponseHandler &resultCode=Success &orderReferenceId=S01-0912345-1234567 &sellerId=ADEMO3053M41F7TEXAMPLE &accessKey=ARIWE420982EXAMPLE &amount=10 ¤cyCode=USD &paymentAction=None &sellerOrderId=A481WEIFEXAMPLE &signature=n345ngiwasdfasdJimCJixkEuxqN0021sdf56bDdZ4EXAMPLE The following sample shows what a response might look like if the buyer cancels the transaction. Note that the sample includes line breaks so that it is easier to read; a real response would be returned as a single, continuous string. http://www.courtandcherry.com/AmazonResponseHandler ?resultCode=Failure &sellerId=ADEMO3053M41F7EXAMPLE &failureCode=BuyerAbandoned Step 7. -------------------------------------------------------------------------------------------------------- Step 7. Step 7. Validate the signature (optional) After an order is placed, you should validate the signature in the return URL to ensure that it came from Amazon. To validate the returned signature, complete the following tasks: Construct the string to sign. Sign the string with your Amazon MWS secret access key. Generate the signature on your server and compare with the returned signature. To create a valid signature, you need to construct the string to sign according to the Amazon MWS V2 signature spec. The string consists of the following elements, with each section separated by a new line: The HTTP action. For generating the signature on your server, the request is always GET. The domain name of the request URL for your server's return URL file. The request domain, which is the qualified pathway to your server's return URL file. Sorted parameters in query string format, with the URL encoded parameter name and value. Include only the parameters that were in the return URL from Amazon. The following example shows what your string to sign might look like. Note that if your server's return URL is http://your-domain.com/path/success-file.html, the domain URL and request domain would be as shown in the following example. GET your-domain.com /path/validatesignature.html AWSAccessKeyId=AKIAEXAMPLE&SignatureMethod=HmacSHA256&SignatureVersion=2&amount=99.00¤cyCode=USD&orderReferenceId=S01-999999-9999999&paymentAction=AuthorizeAndCapture&resultCode=Success&sellerId=A2MQTZXEXAMPLE&sellerOrderId=1234 Step 8. ----------------------------------------------------------------------------------------------------------- Step 8. Step 8. Retrieve the shipping address If your business ships physical goods, you can retrieve the buyer's shipping address by using the Manage Transactions tool in Seller Central under Orders. You can also retrieve the shipping address by calling the GetOrderReferenceDetails operation. Express integration handles details like SetOrderReferenceDetails and ConfirmOrderReferenceDetails automatically so you can call GetOrderRefernceDetails directly using the orderReferenceId appended to the return URL that you have specified. You can easily test the GetOrderReferenceDetails operation by using the Amazon MWS Scratchpad tool. Test the GetOrderReferenceDetails operation Open Amazon MWS Scratchpad and make the following selections under the API Selection: API Section: choose Off-Amazon Payments. Operation: under OffAmazonPayments-Sandbox, click GetOrderReference Details. Enter your credentials and the Authentication parameters, and then click Submit. The following example shows a Scratchpad request: POST /OffAmazonPayments/2013-01-01 HTTP/1.1 Content-Type: x-www-form-urlencoded Host: mws.amazonservices.com User-Agent: AWSAccessKeyId=AKIAJKYFSJU7PEXAMPLE &Action=GetOrderReferenceDetails &AccessToken=YOUR_ACCESS_TOKEN &AmazonOrderReferenceId=P01-1234-56EXAMPLE &MWSAuthToken=amzn.mws.4ea38b7b-f563-7709-4bae-87aeaEXAMPLE &SellerId=YOUR_SELLER_ID_HERE &SignatureMethod=HmacSHA256 &SignatureVersion=2 &Timestamp=2012-11-05T19%3A01%3A11Z &Version=2013-01-01 &Signature=CLZOdtJGjAo81IxaLoE7af6HqK0EXAMPLE The following example shows a Scratchpad response to a GetOrderReferenceDetails operation call. S01-8474066-EXAMPLE 2015-08-31T17:27:35.053Z Thank you for your order. 15.00 USD S01-8474066-2115738-EXAMPLE 2015-03-04T17:27:43.851Z Open Physical 800-000-0000 60602 Susie Smith US IL Suite 2500 10 Ditka Ave Chicago Sandbox address@domain.com Sandbox_tester Sandbox_test_app 2015-03-04T17:27:35.053Z 181efc0d-a90b-429f-837e-1209bfe4da0e See also GetOrderReferenceDetails in the Amazon Pay API reference guide Step 9. -------------------------------------------------------------------------------------------------------------- Step 9. Step 9. Test your integration in the Sandbox environment, and then switch to Production To test your integration and to make sure that you have covered all possible edge cases, Amazon Pay provides a Sandbox environment for testing. When you test your implementation in Sandbox mode, you can simulate the buyers' experience as they navigate through the Amazon Pay button on your website. In Sandbox mode, you can also test your API operation calls to Amazon Pay to make sure that the calls are configured correctly and that the responses include all the payment parameters that you need for tracking the entire order. The Sandbox environment also lets you simulate various error conditions to help you better manage your buyers’ experiences in the event that something goes wrong during the checkout process. For example, you can simulate a payment decline or a browser cookie timeout. For information about using the Amazon Pay and Login with Amazon Pay Sandbox environment, see Testing your integration in the Sandbox environment in the Amazon Pay and Login with Amazon integration guide. After you have thoroughly tested your integration, you can replace the sandbox endpoints in the JavaScript snippet with the Production endpoints and push your integration to your production site. (The Production endpoint is shown in the Step 1. Add the Amazon Pay JavaScript reference code snippet that renders the button.) WHAT I DID IS BELOW WHAT I DID IS BELOW WHAT I DID IS BELOW YOU WILL FIND ALL MY CODES AT THE VERY BOTTOM Step 2-----2222222222222222222222222222222222222222222222
------------------------------------------------------------------------------------------------------------------------------------ Step 3-----3333333333333333333333333333333333333333333333333 sellerId (data-ap-A2DFH0QU184AU5-id) amount (data-ap-80.00) returnURL (data-ap-https://www.theelectricscooterfactory.com/merchantResponseHandler-url) cancelReturnURL (data-ap-cancel-//https://www.theelectricscooterfactory.com/merchantCancelURL-url) accessKey (data-ap-AKIAIOW3CYXTNP5BXVCA-key) signature (data-ap-C4dZG13qi5T5drRDz4ulEbCqcInKfby8q6Mt6nu%2BpgY%3D) POST payments.amazon.com / accessKey=AKIAIOW3CYXTNP5BXVCA &amount=80.00 &cancelReturnURL=https://www.theelectricscooterfactory.com ¤cyCode=USD &lwaClientId=A2DFH0QU184AU5 &paymentAction=None &returnURL=https://www.theelectricscooterfactory.com &sellerId=A2DFH0QU184AU5 &sellerNote=SELLERNOTE &sellerOrderId=A2DFH0QU184AU5 &shippingAddressRequired=true lwaClientIdA2DFH0QU184AU5 (data-ap-lwa-amzn1.application-oa2-client.e6e2d7487a114c84992086dd412bf18d-id) currencyCode (data-ap-USD-code) Default: current seller region Example: USD sellerNote (data-thank you for your order-note) Max length: 1024 characters sellerOrderId (data-ap-A2DFH0QU184AU5-order-id) shippingAddressRequired (data-ap-shipping-address-required) Default: true Valid values: • true • false paymentAction (data-ap-payment-action) Acceptable values: data-ap-widget-type Valid value: expressPaymentButton Step 4---------444444444444444444444444444444444 Step 4. Collect the payment AuthorizationReferenceId Yes xs:string The identifier for this authorization transaction that you specify. This identifier must be unique for all your authorization transactions. Amazon recommends that you use only the following characters: lowercase a-z uppercase A-Z numbers 0-9 dash (-) underscore (_) Maximum: 32 characters AuthorizationAmount Yes Price Represents the amount to be authorized. Maximum value: US: $ Default: “AMZ* amzn.com/pmts WA” POST /OffAmazonPayments/2013-01-01 HTTP/1.1 Content-Type: x-www-form-urlencoded Host: mws.amazonservices.com User-Agent: AWSAccessKeyId=AKIAIOW3CYXTNP5BXVCA &Action=Authorize &AmazonOrderReferenceId=P01-1234567-1234567 &AuthorizationAmount.Amount=80.00 &AuthorizationAmount.CurrencyCode=USD &AuthorizationReferenceId=test_authorize_1 &MWSAuthToken=amzn.mws.4ea38b7b-f563-7709-4bae-87aeaEXAMPLE &SellerAuthorizationNote=Lorem ipsum &SellerId=A2DFH0QU184AU5 &SignatureMethod=C4dZG13qi5T5drRDz4ulEbCqcInKfby8q6Mt6nu%2BpgY%3D &SignatureVersion=2 &Timestamp=2012-10-03T19:01:11Z &TransactionTimeout=60 &Version=2013-01-01 &Signature=C4dZG13qi5T5drRDz4ulEbCqcInKfby8q6Mt6nu%2BpgY%3D Sample response P01-1234567-1234567-0000001 test_authorize_1 Lorem ipsum USD 80.00 USD 80.00 Pending 2012-11-03T19:10:16Z 2012-11-02T19:10:16Z 2012-12-02T19:10:16Z b4ab4bc3-c9ea-44f0-9a3d-67cccef565c6 POST /OffAmazonPayments/2013-01-01 HTTP/1.1 Content-Type: x-www-form-urlencoded Host: mws.amazonservices.com User-Agent: AWSAccessKeyId=AKIAIOW3CYXTNP5BXVCA &Action=Capture &AmazonAuthorizationId=P01-1234567-1234567-0000001 &CaptureAmount.Amount=80.00 &CaptureAmount.CurrencyCode=USD &CaptureReferenceId=test_capture_1 &MWSAuthToken=amzn1.application-oa2-client.e6e2d7487a114c84992086dd412bf18d &SellerCaptureNote=Lorem ipsum amzn1.application-oa2-client.e6e2d7487a114c84992086dd412bf18d &SellerId=A2DFH0QU184AU5 &SignatureMethod=HmacSHA256 &SignatureVersion=2 &Timestamp=2012-11-05T19:01:11Z &Version=2013-01-01 &Signature=C4dZG13qi5T5drRDz4ulEbCqcInKfby8q6Mt6nu%2BpgY%3D Sample response P01-1234567-1234567-0000002 test_capture_1 Lorem ipsum USD 80.00 Completed 2012-11-03T19:10:16Z 2012-11-03T19:10:16Z b4ab4bc3-c9ea-44f0-9a3d-67cccef565c6 Step 5---------5555555555555555555555555555 POST payments.amazon.com / accessKey=AKIAIOW3CYXTNP5BXVCA &amount=1.01 &cancelReturnURL=https://www.theelectricscooterfactory.com ¤cyCode=USD &lwaClientId=amzn1.application-oa2-client.e6e2d7487a114c84992086dd412bf18d &paymentAction=None &returnURL=https://www.theelectricscooterfactory.com &sellerId=A2DFH0QU184AU5 &sellerNote=SELLERNOTE &sellerOrderId=SELLERORDERID &shippingAddressRequired=true Step 6----------666666666666666666666666666 Integrate return URL parameters http://www. .com/AmazonResponseHandler &resultCode=Success &orderReferenceId= &sellerId=A2DFH0QU184AU5 &accessKey=ARIWE420982EXAMPLE &amount=80.00 ¤cyCode=USD &paymentAction=None &sellerOrderId= &signature=C4dZG13qi5T5drRDz4ulEbCqcInKfby8q6Mt6nu%2BpgY%3D http://www. .com/AmazonResponseHandler ?resultCode=Failure &sellerId=A2DFH0QU184AU5 &failureCode=BuyerAbandoned Step 8--------88888888888888888888888888888888888 Retrieve the shipping address POST /OffAmazonPayments/2013-01-01 HTTP/1.1 Content-Type: x-www-form-urlencoded Host: mws.amazonservices.com User-Agent: AWSAccessKeyId= &Action=GetOrderReferenceDetails &AccessToken= &AmazonOrderReferenceId= &MWSAuthToken= &SellerId=A2DFH0QU184AU5 &SignatureMethod= &SignatureVersion= &Timestamp= &Version= &Signature=C4dZG13qi5T5drRDz4ulEbCqcInKfby8q6Mt6nu%2BpgY%3D The following example shows a Scratchpad response to a GetOrderReferenceDetails operation call. S01-8474066-EXAMPLE 2015-08-31T17:27:35.053Z Thank you for your order. 80.00 USD S01-8474066-2115738-EXAMPLE 2015-03-04T17:27:43.851Z Open Physical 800-000-0000 60602 Susie Smith US IL Suite 2500 10 Ditka Ave Chicago Sandbox address@domain.com Sandbox_tester Sandbox_test_app 2015-03-04T17:27:35.053Z 181efc0d-a90b-429f-837e-1209bfe4da0e See also GetOrderReferenceDetails in the Amazon Pay API reference guide Codes--codes---codes--codes My Codes--codes---codes--codes P.S. this button works but you can not change the price it is fixed and you can not add it to any outher parts like the helmets that we sell. It is ok if your just selling one thing.