https://app.sideshift.app/api/embed.
Setup guide
1
Generate an API key
Go to Settings → Connect and click
Generate API Key. Copy it immediately — keys are only shown once.
sk_live_*— production (real money)sk_test_*— sandbox (isolated balances, simulated payouts)
2
Add allowed domains
In Settings → Connect, add the domains where you’ll embed widgets.
3
Create user accounts
Every user who needs access to payments needs a SideShift Connect account.Store the returned
sideshiftAccountId — you’ll need it for everything else.4
Generate a widget token
Tokens authenticate embedded widget sessions. Generate them server-side.The response includes
widgetUrls.payout and widgetUrls.payin — use these as iframe
sources or pass them to the SDK.5
Embed the widget
- iframe (recommended)
- npm SDK
- iOS (SwiftUI)
allow="payment; camera; microphone"
attribute is required for KYC/identity verification inside the widget.6
Transfer funds
Move money between your company and user accounts.
7
Set up webhooks
Configure a webhook endpoint in Settings → Connect to receive
transfer.completed,
deposit.*, and withdrawal.* events. Always verify the signature.Authentication
Include your API key in thex-api-key header on every request:
Idempotency
Always include anidempotencyKey on transfer requests. Replaying a request with the same
key returns the original successful result instead of creating a duplicate.
Rate limits
Exceeding limits returns
429 with a Retry-After header.
Sandbox
Usesk_test_* keys to test without moving real money. Sandbox balances are fully isolated
from live. Webhooks still fire so you can validate your full pipeline. All API endpoints
behave identically — same validation, same error codes, same response shapes.
Sandbox behavior
paymentAccountIdvalues are prefixed withsim_biz_*(simulated)- Company → User transfers are simulated — no real payout is executed, but the internal ledger is updated normally
- User → Company and User → User transfers work identically to production
- Webhook events are delivered to your configured endpoint
- Leaderboard and notification side effects are not triggered
Payout widget in sandbox
When a widget token is generated with ask_test_* key, the payout widget automatically
uses SideShift’s sandbox payout environment. No additional configuration is required.
When you transfer funds with a sk_test_* key, the sandbox wallet is credited correctly on
the internal ledger. However, the payout widget’s withdrawal UI cannot display the real
balance because the company ID is simulated (sim_biz_*) and the widget relies on the real
payments infrastructure to resolve balances.
- The
passedInBalancefield (if set) appears as a display-only “Pending Balance” label - The withdrawal flow (bank account linking, payout initiation) is not fully functional in sandbox
sk_live_* keys, transfers call the real payments API, funds land in the
creator’s real wallet, and the balance and withdrawal UI work normally.
To verify sandbox transfers are working, use the balance API — this is the source of truth:
balanceCents and transactions in the response accurately reflect all sandbox
transfers.
Testing checklist
1
Generate a test key
Create an
sk_test_* key and store it securely.2
Create accounts
Create at least two sandbox accounts.
3
Test every direction
Company→user, user→company, and user→user.
4
Verify balances
Check the balance API after each transfer.
5
Replay a transfer
Reuse the same
idempotencyKey and confirm no duplicate.6
Check webhooks
Confirm delivery and that signature verification passes.
7
Trigger errors
Insufficient balance, invalid account — verify your handling.
8
Embed a widget
Test token generation and embedding.
Go-live checklist
Before switching tosk_live_*:
- Store your live API key in a production secrets manager
- Confirm production domains in Settings → Connect (remove dev wildcards)
- Verify your webhook endpoint uses HTTPS and validates signatures
- Add retry handling with idempotency keys in your backend
- Attach commercial evidence metadata to every transfer
- Run a small live test (for example a $0.50 transfer) before full volume
Reference
This page is ported from the Connect specification’s own introduction, so it stays in sync
with what
app.sideshift.app/docs/connect shows today.API reference
All 17 operations across the six areas above.
Webhook events
Eight events are available:deposit.pending · deposit.confirmed · deposit.failed · transfer.completed ·
withdrawal.created · withdrawal.updated · withdrawal.completed ·
account.risk_flagged
withdrawal.completed is a derived alias of withdrawal.updated filtered to
status === "completed". Subscribe to it if you only want the terminal success event, or to
withdrawal.updated for the full lifecycle:
x-sideshift-signature and x-sideshift-timestamp headers.
Non-2xx responses are retried with exponential backoff, up to five attempts. Webhooks fire
in both sandbox and production.