This is a 'bare-bones' demo to show how you can integrate Amazon Pay into your Alexa skill.
Read the integration guide: https://developer.amazon.com/docs/amazon-pay/amazon-pay-overview.html
Once your Alexa, Amazon Pay, AWS, and Developer accounts are ready you can modify this skill.
- Clone repository and install dependencies
- Open config.js and update values
appID
,sellerId
, andsandboxCustomerEmailId
- Zip files and upload to Lambda
- Link your accounts
- Enable testing for your skill and invoke it:
If you receive the message Thank you for ordering form Blitz and Chips
then you have successfully configured your skill! If you receive an error, proceed to the troubleshooting section.
If you are encountering issues with your skill, double check that you have completed the following:
- Confirm that your Seller Central account is in good standing by selecting the Production environment and verify there are no errors on your account
- Link the correct skill in the appropriate environment ( Sandbox / Production ) in Seller Central
- Create a sandbox buyer test account in Seller Central
- Enable Amazon Pay permissions in your skill under Build > Permissions > Amazon Pay
- Link the correct Lambda function in your skill under Build > Endpoints > Default Region
- Upload the correct .zip file with the updated values in config.js
- Link the correct skill Id in your Lambda function
- Give the correct permissions for the role to use your Lambda function
- Enable your skill in your Alexa App
- Consent and give permissions to Amazon Pay in your Alexa App
- Enable Voice Purchasing in your Alexa App
All other errors and decline handling can be found here: https://developer.amazon.com/docs/amazon-pay/payment-declines-and-processing-errors.html