Amazon payments is only supported for hosted pages users. It is not supported with API or iFrame embedded hosted pages yet.
Checkout by Amazon is an additional payment method you can offer your customers with an Amazon Buyer Account. During checkout, your customers can choose between a card payment method or with Pay with Amazon. Once they choose Amazon as their payment method, they need to login to their Amazon account and authorize payments.
After the checkout is done using this payment method, we store the billing agreement in Chargebee and use it for all future payments. Customers can change their payment method through the customer portal or you can do this on their behalf.
Customers can only have one payment method at a time. If card details are updated for a customer, their Amazon account details will automatically be removed.
Step 1: Connect your Amazon Payments Account
To do this, go to Settings > Gateway Settings in Chargebee and click on Add a Gateway. This will direct you to a list of Gateways supported in Chargebee. Choose Amazon Payments from the list.
Step 2: On the Amazon Payments configuration page, click on Connect and follow the prompts to log in to your Amazon Seller Account
Step 3: Associate your Amazon Seller Account with Chargebee
The configurations you need to enter here are:
Application Name - This would be Chargebee and you can configure a name here that you can easily identify when you're logged in to your Amazon console.
Application Description - A short description of your Chargebee site.
Allowed login domains - Your Chargebee domain. The URL that is allowed to connect with your Amazon Buyer Account. For example, https://acmeinc.chargebee.com . Note that during testing, configure your Chargebee TEST domain name and later on you can change this in your Amazon account console(explained below). You should also include your Chargebee customer portal domain name if you've enabled the customer portal through the Amazon account console.
Step 4: Agree to Amazon's terms and login
Once this is done, your Amazon account credentials will be stored in Chargebee.
Step 5: Include a Seller Note
Content entered here will be shown to your customers when they log in to their Amazon Buyer Account console.
Step 6: Specify additional settings and save the setup
Ensure that Enable to show Amazon Payment as an option to your customers is enabled so that users will see the Amazon Payment option on the hosted checkout page and customer portal.
You need to configure and setup your Amazon account to allow checkout through a 3rd party shopping cart. To do this, login to your Amazon Seller Central and select Amazon Payments Advanced.
You will see 2 of them - Production View & Sandbox View. When you're initially testing Amazon Payments, we recommend using the Sandbox View along with your Chargebee TEST site.
Step 1: Configure your Integrator URL
You will find this URL in Chargebee under Settings > Gateway Settings > Amazon Payments
Configure this under Settings > Integration Settings in Amazon.
If you don't see Integration Settings in your Settings menu, ensure that you have selected Amazon Payments Advanced as indicated above.
This is your Chargebee domains and you will find them under Settings > Gateway Settings > Amazon Payments. Copy these URLs.
Switch to Login with Amazon and select your Chargebee application on the left.
Scroll down to Web Settings and edit it.
Paste the URLs you copied from Chargebee and save it.
Add your Chargebee TEST and LIVE site domains here. If you're using Chargebee's customer portal, add those domains as well.
If you've enabled Amazon payments in your gateway settings as explained above, customers will see it as an option during a hosted page checkout.
After they select Amazon and click on Pay with Amazon, they will be prompted to enter their Amazon Buyer Account credentials.
Once the customer's account is successfully authenticated, they can see their address and payment details. Here they can choose which address and card to use.
Customers also have the option of adding a new address or card to their Amazon account from here.
Customers then have to authorize using their account by checking the box and then clicking on Next.
Now they can verify their order summary and also update their address details if required. At the bottom of the page, they can see their Amazon payment information and they also have the option of changing their payment method, if needed.
To accept payments via Amazon Payments using your custom checkout page, here's the process to be followed in a nutshell:
P.S. Chargebee's Hosted Pages can still come to your rescue if you'd want to skip integrating with Amazon directly and quickly start accepting payments via Amazon Payments.
Chargebee uses the billing agreement id of Amazon Payments to capture future payments.
Chargebee takes over from Step 8 of the above process. Set up Amazon Payments in your website by following Steps 1-7.
After Step 7 (Set Billing Agreement Details and Confirm the Agreement )of the process, pass the Billing Agreement information along with the subscription details to Chargebee.
After customers authorize their payment via Amazon, a billing agreement is created. Chargebee requires this Billing Agreement id to charge customers for all future recurring payments.
The Billing Agreement id can be passed to Chargebee with the payment_method[reference_id] parameter, using any of the following APIs:
Refer here for further information.
Chargebee then sends this billing agreement id to Amazon to validate it. After validation, the Billing Agreement id is stored at Chargebee's end and used to charge the customer for future payments.
While creating a subscription for an existing customer, the option to specify the payment method information is not available. This is because, the payment method information is linked to customers and not the subscriptions.
Now read about implementing Amazon Payments with Chargebee here.