solana actions · srfc-31
Blinks — pay from X / Discord
Turn any subscription into a link people can pay from X or Discord — no visit to this site needed. Every /api/actions/* endpoint speaks the Actions protocol (GET metadata → POST unsigned tx → wallet signs). Paste the URL as solana-action:… on X or paste it in any wallet — subscribing happens wherever your users already are.
1. Target action type
STEP 01 / 03https://solhack.rafal.si/api/actions/subscribe?cluster=devnet&programId=2jK5cy3PaCnD2cLfp3VCqxySBx4dyDhBc7GuutACvJuw&plan=&mint=4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU&amount=
2. Parameters
STEP 02 / 03Fill in: plan, amount — preview will try anyway (template {param}).
3. Ready link & export
STEP 03 / 03solana-action:https://solhack.rafal.si/api/actions/subscribe?cluster=devnet&programId=2jK5cy3PaCnD2cLfp3VCqxySBx4dyDhBc7GuutACvJuw&plan=&mint=4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU&amount=
Blink preview
X-feed previewhttps://solhack.rafal.si/api/actions/subscribe?cluster=devnet&programId=2jK5cy3PaCnD2cLfp3VCqxySBx4dyDhBc7GuutACvJuw&plan=&mint=4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU&amount=
Registry & chain
- public/actions.json maps /api/actions/** to solana:devnet — swap the chain id for mainnet.
- Wallets consume solana-action: URLs directly — no gateway needed. Full unfurl on X still needs a registered actions.json entry.
- A subscribe POST always bundles an approve capped at one period — a Blink can never authorize more.
Live Blink feed simulator
X-feed previewSubscribe in one click from this post — no site visit. The wallet signs the same one-period-capped transaction as the popup.
Endpoints serve CORS headers Access-Control-Allow-Origin: * so X renders the card.
3-line integration
STEP 03 / 03Render the subscribe Action anywhere. The URL below is live for the plan currently selected in the builder — paste the solana-action: URL into any wallet and it signs the same one-period-capped transaction as the popup.
Template URL — add ?demo=1 for a fixture link, or use the builder above for a live one.
Ship checklist
- ✓ Wallets (Phantom, Solflare) consume the solana-action: URL directly — no gateway, no registry entry.
- ✓ Discord embed renders the same Action metadata (title, description, icon).
- ✓ Full unfurl on X with your own domain needs a registered actions.json entry.
GET https://solhack.rafal.si/api/actions/subscribe?plan=%3CPLAN%3E # metadata
POST https://solhack.rafal.si/api/actions/subscribe?plan=%3CPLAN%3E # { account } → unsigned tx
solana-action:https://solhack.rafal.si/api/actions/subscribe?plan=%3CPLAN%3E # paste into any wallet What is live vs mocked on this page Live: the builder endpoint, the GET metadata preview, the copy buttons, and the endpoint JSON link — all run against this deployment. Mock: the X post frame around the card (avatar, post text) is a static prop. The card itself renders live GET metadata from this deployment, and its buttons only copy the solana-action: URL and open the endpoint JSON — no signature is ever simulated.