@inpost-pay/widget
v2.0.11
Published
## Description
Downloads
803
Maintainers
Readme
InPostPay Widget
Description
A frontend component (a widget) that can be embedded in a merchant’s website to allow customers to link their shopping basket with their InPost Pay account. InPost Pay is a payment solution offered by InPost, a logistics company that provides parcel locker services and delivery options, aiming to simplify e-commerce transactions.
Get in touch for access credentials and onboarding. https://inpostpay.pl
Changelog
2.0.11
- Added support for failing
unboundWidgetClicked
. Error('UNDELIVERABLE_PRODUCT') won't show error popup and binding popup.
2.0.10
- Emulate click on widget (including calling
unboundWidgetClicked
) after "connect with another phone"
2.0.9
- Do not use browserId in re-initialise request right after deletion
2.0.8
- Clean browserId in local storage after binding deletion
2.0.7
- Updated default Inpost widget API url
2.0.6
- Deep-link target app is dynamically calculated from api url (
WidgetInitOptions#apiBaseUrl
), production by default.
2.0.5
- Widget is refreshing itself when basket has been changed by a customer on merchant's web page
2.0.4
- Added
refresh
to widget instance. Calling the method will re-fetch widget state from InPost backend and re-render widget(s) on the page.
export interface InPostPayWidget {
refresh: (options?: Partial<WidgetInitOptions>) => void
}
Example
import { initialiseInpostPayWidget } from '@inpost-pay/widget'
// ...
const widget = initialiseInpostPayWidget({
merchantClientId: 'merchantClientId'
});
// ...
widget.refresh()
// or
widget.refresh({
basketBindingApiKey: 'basketBindingApiKey'
})