CheckoutChamp
Submit TicketStatus
  • CheckoutChamp
  • Funnel Builder
    • Onboarding & Activation
      • Go Live Checklist
    • Dashboard Overview (APP)
    • Creating & Editing Funnels/Pages
      • Funnel Visualizer and Page Builder
        • Funnel Visualizer
          • Page Types
          • Connecting Funnel Pages
            • Route An Arrow For New And Repeat Customers
          • Edit Funnel Settings
            • Tracking Pixels
            • Offers and Upsells
            • Collections
            • Coupons
            • Configure Google Analytics
            • Gateways
            • Affiliates
              • Everflow
            • Sales Tax Profiles
            • Add Ons
              • PAAY Add On
              • Route Add On
              • ShipEngine Add On
              • Google Places
              • Fraud Manager Add On
              • Facebook Messenger
              • reCAPTCHA Enterprise
            • SMTP Accounts
            • Fulfillment Houses
            • Ship Profiles
            • Fonts
            • Payments
              • Affirm
              • Afterpay
              • Amazon Pay
              • Apple Pay
                • Legacy Apple Pay Setup (Apple Pay Plugin)
              • Multi-Pay Rebills
              • BitPay
              • Bancontact
              • BLIK
              • Boleto
              • Google Pay
              • iDEAL
              • Klarna
              • P24
              • PayPal Seamless Checkout
                • Fastlane
              • SEPA
              • Sezzle
              • TWINT
            • Social Proof
            • Maintenance
          • URL Customization
          • Page Templates
        • Page Builder
          • Builder Toolbar
            • Device View Changer
            • Popups
          • Style Manager
          • Layer Manager
            • Hiding and Revealing Elements
          • Building Blocks
            • Basic Blocks
              • Rows & Columns
            • Form Blocks
              • Shopping Cart Element
            • Button Blocks
              • Button & Link Actions
            • Product Blocks
            • Carousel / Slider Blocks
            • Icon Blocks
            • Social Media Blocks
            • Testimonial Blocks
            • Extra Blocks
            • My Element Blocks
        • 🆕Page Builder 2.0
          • 📰New Features!
          • Builder Toolbar
            • Device View Changer
            • Popups
          • Settings & Style Manager
          • Layer Manager
            • Hiding and Revealing Elements
          • Building Blocks
            • Basic Blocks
              • Rows & Columns
            • Form Blocks
              • Shopping Cart Element
            • Button Blocks
              • Button & Link Actions
            • Product Blocks
            • Extra Blocks
              • Bullet List
              • Progress Bar
              • Collapsible List / FAQ Section
              • Testimonial Blocks
              • Carousel / Slider Blocks
              • Survey
              • Timer
            • My Element Blocks
          • Page Building Tips
            • Using Shopify information on a Thank You page
            • Placeholders and Input Formats
            • Hide element if box is checked/ Billing address same as Shipping
            • How to set Anchor Links
            • How to convert a button into a link
            • Adding Age Consent
            • Creating a Split Variation
            • Subscribe & Save
            • Tokens
            • Redirect from CheckoutChamp to externally hosted upsell or Thank You page
            • Duplicate Input Indicator
            • Product Quantity Select
            • Make a button appear after a set amount of time
            • Making A New Section Appear After a Timer Expires
            • Timer - Route to next page
            • Use link or button to initiate a pop-up
            • Convert Checkbox and Radio
            • Lazy Loading
            • Element Toolbar
            • Applying custom fields to inputs
            • Shipping Profiles
            • Duplicating Pages & Funnels
            • Bootstrap Integration
            • Customer File Uploads
            • Product Tiles
            • Variant Selection
              • Product Variant Selection
              • Customized Variant Bundles (Single Variant)
              • Product Checkbox
            • Product Table
            • Hover Effects (adding Pseudo-classes)
            • Page Sizes and Image Dimensions
            • Flex Settings
            • Using the Survey Element
            • Custom Classes
            • Creating a Marketing Opt-in Checkbox
            • Common Page Elements
            • Create a Common Menu
            • Currency Selector
            • Acquire and Send Session Data to 3rd Party
            • Language Replacement Mapping
            • "Upgrade" or Replace a Product
            • Pass custom parameter on URL and store onto order
            • Product Drop Down / Select
            • Genders
            • Keep customers on Upsell Page after buying an upsell
            • Dynamic Order Bumps
            • Dynamic Upsells
            • Main Site Color
      • Adding Local HTML Files
      • Domain Configuration
        • Domain Trouble Shooting
        • DNS Troubleshooting Guide
        • Redirecting your Root (Apex) Domain
        • GDPR by Clym
      • Publishing a Funnel
      • Basic SEO
    • Redirect Storefront to CheckoutChamp
      • BigCommerce Plugin
        • BigCommerce Checkout Redirect
        • Recurring Products
      • WooCommerce Plugin
        • WooCommerce Checkout Redirect
      • Magento Plugin
      • Redirect external funnel to CheckoutChamp Checkout
      • Using Google Analytics with Redirect
    • Customer/Membership Portal
      • Customer Portal (Without Plugin)
      • Membership Portal with CustomClub Plugin
      • SSO with External Sites
    • Account Settings
      • Domain Forwarding
    • Analytics Definitions
  • CRM
    • Getting Started in your CRM!
    • CRM Dashboard
    • CRM Account Settings
      • Fraud Protection
      • CRM Subscription Page
      • Enable Automatic Cancel on Refund and Void
      • Staggered Rebills
    • Customer Section
      • Customer Service
        • Customer Service Tutorial
        • Locate a Customer Record
        • Continuity Purchase Profile
        • Refund/Void a Transaction
        • Cancel an Order
        • Cancel or Pause a Subscription
        • Restart a Subscription
        • C/S Fulfillment Actions
        • Resend emails to customers
        • Rerun a Declined New Sale
        • Merge Existing Customers
      • Order Entry
      • Fulfillment
      • Quality Assurance
    • CRM Setup
      • Product Setup
        • Product Creation
        • Product Variations
          • Variant Bundles
      • Campaign Setup
        • Creating a Campaign
        • Campaign Categories
        • Campaign Types
        • Adding a Product to a Campaign
          • Common Offer Setups
            • T-Shirt Club
        • Auto-Responder Setup
          • Autoresponder Date Formats
        • Shipping Profiles
        • Taxes
        • Campaign Coupons
        • Custom Fields
        • Adding C.O.D. to Campaigns
        • Single Transaction Orders
        • Multi-Currency
      • Call Center Setup
        • Adding and Editing Call Centers
        • Adding Call Center Agents
        • Setting Call Center Commissions
        • Batch Update Call Center Source Values
        • Cancellation Reasons, Refund Reasons, and Call Dispositions
      • Affiliate Setup
        • Adding and Editing Affiliates
        • Affiliate Tracking Link/String
        • Affiliate Pixels
          • Testing and Troubleshooting CPA Pixels
          • Testing CPC Pixels
        • Affiliate Commissions
        • Setting up an Affiliate User
        • Batch Update Affiliate Source Values
        • General External Affiliate Software/Network Setup
        • Facebook Pixel Setup (Direct API)
    • Fulfillment Section
      • Add and Editing Fulfillment House
      • Fulfillment Batch Update
      • Fulfillment Summary Report
      • Bundle Fulfillment
      • Fulfillment Statuses
      • Testing Fulfillment through Order Entry
      • Cash on Delivery setup
        • C.O.D. Order Entry Option
      • Upload Returned Orders
      • Edit Fulfillment Items
      • Fulfillment Inventory
      • Shipping Validation
    • Gateway Setup
      • Gateway List
      • Adding a Gateway
        • Testing Your Gateway Through Order Entry
      • Gateway Integrations
        • Adyen
        • Adyen V2
          • Klarna on AdyenV2
          • PayByBank on AdyenV2
          • Afterpay on AdyenV2
        • Affirm
        • Afterpay
        • Airwallex
          • Airwallex - Alternate Payments
        • Amazon Pay API Integration
        • Apple Pay
        • Authorize.net
        • Bank of America
        • BitPay
        • Braintree
        • Cardinity
        • Cardstream
          • Cardstream - Alternate Payments
        • Celerispay
        • Centrobill
        • Checkout.com
          • Checkout.com - Alternate Payments
        • Corefy
        • Easytransac
        • eMerchantPay V3
          • eMerchantPay - Alternate Payments
        • Everyware
        • Fat Zebra
        • FibonatixV2
        • FlexFactor
        • Gala Technology
          • Gala Technology - Alternate Payments
        • Google Pay API
        • HiPay 3DS
        • Innova
        • iyzico
        • Klarna
        • MARKETFLOW
        • Maverick
        • Merchant Warrior
        • MojoPay
        • Mollie
        • Moonlight Payments
        • MuchBetter
        • MyCPO
        • NMI
          • NMI - useCustomerVault Configuration
        • NomuPay
          • NomuPay - Alternate Payments
          • Klarna on NomuPay
        • OpenPath
          • IoniaPay Instant Direct Payments (OpenPath)
        • PagBrasil
        • Pathly
        • Pay.com
        • PAY.ON
        • Payex-GreenMoney
        • PayGate
        • Paynetworx
        • PayPal Commerce Checkout
          • PayPal Commerce Checkout (Direct API)
          • PayPal Commerce Checkout (Legacy)
            • PayPal Seamless Checkout - 2-Click Upsells (without Reference Transactions)
          • PayPal Commerce Checkout (SDK)
        • Paysafe V2
        • Paystrax
        • PayXpert 3DS V2
        • Pixxles
        • Poynt
        • Priority Payments
        • Quaife
        • Quantum
        • QuickPay
        • Radom
        • RocketGate
        • SafeCharge
        • Sezzle
        • Skrill
        • Solid
        • Splitit
        • Square Payments
          • Square Payments V2 (Checkout Champ builder set-up)
        • Stripe
          • Stripe - Alternate Payments
          • Klarna on Stripe
        • SurePay
        • TruCommerce
        • Trust Payments
          • Trust Payments - Alternate Payments
        • TRX
        • UrPay
        • Vantiv
        • WAAVE
        • WEBPAY
        • WhiteLabel (WL) Payments
        • WithReach
        • WorldLine (Bambora)
        • Worldline V2
          • Worldline V2 - Alternate Payments
        • Worldnet
        • Worldpay
      • Advanced Transaction Routing Interface (ATRI)
        • ATRI Algorithms
        • Cascade Profiles
        • ATRI Settings and Notifications
      • Recycle Billing
      • Standard BIN Mapping
      • PrePaid BIN Mapping
      • Decline Message Mapping
      • Dynamic Descriptors
      • RDR
      • Ethoca Refunds
      • Direct API 3DS Instructions
      • dLocal Properties
      • Zero dollar card verification
    • Reports
      • Customer Reports
        • Order Summary
        • Order Details
          • Order Statuses
        • Cancellation Report
        • Retention Report
        • Revenue Summary
        • Customer Details Report
      • Payment Reports
        • Transaction Summary Report
        • Transaction Details Report
        • Account Updater
        • Card Processing
        • Refund Details
        • Chargeback Details
        • Billing Report
        • Projected Billing
        • Sales Tax
      • Gateway Reports
        • Reserve Report
      • Sale Reports
        • Continuity Report
          • Continuity Purchase Statuses
        • Affiliate Report
      • Call Center Reports
        • Customer Service Report
      • Fulfillment Reports
        • Fulfillment Details
      • UTM Filters
      • Key Performance Indicators - KPIs
    • Admin Setup
      • Plugin Setup
      • Create a User
        • Create an Affiliate User
        • Create An API User
        • Leads Agents
      • Import
        • Import Coupons
      • Export Webhook Profiles
        • Postback Export Profiles
        • FTP Export Profile
        • Export Webhook Field Mapping Options
      • Blacklist
      • Event Logs
      • Test Cards
      • Legacy Data Import
        • CheckoutChamp PGP Encryption Procedures
        • Migrating Data From a Processor To Checkout Champ
    • Plugins
      • Accounting
        • QuickBooks Online Plugin
      • Affiliate Systems
        • Everflow Integration
        • Trackfiliates
      • Analytics and Reporting
        • Wicked Reports
      • Authentication
        • PAAY
          • Authenticating with PAAY 3DS on Landers
        • PAAY 3RI
      • Chargeback Management
        • Fraud Deflect
        • Ethoca
        • Midigator
        • Optimal Alerts
        • ChargebackHelp
      • Data Sources
        • Big Commerce
          • BigCommerce Checkout Redirect
        • Smarty
        • ClickBank
        • Facebook Marketplace
        • FFL Scope
        • FluidPay Account Updater
        • Google Shopping
        • Gorgias
        • HubSpot
        • Listrak
        • OpenBorder
        • Paperform
        • Re:amaze
        • Recharge
        • ShipEngine
        • Shopify
          • Use Shopify Products Without Shopify Redirect
          • Octane AI
        • Triple Whale
        • WooCommerce
          • Using WooCommerce Catalog with Checkout Page
        • Zapier
        • Zendesk
        • DataDojo
        • ViralSweep
      • Debt Collection
      • Email Service Providers
        • Email Service Provider Plugins
        • Email Service Provider General Set Up
        • Active Campaign Deep Integration
        • InboxFirst
        • Klaviyo
        • Constant Contact
        • SendLane
        • Infusionsoft/Keap
        • Sendgrid
        • Ontraport
        • TxtFlo
        • Postscript
        • Maropost
        • Mailchimp
        • ConvertKit
        • Attentive
      • Express Consent
        • Expressed Consent
        • Expressed Consent CRM Configuration
        • Expressed Consent Guidelines
      • FlexPay
      • Fraud Services
        • Fraud Manager
        • Kount Enterprise
        • Device Data Collector Pixel (DDC Pixel)
        • IPQS
        • NoFraud
      • Fulfillment Houses
        • General Fulfillment House Setup
        • AliExpress
        • Amware
        • CJ Dropshipping
        • DesktopShipper
        • FTP Fulfillment Option
        • Fulfillment by Amazon
        • mintsoft
        • ShipBob
        • Shiphero
        • ShipStation
        • Save Rack
        • Store Pickup
        • Pharmacy Hub
        • Promise Pharmacy
      • Identity Verification
        • 1account
        • AgeChecker.net
        • ID.me
      • IVR Systems
      • List Management Services
        • Red Crane Media
        • Sociallity
      • Membership Services
        • Circle.so Webhook Guide
        • General Membership Club Plugin Setup
        • CustomClub
        • MemberMouse
        • Kajabi Webhook Guide
      • Phone Switches
        • ViciDial
        • Ytel
        • Five9 Sales Agent Call Pop
      • Rewards
        • LoyaltyLion
        • Stamped
      • RMA Services
      • Sales Call Tracking Services
      • Shipping Services
        • InsureShip
        • Route
      • SMS
        • ClickSend (Data Shuttle)
        • Twilio SMS Setup
        • SendPlex SMS Plugin
      • SMTP Maintenance
        • SMTP Maintenance Setup
        • Sendgrid SMTP Profile
        • Maropost SMTP Profile
        • Gmail SMTP Profile
      • Tax Services
        • Avalara Tax
          • Enabling and Setting Up the Avalara AvaTax Plugin
          • Add Avalara Tax to a Campaign
          • Add Tax Code to Products
          • Add Freight Tax to Shipping
          • Avalara Tax - Order Entry
        • Interpayments
        • TaxJar
          • Add TaxJar to Campaigns
          • Add Tax Code to Products
          • Add Freight Tax Code to Shipping
          • TaxJar Address Verification- Customer Service/ Order Entry
          • TaxJar Support Page
      • Telehealth
        • Beluga EHR
      • Upsell
        • Integrated Upsell Program
    • Frequently Asked Questions (FAQS)
      • General CRM Questions
      • Order Processing Questions
      • Fulfillment Questions
      • Reporting Questions
      • Affiliate Tracking Questions
      • Developer Questions
      • Builder Questions
      • How-to articles
        • Force Bill a Purchase
        • Submit a Support Ticket
    • Click-to-Cancel
  • API Documentation
    • API Documentation
      • Recommended API Flow
      • Performing API Calls
  • Policies
    • EULA
    • Privacy Policy
    • Acceptable Use Policy
    • Billing Policy
    • GDPR
    • A-C&B
Powered by GitBook
LogoLogo

CheckoutChamp Links

  • Website Builder
  • CRM
  • Status
  • Need more help?

Refer a Friend

  • Referral Program

No account yet?

  • Schedule Sales Demo
On this page
  • Creating Amazon Pay App And Adding Your Domain
  • Obtain Amazon Pay MID Credentials
  • Create Amazon Pay MID
  • Add Amazon Pay Widgets and JavaScript to Your Lander Code
  • Send Amazon Pay Parameters with Import Order API Call
  • Transaction Flow
  • Upsells
  • Enable Recurring Payments
  • Errors/Decline Messages
  1. CRM
  2. Gateway Setup
  3. Gateway Integrations

Amazon Pay API Integration

PreviousAirwallex - Alternate PaymentsNextApple Pay

Last updated 3 months ago

Creating Amazon Pay App And Adding Your Domain

  1. Log in to

  2. Go to Integration → Integration Central

  3. Go to Manage client ID/store ID(s) section at the bottom of the page and click “Create new client ID/store ID” or click “View client ID/store ID(s)” and “Edit” to update existing app.

  4. Add your lander domain to JavaScript origins and return URLs and create or update.

Obtain Amazon Pay MID Credentials

  1. Go to Integration → MWS Access Key

  2. Click the gold “Copy your keys” button at the top right

  3. Copy the credentials shown in the popup.

Create Amazon Pay MID

  1. In the CRM, go to Merchants->MID List

  2. Click the green plus sign to create a new MID

  3. Select Amazon Pay as Gateway field

  4. Fill in copied credentials (merchant_id, access_key, secret_key, client_id, client_secret)

  5. Fill in MID Title, Descriptor, MID #

  6. Click “Create MID”

Add Amazon Pay Widgets and JavaScript to Your Lander Code

Sample Code from Amazon docs:

<head>
  <script type='text/javascript'>
    window.onAmazonLoginReady = function() {
      amazon.Login.setClientId('your Amazon Pay client_id');
    };
    window.onAmazonPaymentsReady = function() {
      //get parameters from the URL query string
      const urlParams = new URLSearchParams(window.location.search);
      //access_token will be returned in URL after customer has logged into Amazon
      //access_token needs to be sent in Import Order API calls as amazonAddressConsent parameter
      if(urlParams.has("access_token")) {
        const amazonAccessToken = urlParams.get("access_token");
        //get Amazon profile details: username, email address, userID
        //Send profileResponse.email as emailAddress parameter on Import Order API call
        //Parse profileResponse.name and send as firstName and lastName parameters on Import Order API call
        let profileResponse;
        $.ajax({
            async: false,
            type: "GET",
            // cors: true,
            headers: {
                "Authorization": "bearer "+amazonAccessToken 
            },
            url: "https://api.amazon.com/user/profile",
            success: function (result) {
                profileResponse = result;
            },
            error: function (xhr) {
                return xhr.status;
            }
        });
        showAddressBook();
        showWallet();
      } else {
         showButton();
      }
    };
  </script>
    <script async="async" src='https://static-na.payments-amazon.com/OffAmazonPayments/us/js/Widgets.js'>
  </script>
</head>

<body>
. . .
 <div id="AmazonPayButton">
 </div>
 <div id="addressBookWidgetDiv">
 </div>
 <div id="walletWidgetDiv">
 </div>
  ...
 <script type="text/javascript">
    function showButton(){
      var authRequest; 
      OffAmazonPayments.Button("AmazonPayButton", "your Amazon Pay merchant_id", { 
        type:  "TYPE (choose LwA or PwA)", 
        color: "COLOR (choose between Gold, LightGray, DarkGray)", 
        size:  "SIZE (choose between small, medium, large, x-large)", 

        authorization: function() { 
        loginOptions = {scope: "profile payments:widget payments:shipping_address", 
          popup: "true"}; 
        authRequest = amazon.Login.authorize (loginOptions, 
          window.location.href); 
        }, 
 
        onError: function(error) { 
          // your error handling code.
          // alert("The following error occurred: " 
          //        + error.getErrorCode() 
          //        + ' - ' + error.getErrorMessage());
        } 
     });
    }; 
   </script>
   <script>
   function showAddressBook() {
    new OffAmazonPayments.Widgets.AddressBook({
      sellerId: 'your Amazon Pay merchant_id',
      onOrderReferenceCreate: function(orderReference) {
        // Here is where you can grab the Order Reference ID.
        //send this in the Import Order API as the amazonOrderId parameter
        orderReference.getAmazonOrderReferenceId();
      },
      onAddressSelect: function(orderReference) {
        // Replace the following code with the action that you want
        // to perform after the address is selected. The
        // amazonOrderReferenceId can be used to retrieve the address
        // details by calling the GetOrderReferenceDetails operation.
  
        // If rendering the AddressBook and Wallet widgets
        // on the same page, you do not have to provide any additional
        // logic to load the Wallet widget after the AddressBook widget.
  
        // The Wallet widget will re-render itself on all subsequent
        // onAddressSelect events without any action from you.
        // We don't recommend that you explicitly refresh it.
      },
      design: {
        designMode: 'responsive'
      },
      onReady: function(orderReference) {
        // Enter code here that you want to be executed
        // when the address widget has been rendered.
      },
  
      onError: function(error) {
        // Your error handling code.
        // During development you can use the following
        // code to view error messages:
        // console.log(error.getErrorCode() + ': ' + error.getErrorMessage());
        // See "Handling Errors" for more information.
      }
    }).bind("addressBookWidgetDiv");
  }
</script>
<script>
function showWallet(){
  new OffAmazonPayments.Widgets.Wallet({
    sellerId: 'your Amazon Pay merchant_id',
    onPaymentSelect: function(orderReference) {
      // Replace this code with the action that you want to perform
      // after the payment method is chosen.

      // Ideally this would enable the next action for the buyer
      // including either a "Continue" or "Place Order" button.
    },
    design: {
      designMode: 'responsive'
    },

    onError: function(error) {
      // Your error handling code.
      // During development you can use the following
      // code to view error messages:
      // console.log(error.getErrorCode() + ': ' + error.getErrorMessage());
      // See "Handling Errors" for more information.
    }
  }).bind("walletWidgetDiv");
}
</script>
   . . .
   <script type="text/javascript">
     document.getElementById('Logout').onclick = function() {
       amazon.Login.logout();
     };
   </script>

</body>

Send Amazon Pay Parameters with Import Order API Call

Send these parameters during Import Order API call

  • paySource: “AMAZON”

  • amazonBillerId: ID of Amazon Pay MID in the CRM (found on the MID List page)

  • amazonAddressConsent: access_token returned to your checkout page via the URL by Amazon

  • amazonOrderId: obtained in the AddressBook onOrderReferenceCreate function with orderReference.getAmazonOrderReferenceId();

Transaction Flow

Customer clicks Amazon-generated Amazon Pay button on checkout page.

New window pops up for customer to log into Amazon

Customer returned to checkout page with access_token in URL query string.

access_token is used with Amazon profile API to obtain the firstName, lastName, and emailAddress parameters to send on Import Order API call. Send profileResponse.email as emailAddress parameter on Import Order API call. Parse profileResponse.name and send as firstName and lastName parameters on Import Order API call.

Call functions to display the Amazon AddressBook and Wallet widgets.

Obtain Amazon Order Reference ID to send on Import Order API call as amazonOrderId parameter in the AddressBook onOrderReferenceCreate function with orderReference.getAmazonOrderReferenceId();

Customer chooses shipping address and payment method from Amazon-generated widgets.

Import Order with parameters: paySource=AMAZON, amazonBillerId, amazonOrderId, amazonAddressConsent (access_token).

Upsells

Repeat JavaScript process on your upsell page and send amazonBillerId, amazonOrderId, amazonAddressConsent on Import Upsale API call.

Enable Recurring Payments

Follow the same integration steps as for one-time payments above and replace the Amazon AddressBook and Wallet widget code and add the Consent widget code as follows:

<script>
  new OffAmazonPayments.Widgets.AddressBook({
    sellerId: 'your Amazon Pay merchant_id',
    agreementType: 'BillingAgreement',
     
    onReady: function(billingAgreement) {
      var billingAgreementId = billingAgreement.
      getAmazonBillingAgreementId();
    },
    onAddressSelect: function(billingAgreement) {
      // Replace the following code with the action that you want to perform
      // after the address is selected.
      // The amazonBillingAgreementId can be used to retrieve
      // the address details by calling the GetBillingAgreementDetails operation.
      // If rendering the AddressBook and Wallet widgets on the same page, you
      // should wait for this event before you render the Wallet widget for
      // the first time.
      // The Wallet widget re-renders itself on all subsequent
      // onAddressSelect events without any action from you. We don't
      // recommend that you explicitly refresh it.
    },
    design: {
      designMode: 'responsive'
    },
    onError: function(error) {
      // your error handling code
    }
  }).bind("addressBookWidgetDiv");
</script>
<script>
  new OffAmazonPayments.Widgets.Wallet({
    sellerId: 'your Amazon Pay merchant_id',
    // amazonBillingAgreementId obtained from the AddressBook widget
    amazonBillingAgreementId: amazonBillingAgreementId,
    onPaymentSelect: function(billingAgreement) {
      // Replace this code with the action that you want to perform
      // after the payment method is selected.
    },
    design: {
      designMode: 'responsive'
    },
    onError: function(error) {
      // your error handling code
    }
  }).bind("walletWidgetDiv");
</script>
<div id="consentWidgetDiv">
</div>
<script>
new OffAmazonPayments.Widgets.Consent({
  sellerId: 'your Amazon Pay merchant_id',
  // amazonBillingAgreementId obtained from the Amazon Address Book widget. 
  amazonBillingAgreementId: amazonBillingAgreementId, 
  design: {
    designMode: 'responsive'
  },
  onReady: function(billingAgreementConsentStatus){
    // Called after widget renders
    buyerBillingAgreementConsentStatus =
      billingAgreementConsentStatus.getConsentStatus();
    // getConsentStatus returns true or false
    // true - checkbox is selected
    // false - checkbox is unselected - default
  },
  onConsent: function(billingAgreementConsentStatus) {
    buyerBillingAgreementConsentStatus =
      billingAgreementConsentStatus.getConsentStatus();
    // getConsentStatus returns true or false
    // true - checkbox is selected - buyer has consented
    // false - checkbox is unselected - buyer has not consented

    // Replace this code with the action that you want to perform
    // after the consent checkbox is selected/unselected.
   },
  onError: function(error) {
    // your error handling code
   }
}).bind("consentWidgetDiv ");
</script>

The customer will be required to check the “Use my selected payment method for future purchases and payments to this merchant” box in the Amazon-generated consent widget to complete the purchase.

Send the amazonBillingAgreementId as the amazonOrderId parameter on your Import Order API call.


Errors/Decline Messages

Below you will find common errors that other users have encountered when using Amazon Pay.

Error
Cause
Fix

InvalidPaymentMethod

The customer’s payment method inside Amazon is no longer valid.

Customer must ensure that all payment methods inside their Amazon account are valid.

Log in to

For more information on adding Amazon Pay widgets and Javascript visit

For more information on adding Amazon Pay widgets and Javascript visit

https://sellercentral.amazon.com
https://developer.amazon.com/docs/amazon-pay-onetime/add-a-button.html
https://developer.amazon.com/docs/amazon-pay-automatic/add-address-and-wallet-widgets.html
https://sellercentral.amazon.com
Creating Amazon Pay App And Adding Your Domain
Obtain Amazon Pay MID Credentials
Create Amazon Pay MID
Add Amazon Pay Widgets and JavaScript to Your Lander Code
Send Amazon Pay Parameters with Import Order API Call
Transaction Flow
Upsells
Enable Recurring Payments
Errors/Decline Messages