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

# Overview

Marqeta's [UX Toolkit](https://www.marqeta.com/docs/developer-guides/uxt-landing-page/) is the successor to the [Marqeta.js](https://www.marqeta.com/docs/developer-guides/using-marqeta-js) JavaScript library. The UX Toolkit reduces some of the PCI compliance burden related to sensitive card info for companies.

### Authentication Endpoint

You will need to implement an [Authentication API](https://www.marqeta.com/docs/developer-guides/uxt-getting-started/#_set_up_your_api_url). When the UX Toolkit is bootstrapped on your webpage it will need to be passed the URL of this endpoint as a parameter. The Toolkit SDK will generate a Demonstrating Proof of Possession (DPoP) header as a short-lived JSON Web Token (JWT) and pass it to your endpoint.

* This endpoint must validate that the end user is authenticated in your systems
* Lookup the Treasury Prime person ID for the end user (e.g. `psn_123456`)
* Send a request to the Treasury Prime [`/person/{id}/uxt_access_token`](/reference/marqeta_uxtoolkit) endpoint

### UX Toolkit Bootstrapping

Follow Marqeta's instructions on embedding and bootstrapping [here](https://www.marqeta.com/docs/developer-guides/uxt-getting-started/#_pass_your_endpoint_via_the_bootstrap_function).

Embedding the Toolkit in your webpage is as simple as adding:

```html theme={null}
<script type="module" src="https://web.ux-toolkit.marqeta.com/trprime/releases/1/index.js" async crossorigin="require-credentials"></script>
```

to your HTML.

NOTE: this includes a reference to the Treasury Prime specific release `tprime`.

### Treasury Prime Endpoint

Treasury Prime will manage the RSA key generation and secret passing on your behalf within the [`/person/{id}/uxt_access_token`](/reference/marqeta_uxtoolkit) endpoint. The endpoint must receive the DPoP header Marqeta passed you via your Authentication Endpoint as a string parameter. On a successful authentication Treasury Prime will send back a response containing an `access_token` that must be sent back to the UX Toolkit client.

### Theme Customization

You can customize the look-and-feel of card products rendered by the UX Toolkit by uploading a theme via the [`/card/uxt_theme`](/reference/marqeta_uxt_theme) endpoint. The endpoint returns a `theme_name` that can be passed to the Toolkit when bootstrapping.

### Card Art

You can customize the card art rendered by the UX Toolkit for a given card product. This is a two-step process:

1. Upload the card art image as a PNG file via the [`POST /file`](/reference/post_file) endpoint. The response includes an `id` (e.g. `file_11jnd0n3nx`) that identifies the uploaded file.
2. Associate the uploaded file with a card product by calling [`POST /cardproduct/{card_product_id}/uxt_cardart`](/reference/marqeta_uxt_cardart). Pass the `id` from step 1 as `file_id`, and use `asset_type` to specify which side/asset of the card the image represents (e.g. `front`).
