DD SDK
Available library/SDK for quick integration
STEPS ON USING THE NEW SDK INSIDE YOUR APP (Web, Mobile, Backend)
-
Base URL - https://api.prembly.com
-
After creating the widget on the dashboard, make a request to this endpoint to initialize the SDK for a unique customer:
curl -X 'POST'
'https://api.prembly.com/checker/sdk/widget/initialize'
-H 'x-api-key: X_API_KEY'
-d '{
"email": "[email protected]",
"first_name": "string",
"last_name": "string",
"user_ref": "unique_ref_for_user",
"config_id": "{config ID returned when SDK was created}",
"extra_metadata": {['Can be an array/object of extra data you want to add to the SDK']}
}'
You will get a response like:
{
"success": true,
"code": "",
"detail": "Initialization successful",
"data": {
"status": true,
"widget_id": "d57b1d89-8f6c-4ef3-99e8-4c88bc71fd6b"
}
}
-
Get the widget_id value (d57b1d89-8f6c-4ef3-99e8-4c88bc71fd6b)
-
Then redirect the user to this URL: "https://sdk-view.prembly.com/{widget_id}"
- Sample URL: https://sdk-view.prembly.com/d57b1d89-8f6c-4ef3-99e8-4c88bc71fd6b
- You can also open the URL on the device browser, or webview/iframe inside your app, it depends on your preference.
Updated about 20 hours ago