> ## Documentation Index
> Fetch the complete documentation index at: https://developer.uphold.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Widgets API introduction

> Create the sessions that let your app embed Uphold widgets, such as the Payment, Travel Rule and KYC widgets, for a user.

The Widgets API creates sessions for Uphold [widgets](https://developer.uphold.com/widgets/introduction.md): ready-made UIs that you embed in your app to handle parts of a flow for the user, such as linking a payment method, collecting Travel Rule information or verifying their identity.

## How it works

Every widget runs against a session: a short-lived authorization for one user and one flow. The flow decides what the widget shows and what it returns to your app.

1. **Create a session on your backend.** Call the Widgets API on behalf of the user, with the flow and, optionally, the widget options, such as its theme and layout.
2. **Load the widget in your app.** Pass the session to the widget's SDK, or load its `url` in a WebView. The widget then guides the user through the flow and talks to Uphold directly.
3. **Handle the result.** The widget emits events for your app to act on, such as `complete` with the result of the flow, or `error`.

A session can only be loaded once, and it expires shortly after it's created, so create a new one each time the user opens a widget.

> [!WARNING]
>
> Always create sessions on your backend. It needs your client credentials, which must never reach the client.

## Widgets

Each widget has its own session endpoint and flows. Start with the widget's introduction to choose a flow, then see its installation and setup guide.

| Widget | Use it to |
| - | - |
| [Payment Widget](https://developer.uphold.com/widgets/payment/introduction.md) | Let users link and select payment methods, and authorize deposits, withdrawals and on-ramp orders, including any challenge such as 3DS. |
| [Travel Rule Widget](https://developer.uphold.com/widgets/travel-rule/introduction.md) | Collect the Travel Rule information that crypto deposits and withdrawals require. |
| [KYC Widget](https://developer.uphold.com/widgets/kyc/introduction.md) | Collect the user's KYC data, such as their profile, identity documents and due diligence questionnaires. |
