General
SubscriptionJS.finalize(success, error)
SubscriptionJS.createElement(embeddableElement, embedInElement, config, style, error)
SubscriptionJS.finalize(success, error)
For interactive PSPs like PayPal this needs to be executed on the return page the PSP redirects to after finishing a payment. It triggers finalizing the order in billwerk. The success and error callback can be used to inform the customer if the order succeeded or not.
Please note that you must never rely on the finalize page is ever called during the order process, e.g. a customer could close the browser after successful payment or something else happens. Always use our webhooks to be notified a subscription was successful.
SubscriptionJS.createElement(embeddableElement, embedInElement, config, style, error)
SubscriptionJS offers createElement
to let you use different embeddable elements, like our paymentForm
iframe. A separated documentation can be found here.
Property | Type | Description |
---|---|---|
embeddableElement | string | Describes which element will be embedded. Currently we support only paymentForm |
embedInElement | DOM Element | Describes in which DOM element the embeddableElement will be embedded. |
config | object | Configuration object, consists of your public API key, payment methods, locale and Return URL, a more detailed description is found here |
style | object | Style object, which lets you control different properties used in the embeddable element, a more detailed description is found here |