Guide

Blink Actions Guide

Build pay-known-business and verify-business-record Solana Actions against OCG records.

OCG provides strict Action templates so wallets can resolve a payment or verification flow without guessing which record backs it.

Action handler shape
import { buildPayKnownBusinessGetResponse } from '@realworldcommerce/known-business-blinks';

export async function GET() {
  return Response.json(
    buildPayKnownBusinessGetResponse({
      recordId: 'kb_desert-summit-roofing',
      label: 'Pay Desert Summit Roofing',
      icon: 'https://example.com/icon.png'
    }),
    { headers: actionCorsHeaders() }
  );
}
  • Do not generate a transaction from the docs package.
  • Use the mock unsigned-transaction adapter only in local development.
  • Reject Action requests whose record ID does not match the resolved merchant record.