Create Widget URL

View as Markdown
This API creates a `widgetUrl` to securely store widget query parameters and authentication context. This facilitates secure widget interactions by encapsulating info in a sessionId, reducing exposure in client-side requests. Use the returned `widgetUrl` to load the Transak Widget. This URL expires 5 minutes after creation. **Important:** - Each `sessionId` is single-use. - The widget cannot be reopened using the same `widgetUrl`. - A new `sessionId` is required for every new user flow. | Environment | Base URL | | :---------- | :------- | | Staging | https://api-gateway-stg.transak.com | | Production | https://api-gateway.transak.com | <Callout intent="note"> Call this API only from the partner backend, with partner IPs whitelisted. Direct frontend calls are not supported. </Callout> <Callout intent="warning"> `apiKey` and `referrerDomain` are mandatory query parameters inside the `widgetParams` object. </Callout>

Headers

access-tokenstringRequiredDefaults to YOUR_ACCESS_TOKEN

Your Partner Access Token, you can generate one using our Refresh Access Token endpoint

authorizationstringOptionalDefaults to YOUR_USER_AUTH_TOKEN
User Authorization Token. Only required in Integrations via User Authentication APIs.

Request

This endpoint expects an object.
widgetParamsobjectRequired

Transak Widget accepts query parameters as a JSON object. Below are some example query parameters. You can refer to the complete list of Transak Query Parameters for more configuration options.

Response

Success
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error