Marqeta’s UX Toolkit is the successor to the Marqeta.js JavaScript library. The UX Toolkit reduces some of the PCI compliance burden related to sensitive card info for companies.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.
Authentication Endpoint
You will need to implement an Authentication API. 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_tokenendpoint
UX Toolkit Bootstrapping
Follow Marqeta’s instructions on embedding and bootstrapping here. Embedding the Toolkit in your webpage is as simple as adding: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 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 endpoint. The endpoint returns a theme_name that can be passed to the Toolkit when bootstrapping.