Create Widget URL (Cards, Apple Pay)

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. <Callout intent="note"> This API should be called only from the partner’s backend and subjected to the whitelisting of partner's IPs addresses. Direct API calls from the frontend apps are not supported. Each widgetUrl can be used only once and is valid only for 5 minutes from the time of creation. </Callout>

Headers

authorizationstringRequiredDefaults to USER_AUTHORIZATION_TOKEN

Authorization token is the accessToken received from the API - api/v2/auth/verify

access-tokenstringRequiredDefaults to PARTNER_ACCESS_TOKEN

Your Partner Access Token, you can generate one using our /api/v2/refresh-token public endpoi

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 headers

Datestring
The date and time when the response was generated.
Transfer-Encodingstring
The form of encoding used to transfer the response payload.
Connectionstring
Connection management options for this response.
trace-idstring

Response header trace-id.

varystring
Response header vary.
access-control-allow-credentialsstring

Response header access-control-allow-credentials.

access-control-expose-headersstring

Response header access-control-expose-headers.

Cache-Controlstring
Caching directives for this response.
cf-cache-statusstring

Response header cf-cache-status.

Strict-Transport-Securitystring

Response header Strict-Transport-Security.

X-Content-Type-Optionsstring

Response header X-Content-Type-Options.

Serverstring
Information about the origin server.
CF-RAYstring

Response header CF-RAY.

Content-Encodingstring
The encoding applied to the response body.
alt-svcstring

Response header alt-svc.

Response

200 - Success

dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error