Abowire
Search…
Getting Started with the Web SDK
The Abowire Web SDK is a frontend library you can add to your Website to easily integrate Abowire to your business. The Web SDK includes:
    Checkout SDK
    Customer Portal SDK

Getting Started

Before you get started, you will need to create a frontend API Key.

Installation

To install the Abowire Web SDK into your Website, copy & paste the SDK's script into the <head> section of the page.
1
<script src="https://sdk.abowire.com/abowire.min.js"></script>
2
<script>
3
abowire.config.changeConfig({
4
clientId: '<your client id>',
5
environment: 'sandbox'
6
});
7
</script>
Copied!
Parameter
Description
Is required
clientId
Your Abowire OAuth2 Client ID
Required
environment
Abowire environment (sandbox or production)
Required
sessionToken
A customer-bound Session Token
Optional
currency
Currency ISO code (eg. EUR)
Optional
locale
Language ISO code (eg. en_UK)
Optional
windowPosition
Position in which the dialog opens (left or center)
Optional

Using the SDK

After the SDK is loaded, a variable named abowire will be globally available (window.abowire).
Disable sessionStorage State Please note that the checkout saves the current state in sessionStorage. This means that if you refresh or leave and come back (given that you're using the same tab), it will resume the same state in which you left it. If you don't want this behavior, you can disable it by setting abowireDisableStorage = true before loading the SDK.
For example:
1
<script>
2
window.abowireDisableStorage = true;
3
</script>
4
5
<script src="https://sdk.abowire.com/abowire.min.js"></script>
6
<script>
7
abowire.config.changeConfig({
8
clientId: '<your client id>',
9
environment: 'sandbox'
10
});
11
</script>
12
Copied!
Render the checkout inside a custom element If you want to render the checkout inside a custom element, you can define it using abowireContainerId = 'myCustomDiv' before loading the SDK.
For example:
1
<div id="myCustomDiv">The checkout will be rendered here</div>
2
3
<script>
4
window.abowireContainerId = 'myCustomDiv';
5
</script>
6
7
<script src="https://sdk.abowire.com/abowire.min.js"></script>
8
<script>
9
abowire.config.changeConfig({
10
clientId: '<your client id>',
11
environment: 'sandbox'
12
});
13
</script>
14
Copied!
Last modified 6mo ago