# JavaScript UI SDK

SensePass Front-end SDK allows front-end websites to control SensePass's wide variety of a payment methods through a simple UI (iFrame).

<div align="left"><figure><img src="/files/V46oImCzBEp9l0bfhPRe" alt=""><figcaption></figcaption></figure></div>

### Supported Payment Methods

1. Credit Cards
2. Apple Pay - No integration and authentication is required with Apple
3. Google Pay - No integration and authentication is required with Google
4. PayPal
5. Venmo
6. ACH
7. Affirm
8. Amazon Pay
9. Bit (IL locale)

{% hint style="info" %}
SensePass SDK enables you fast integration with all the payment methods listed above without having to whitelist your domain for Apple and Google
{% endhint %}

## SDK Flow

1. Add the SensePass's javascript SDK to your website's scripts ([Front-end SDK](https://js.sensepass.com/scripts/sensepass-front-end@1.0.8.sdk.js)).
2. Initiate the SensePass client with your clientId
3. Listen to SDK events on the front-end
4. Call sensepass.pay() on form submission on the front-end
5. On successful callback from the SDK - get the transactionNumber
6. Call from your backend to the API **/transactions/:transactionNumber/commit** with the transactionNumber to capture the payment, see [Commit Transaction](/sensepay/transaction-api/sdk-and-iframes/javascript-ui-sdk/commit-transaction.md) for further details

[**See here full the SDK API Flow**](/sensepay/transaction-api/sdk-and-iframes/javascript-ui-sdk/api.md)

## Security

1. The frontend uses client ID that does not have permissions to payment except for initalizing the SDK
2. The backend uses device ID / Merchant API Key / Branch API key for calling the [commit API](/sensepay/transaction-api/sdk-and-iframes/javascript-ui-sdk/commit-transaction.md)

## API

See the [API Page](/sensepay/transaction-api/sdk-and-iframes/javascript-ui-sdk/api.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sensepass.com/sensepay/transaction-api/sdk-and-iframes/javascript-ui-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
