Integrating without the AddressBook widget

In some cases, such as when you are selling digital products or want to collect a buyer's address on your own, you might not want to collect the buyer's address from the AddressBook widget.

Note: If you do not use the Amazon AddressBook widget to collect an address from the buyer, the transaction is not covered under the Amazon Pay Payment Protection Policy. For more information about the Amazon Pay Payment Protection Policy, see the Amazon Pay User Agreement.

When an AddressBook widget is shown, an Order Reference object is created. When you integrate without an AddressBook widget, you need to create an Order Reference object by specifying an onOrderReferenceCreate callback function as one of the parameters in the Wallet widget call.

The onOrderReferenceCreate function is called with an Order Reference object when the widget renders. You can get the orderReferenceId by calling the getAmazonOrderReferenceId() function on the Order Reference object. You must store the Order Reference ID as you will need it throughout transaction processing.

The following example shows how to render the Wallet widget when you do not use the AddressBook widget: