@bigcommerce/checkout-sdk › AmazonPayPaymentInitializeOptions
A set of options that are required to initialize the Amazon Pay payment method.
When AmazonPay is initialized, a widget will be inserted into the DOM. The widget has a list of payment options for the customer to choose from.
- AmazonPayPaymentInitializeOptions
• container: string
The ID of a container which the payment widget should insert into.
▸ onError(error
: AmazonPayWidgetError | StandardError): void
A callback that gets called if unable to initialize the widget or select one of the payment options.
Parameters:
Name | Type | Description |
---|---|---|
error |
AmazonPayWidgetError | StandardError | The error object describing the failure. |
Returns: void
▸ onPaymentSelect(reference
: AmazonPayOrderReference): void
A callback that gets called when the customer selects one of the payment options provided by the widget.
Parameters:
Name | Type | Description |
---|---|---|
reference |
AmazonPayOrderReference | The order reference provided by Amazon. |
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