@bigcommerce/checkout-sdk › 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.
- AmazonPayShippingInitializeOptions
• container: string
The ID of a container which the address widget should insert into.
▸ 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
▸ 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
▸ 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