Skip to content

Latest commit

 

History

History
83 lines (48 loc) · 2.29 KB

amazonpayshippinginitializeoptions.md

File metadata and controls

83 lines (48 loc) · 2.29 KB

@bigcommerce/checkout-sdkAmazonPayShippingInitializeOptions

Interface: AmazonPayShippingInitializeOptions

A set of options that are required to initialize the shipping step of checkout in order to support Amazon Pay.

When Amazon Pay is initialized, a widget will be inserted into the DOM. The widget has a list of shipping addresses for the customer to choose from.

Hierarchy

  • AmazonPayShippingInitializeOptions

Index

Properties

Methods

Properties

container

container: string

The ID of a container which the address widget should insert into.

Methods

Optional onAddressSelect

onAddressSelect(reference: AmazonPayOrderReference): void

A callback that gets called when the customer selects an address option.

Parameters:

Name Type Description
reference AmazonPayOrderReference The order reference provided by Amazon.

Returns: void


Optional onError

onError(error: AmazonPayWidgetError | StandardError): void

A callback that gets called if unable to initialize the widget or select one of the address options provided by the widget.

Parameters:

Name Type Description
error AmazonPayWidgetError | StandardError The error object describing the failure of the initialization.

Returns: void


Optional onReady

onReady(reference: AmazonPayOrderReference): void

A callback that gets called when the widget is loaded and ready to be interacted with.

Parameters:

Name Type Description
reference AmazonPayOrderReference The order reference provided by Amazon.

Returns: void