Skip to main content
By default the widget opens with just your widget ID, and link parameters are prefills the customer can change within your Payment options: type only sets the starting direction, and the customer can switch when you allow both. Sign the link on your server when the payment details must not change, for example:
  • a fixed-price checkout, where the customer must send exactly the amount you quoted;
  • a buy where the stablecoins must go to a wallet you chose;
  • a widget that should only open from links you issued.
A signed link’s parameters are locked, it expires, and nobody can open your widget with their own values. The signing secret is under Settings → Ramps → Website widget → Signing secret & security. Keep it on your server; it never belongs in a browser or mobile app. Pass the signed URL to the script in place of the options object: Onstacks.open(signedUrl, callbacks). If your integration depends on signed links, turn off Allow unsigned links in the same settings section; otherwise a link with the signature removed would still open with its parameters editable. Widgets set up before unsigned links existed have it off already.

When your application sends the crypto

For a partner-funded withdrawal, sign delegateTransfer=true together with type=offramp, your order reference and the authorised funding sender in wallet. Include the exact embedding website in origin. The provider receiving address arrives later as instruction.address in onTransferRequired; do not put that address into wallet. Follow Partner-funded withdrawals for the complete example and the separate transfer-instruction signature contract. Signing a widget URL and verifying a transfer instruction use different canonical field formats.

Signing

  1. Sort the parameters by name.
  2. Join them as key=value with &, using the raw values (not URL-encoded).
  3. HMAC-SHA256 that string with your signing secret.
  4. Add the hex digest as sig and build the URL: https://<host>/w/<widget-id>?<params>&sig=<sig>.
Node.js

Parameters

Changing any parameter after signing invalidates the link. An expired, unsigned or altered link shows a not-found page, and the script calls onError with expired when it can tell before opening.