Auto Direct Debit
Light Mode
Web SDK
Web SDK
Enable Subscribe Direct Debit into into your website with javascript.
The Bill24 Web SDK with javascript helps you build customizable to enable subscirbe direct debit from Web. We provide powerful and customizable UI screens and allow your customer to make payment Easier and Faster.
1 How to integrate
Frist, you can get Bill24 libary SDK from npm , please check the latest version.
To install the SDK, use npm
npm install b24-direct-debit-sdk
Or import direct from the CDN:
<script src="https://unpkg.com/b24-direct-debit-sdk" type="module"></script>
Now you can access our function
to initiate SDK.
To initiate SDK or load SDK you must use this class name b24SubscriptionSdk
Usage
For frontend app
import b24SubscriptionSdk from b24-direct-debit-sdk;
b24SubscriptionSdk.initSdk(configuration);
For raw html
<script>
b24SubscriptionSdk.initSdk(configuration);
</script>
Parameters Request:
Field | Type | Remark |
---|---|---|
context | Context* | key (context) current text to open BottomSheet |
subscriptionNo | String* | Subscription number at Bill24 |
side | ||
refererKey | String* | Can be any key to identity the client side or referer URL |
language | String | The language to display km : Khmer*(default)* en : English |
darkMode | Boolean | The option display themes payment checkout false : Theme Light (default) true : Theme Dark |
isProduction | Boolean | The option for environment false : For environment testing*(default)* true : For environment production |
isPopup | Boolean | Allow SDK to popup or redirect. default is true |
Example code:
const configuration = {
subscriptionNo:'GKO9JG7K4kqC',
refererKey:'d945botz-dc54-483d-9759-f9858a9211a0',
language :'en',
isDarkMode : false,
isProduction: false,
isPopup: true
}
:::note
Use this endpoint to Init Subscription.
:::
Last modified: 3 months ago