For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
DocsAPI Reference
DocsAPI Reference
    • End Points
  • PARTNER
    • GETGet Orders
    • GETGet Order By ID
    • GETGet Webhooks
    • POSTRefresh Access Token
    • POSTCreate Widget URL
  • COUNTRIES
    • GETGet Countries
  • CURRENCIES
    • GETGet Crypto Currencies
    • GETGet Fiat Currencies
    • GETGet Price
    • GETVerify Wallet Address
  • TRANSAK WHITELABEL API
    • End Points
Dashboard
LogoLogo
PARTNER

Create Widget URL

||View as Markdown|
POST
https://api-gateway-stg.transak.com/api/v2/auth/session
POST
/api/v2/auth/session
$curl -X POST https://api-gateway-stg.transak.com/api/v2/auth/session \
> -H "access-token: " \
> -H "Content-Type: application/json" \
> -d '{
> "widgetParams": {
> "apiKey": "abc123def456ghi789jkl012mno345pq",
> "referrerDomain": "partner.example.com"
> }
>}'
1{
2 "data": {
3 "widgetUrl": "https://global-stg.transak.com?apiKey=abc123def456ghi789jkl012mno345pq&sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1ZDg3Y2YxMi1hYmNkLTQ1ZjYtYmYxMi1hYmNkZWYxMjM0NTYiLCJpYXQiOjE2ODgwMz"
4 }
5}
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>
Was this page helpful?
Previous

Refresh Access Token

Next

Get Countries

Built with

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.

EnvironmentBase URL
Staginghttps://api-gateway-stg.transak.com
Productionhttps://api-gateway.transak.com

Call this API only from the partner backend, with partner IPs whitelisted. Direct frontend calls are not supported.

apiKey and referrerDomain are mandatory query parameters inside the widgetParams object.

Headers

access-tokenstringRequired

Your Partner Access Token. Please refer here for a tutorial on generating your access token.

authorizationstringOptional
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