- 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.
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.
Signing
- Sort the parameters by name.
- Join them as
key=valuewith&, using the raw values (not URL-encoded). - HMAC-SHA256 that string with your signing secret.
- Add the hex digest as
sigand 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.