curl --request POST \
--url https://app.sideshift.app/api/embed/auth/token \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"sideshiftAccountId": "acct_a1b2c3d4e5f6",
"widgetType": "both",
"expiresInSeconds": 3600
}
'import requests
url = "https://app.sideshift.app/api/embed/auth/token"
payload = {
"sideshiftAccountId": "acct_a1b2c3d4e5f6",
"widgetType": "both",
"expiresInSeconds": 3600
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sideshiftAccountId: 'acct_a1b2c3d4e5f6',
widgetType: 'both',
expiresInSeconds: 3600
})
};
fetch('https://app.sideshift.app/api/embed/auth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sideshift.app/api/embed/auth/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sideshiftAccountId' => 'acct_a1b2c3d4e5f6',
'widgetType' => 'both',
'expiresInSeconds' => 3600
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sideshift.app/api/embed/auth/token"
payload := strings.NewReader("{\n \"sideshiftAccountId\": \"acct_a1b2c3d4e5f6\",\n \"widgetType\": \"both\",\n \"expiresInSeconds\": 3600\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sideshift.app/api/embed/auth/token")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sideshiftAccountId\": \"acct_a1b2c3d4e5f6\",\n \"widgetType\": \"both\",\n \"expiresInSeconds\": 3600\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/embed/auth/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sideshiftAccountId\": \"acct_a1b2c3d4e5f6\",\n \"widgetType\": \"both\",\n \"expiresInSeconds\": 3600\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIs...",
"expiresAt": "2026-03-13T13:00:00.000Z",
"expiresInSeconds": 3600,
"widgetUrls": {
"payout": "https://app.sideshift.app/widget/payout/eyJ...",
"payin": "https://app.sideshift.app/widget/payin/eyJ..."
}
}
}Generate a short-lived access token for an embedded widget session.
Create tokens server-side and pass the returned widgetUrls to your frontend as iframe sources.
Lifetime: 1 minute to 24 hours (default 1 hour).
Escrow: When escrowMode is true (pay-in only), deposits go to your company wallet instead of the user’s.
Card authentication: New pay-in sessions use Whop. Set threeDsLevel to choose the card setup preference. The default is frictionless_if_required; null also uses frictionless 3DS. Whop risk and authentication recovery rules can require a challenge. This setup preference does not override payment-mode plan policies. allowFraudBypass is deprecated and no longer enables Stripe for new sessions.
curl --request POST \
--url https://app.sideshift.app/api/embed/auth/token \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"sideshiftAccountId": "acct_a1b2c3d4e5f6",
"widgetType": "both",
"expiresInSeconds": 3600
}
'import requests
url = "https://app.sideshift.app/api/embed/auth/token"
payload = {
"sideshiftAccountId": "acct_a1b2c3d4e5f6",
"widgetType": "both",
"expiresInSeconds": 3600
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sideshiftAccountId: 'acct_a1b2c3d4e5f6',
widgetType: 'both',
expiresInSeconds: 3600
})
};
fetch('https://app.sideshift.app/api/embed/auth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.sideshift.app/api/embed/auth/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sideshiftAccountId' => 'acct_a1b2c3d4e5f6',
'widgetType' => 'both',
'expiresInSeconds' => 3600
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sideshift.app/api/embed/auth/token"
payload := strings.NewReader("{\n \"sideshiftAccountId\": \"acct_a1b2c3d4e5f6\",\n \"widgetType\": \"both\",\n \"expiresInSeconds\": 3600\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sideshift.app/api/embed/auth/token")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sideshiftAccountId\": \"acct_a1b2c3d4e5f6\",\n \"widgetType\": \"both\",\n \"expiresInSeconds\": 3600\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/embed/auth/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sideshiftAccountId\": \"acct_a1b2c3d4e5f6\",\n \"widgetType\": \"both\",\n \"expiresInSeconds\": 3600\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIs...",
"expiresAt": "2026-03-13T13:00:00.000Z",
"expiresInSeconds": 3600,
"widgetUrls": {
"payout": "https://app.sideshift.app/widget/payout/eyJ...",
"payin": "https://app.sideshift.app/widget/payin/eyJ..."
}
}
}Authorizations
Your SideShift Connect API key (sk_live_* or sk_test_*). Generate from Settings → Connect.
Body
"acct_a1b2c3d4e5f6"
payout, payin, both "both"
Token lifetime in seconds
60 <= x <= 86400Embedding domain (must be in allowed domains)
Route pay-in deposits to your company wallet
Override escrow destination (defaults to your company)
Whop card setup 3DS preference. mandate_challenge requires a challenge; mandate_if_required mandates one only when the processor requires it; frictionless_if_required and null use frictionless 3DS. Risk and authentication recovery rules can override the preference. Payments of $1,000 or more use mandate_if_required unless mandate_challenge is selected. Payment mode uses the plan policy. This choice is bound to the session and cannot be changed by the payer.
mandate_challenge, mandate_if_required, frictionless_if_required, null Deprecated alias for the default Whop frictionless setup preference. An explicit threeDsLevel takes precedence. Does not enable Stripe or guarantee that a challenge will be skipped. Previously issued Stripe sessions remain valid until their original expiry (at most 24 hours).