curl --request POST \
--url https://app.sideshift.app/api/embed/checkout/sessions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amountCents": 5000,
"description": "Premium creator bundle",
"customerEmail": "buyer@example.com",
"successUrl": "https://example.com/checkout/success",
"cancelUrl": "https://example.com/cart",
"metadata": {
"orderId": "order_123"
}
}
'import requests
url = "https://app.sideshift.app/api/embed/checkout/sessions"
payload = {
"amountCents": 5000,
"description": "Premium creator bundle",
"customerEmail": "buyer@example.com",
"successUrl": "https://example.com/checkout/success",
"cancelUrl": "https://example.com/cart",
"metadata": { "orderId": "order_123" }
}
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({
amountCents: 5000,
description: 'Premium creator bundle',
customerEmail: 'buyer@example.com',
successUrl: 'https://example.com/checkout/success',
cancelUrl: 'https://example.com/cart',
metadata: {orderId: 'order_123'}
})
};
fetch('https://app.sideshift.app/api/embed/checkout/sessions', 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/checkout/sessions",
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([
'amountCents' => 5000,
'description' => 'Premium creator bundle',
'customerEmail' => 'buyer@example.com',
'successUrl' => 'https://example.com/checkout/success',
'cancelUrl' => 'https://example.com/cart',
'metadata' => [
'orderId' => 'order_123'
]
]),
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/checkout/sessions"
payload := strings.NewReader("{\n \"amountCents\": 5000,\n \"description\": \"Premium creator bundle\",\n \"customerEmail\": \"buyer@example.com\",\n \"successUrl\": \"https://example.com/checkout/success\",\n \"cancelUrl\": \"https://example.com/cart\",\n \"metadata\": {\n \"orderId\": \"order_123\"\n }\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/checkout/sessions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amountCents\": 5000,\n \"description\": \"Premium creator bundle\",\n \"customerEmail\": \"buyer@example.com\",\n \"successUrl\": \"https://example.com/checkout/success\",\n \"cancelUrl\": \"https://example.com/cart\",\n \"metadata\": {\n \"orderId\": \"order_123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/embed/checkout/sessions")
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 \"amountCents\": 5000,\n \"description\": \"Premium creator bundle\",\n \"customerEmail\": \"buyer@example.com\",\n \"successUrl\": \"https://example.com/checkout/success\",\n \"cancelUrl\": \"https://example.com/cart\",\n \"metadata\": {\n \"orderId\": \"order_123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "ck_abc123",
"status": "open",
"sideshiftAccountId": "acct_a1b2c3d4e5f6",
"amountCents": 5000,
"feeCents": 185,
"totalChargedCents": 5185,
"currency": "usd",
"paymentMethodType": "card",
"allowedPaymentMethods": [
"card",
"apple_pay",
"google_pay",
"paypal"
],
"url": "https://app.sideshift.app/connect/checkout/ck_abc123",
"hostedUrl": "https://app.sideshift.app/connect/checkout/ck_abc123",
"embedUrl": "https://app.sideshift.app/connect/checkout/ck_abc123/embed",
"widgetUrl": "https://app.sideshift.app/connect/checkout/ck_abc123/embed",
"checkoutConfigId": "chk_abc123",
"sandbox": false
}
}Create a public SideShift-hosted checkout link for your embed-enabled SideShift account.
Redirect any payer to data.url. The hosted page matches SideShift’s invoice payment UI and renders a SideShift checkout. When payment succeeds, the net amount is credited to your SideShift wallet and deposit.confirmed is emitted with metadata.source = "connect_hosted_checkout".
To embed checkout inside your own app, create the session from your backend with your SideShift API key, then render data.embedUrl (or data.widgetUrl) in an iframe. Do not expose your API key in browser code.
The embedded checkout posts a sideshift.checkout.completed message to the parent window after SideShift verifies payment.
Sandbox: Checkout is wired to the payment provider’s official sandbox environment and supports
cards only. Requests cannot enable alternative payment methods with an sk_test_*
key.
curl --request POST \
--url https://app.sideshift.app/api/embed/checkout/sessions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amountCents": 5000,
"description": "Premium creator bundle",
"customerEmail": "buyer@example.com",
"successUrl": "https://example.com/checkout/success",
"cancelUrl": "https://example.com/cart",
"metadata": {
"orderId": "order_123"
}
}
'import requests
url = "https://app.sideshift.app/api/embed/checkout/sessions"
payload = {
"amountCents": 5000,
"description": "Premium creator bundle",
"customerEmail": "buyer@example.com",
"successUrl": "https://example.com/checkout/success",
"cancelUrl": "https://example.com/cart",
"metadata": { "orderId": "order_123" }
}
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({
amountCents: 5000,
description: 'Premium creator bundle',
customerEmail: 'buyer@example.com',
successUrl: 'https://example.com/checkout/success',
cancelUrl: 'https://example.com/cart',
metadata: {orderId: 'order_123'}
})
};
fetch('https://app.sideshift.app/api/embed/checkout/sessions', 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/checkout/sessions",
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([
'amountCents' => 5000,
'description' => 'Premium creator bundle',
'customerEmail' => 'buyer@example.com',
'successUrl' => 'https://example.com/checkout/success',
'cancelUrl' => 'https://example.com/cart',
'metadata' => [
'orderId' => 'order_123'
]
]),
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/checkout/sessions"
payload := strings.NewReader("{\n \"amountCents\": 5000,\n \"description\": \"Premium creator bundle\",\n \"customerEmail\": \"buyer@example.com\",\n \"successUrl\": \"https://example.com/checkout/success\",\n \"cancelUrl\": \"https://example.com/cart\",\n \"metadata\": {\n \"orderId\": \"order_123\"\n }\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/checkout/sessions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amountCents\": 5000,\n \"description\": \"Premium creator bundle\",\n \"customerEmail\": \"buyer@example.com\",\n \"successUrl\": \"https://example.com/checkout/success\",\n \"cancelUrl\": \"https://example.com/cart\",\n \"metadata\": {\n \"orderId\": \"order_123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/embed/checkout/sessions")
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 \"amountCents\": 5000,\n \"description\": \"Premium creator bundle\",\n \"customerEmail\": \"buyer@example.com\",\n \"successUrl\": \"https://example.com/checkout/success\",\n \"cancelUrl\": \"https://example.com/cart\",\n \"metadata\": {\n \"orderId\": \"order_123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "ck_abc123",
"status": "open",
"sideshiftAccountId": "acct_a1b2c3d4e5f6",
"amountCents": 5000,
"feeCents": 185,
"totalChargedCents": 5185,
"currency": "usd",
"paymentMethodType": "card",
"allowedPaymentMethods": [
"card",
"apple_pay",
"google_pay",
"paypal"
],
"url": "https://app.sideshift.app/connect/checkout/ck_abc123",
"hostedUrl": "https://app.sideshift.app/connect/checkout/ck_abc123",
"embedUrl": "https://app.sideshift.app/connect/checkout/ck_abc123/embed",
"widgetUrl": "https://app.sideshift.app/connect/checkout/ck_abc123/embed",
"checkoutConfigId": "chk_abc123",
"sandbox": false
}
}Authorizations
Your SideShift Connect API key (sk_live_* or sk_test_*). Generate from Settings → Connect.
Body
Net amount to credit to the wallet, in cents
x >= 1005000
Optional destination override. Defaults to the API-key company's own SideShift wallet. If supplied, the account must belong to or be linked to your Connect integration.
"acct_a1b2c3d4e5f6"
Checkout description shown to the payer
"Premium creator bundle"
Optional payer email to prefill in checkout. The payer can still edit it.
Optional payer name for your own reconciliation
Optional URL to redirect to after SideShift verifies payment
Optional URL for the hosted page cancel link
Payment method used for fee calculation. Defaults to card.
card, link, apple_pay, google_pay, amazon_pay, cashapp, paypal, venmo, crypto, coinbase, us_bank_account, us_bank_transfer, eu_bank_transfer, gb_bank_transfer, au_bank_transfer, pay_by_bank, klarna, affirm, afterpay_clearpay "card"
Optional payment methods to restrict the hosted checkout to. Omit this field to use SideShift's default checkout methods. Sandbox accepts card only.
card, link, apple_pay, google_pay, amazon_pay, cashapp, paypal, venmo, crypto, coinbase, us_bank_account, us_bank_transfer, eu_bank_transfer, gb_bank_transfer, au_bank_transfer, pay_by_bank, klarna, affirm, afterpay_clearpay ["card", "apple_pay", "google_pay", "paypal"]
Up to 50 key/value pairs returned in deposit webhooks