Creates a URL for redirecting a visitor from an external client site to a Wix page for Wix-managed functionality.
The Create Redirect Session method enables your external Wix Headless client site, built on any platform, to integrate Wix-managed frontend functionality for specific processes. For example, your site can temporarily redirect a visitor to Wix for authentication, or for a checkout process for bookings, eCommerce, events, or paid plans transactions.
To initiate a redirect session:
Details of pages to redirect the visitor back to on the Wix Headless client site.
When redirecting to any callback URL, Wix specifies the boolean wixMemberLoggedIn
parameter.
If true
, a member logged in during the preceding Wix-managed process.
Note: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in auth.authRequest.redirectUri
.
Optional preferences for customizing redirection to Wix pages.
Information required for generating a custom URL for a Wix Bookings checkout.
Information required for generating a custom URL for a Wix eCommerce checkout.
Information required for generating a custom URL for a Wix Events checkout.
Information required for generating a custom URL for a Wix Paid Plans checkout.
Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated.
Information required for generating a custom URL to log out from a Wix account. This process invalidates the visitor or member token and clears cookies associated with the Wix domain from their browser.
Information required for generating a custom URL for Wix authentication.
Information required for generating a custom URL for a Wix stores product page.
Information required for generating a custom URL for Wix bookings book page.
Details for redirecting the visitor to a Wix page.
curl -X POST 'https://www.wixapis.com/redirect-session/v1/redirect-session' \
-H 'authorization: <AUTH>' \
-d '{
"ecomCheckout": {
"checkoutId": "7d2b240c-5c60-4580-8bc3-948bca6b4e4e"
},
"callbacks": {
"postFlowUrl": "https://www.my-store.com"
}
}'
{
"redirectSession": {
"id": "<REDIRECT_SESSION_ID>",
"fullUrl": "https://www.checkout.my-site.com/checkout?appSectionParams=%7B%22checkoutId%22%3A%227d2b240c-5c60-4580-8bc3-948bca6b4e4e%22%7D&headlessExternalUrls=~%28home~%27https*3a*2f*2fwww.my-store.com*%29"
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.