Widget URL Parameters
Full reference for every URL parameter each widget accepts.
Each widget reads configuration from the URL. You can build widget URLs yourself — no SDK required. This page documents every parameter for each widget type.
Direct payment widget
URL shape:
https://sbtc-pay.com/widget/{MERCHANT_ADDRESS}?<params>| Parameter | Type | Description |
|---|---|---|
merchantAddressrequired | path segment | Stacks address of the merchant receiving the payment. |
amountrequired | integer | Amount in base units (sats for sBTC, micro-STX for STX). |
token | sbtc | stxdefault: sbtc | Which token to pay with. |
memo | string | Short description shown to the customer. Max 280 chars. |
theme | dark | lightdefault: dark | Widget color theme (light is reserved for future use). |
Example
https://sbtc-pay.com/widget/SP1234ABC...?amount=50000&token=sbtc&memo=Monthly+coffeeInvoice widget
URL shape:
https://sbtc-pay.com/widget/invoice/{INVOICE_ID}| Parameter | Type | Description |
|---|---|---|
invoiceIdrequired | path segment (integer) | Numeric invoice ID or human-readable form (e.g., INV-42). |
The invoice widget doesn't take amount or token parameters — those are read from the invoice record on-chain. This guarantees the widget can't show a different amount than what's due.
Example
https://sbtc-pay.com/widget/invoice/42Subscription widget
URL shape:
https://sbtc-pay.com/widget/subscribe/{MERCHANT_ADDRESS}?<params>| Parameter | Type | Description |
|---|---|---|
merchantAddressrequired | path segment | Stacks address of the merchant offering the subscription. |
plan | stringdefault: Standard Plan | Display name for the plan. Shown to subscribers. |
amountrequired | integer | Amount per billing interval, in base units. |
interval | daily | weekly | biweekly | monthly | quarterly | yearlydefault: monthly | Billing cadence. Converted to burn-block count based on the network. |
token | sbtc | stxdefault: sbtc | Which token the subscription is billed in. |
Example
https://sbtc-pay.com/widget/subscribe/SP1234ABC...?plan=Pro+Plan&amount=500000&interval=monthly&token=sbtcCustom intervals
The interval parameter accepts either a preset name (
monthly) or a raw burn-block count (4320). This lets you define non-standard cadences like "every 10 days" if your product needs them.URL encoding
Remember to URL-encode parameter values that contain spaces or special characters. Most languages have a built-in helper:
javascript
const url = new URL("https://sbtc-pay.com/widget/SP1234...");
url.searchParams.set("amount", "50000");
url.searchParams.set("memo", "Tip for great article");
url.searchParams.set("token", "sbtc");
// url.toString() gives a properly encoded URLiframe best practices
Always include these iframe attributes for best results:
html
<iframe
src="..."
width="100%"
height="520"
frameborder="0"
style="border-radius:12px; max-width:420px;"
allow="clipboard-write"
></iframe>allow="clipboard-write"— lets the widget copy TX hashes on successframeborder="0"— removes the default 2px browser bordermax-width:420px— prevents awkward stretching on wide viewports