API
Embed your website/checkout-page with our payments widget using our web-component or iframe SDK.
Jump to it
Sample App
You can play around with the SDK in SensePass's Front-end Playground website
The SDK exposes a few methods to let you operate the iFrame in various ways.
Script
SensePass Elements
Latest industry standard of web-components, making our widget native to your web-page. No unnecessary pop-ups, easy-to-handle UI (CSS) & faster load-times thanks to native script caching.
Add the following SDK and add it to your front-end website's scripts: https://js.sensepass.com/scripts/[email protected]
<html>
<head>
<script src="https://js.sensepass.com/scripts/[email protected]" type="application/javascript"></script>
</head>
</html>iFrame SDK (Deprecated)
Legacy industry standard, using an iframe embedded widget to handle payments SDK.
Add the following SDK and add it to your front-end website's scripts: https://js.sensepass.com/scripts/[email protected]
<html>
<head>
<script src="https://js.sensepass.com/scripts/[email protected]" type="application/javascript"></script>
</head>
</html>SensePass Express
Speed up the checkout process with the user's shipping & billing information available after they complete the payment process.
Latest industry standard of web-components, making our widget native to your web-page. No unnecessary pop-ups, easy-to-handle UI (CSS) & faster load-times thanks to native script caching.
Implement the following Express SDK by adding it to your front-end website's scripts: https://js.sensepass.com/scripts/[email protected]
Security
The frontend uses client ID that does not have permissions to payment except for initalizing the SDK
The backend uses device ID / Merchant API Key / Branch API key for calling the commit API
Using the JS API
Step 1 - Configuration
Create a global variable in your front-end website called SensePassFrontEndSDK.
Set the following configuration for the sandbox or production environment:
Payment Response:
Create an HTML element with the id sensepass-front-end.
Step 2 - Initiate the iFrame element
Initiate the iframe with the init method:
Step 3 - Style the frame dimensions (optional)
Use the method frameDimensions to get the iframe's width & height value (in pixels).
Assuming you have an element <div id="sensepass-front-end"></div> you may get its iFrame (as its first child element) and apply the following callback's dimensions:
Step 4 - Listen to callback events
Using the above example, you may hook on to the following callbacks aswell:
Step 5 - Pay button event
Use the pay method to let the payment method trigger its payment request:
Pay button event - For manual capture transaction type - see our docs here
Step 6 - Commit payment from your backend (Backend verification)
Last updated
Was this helpful?
