Integrate HashPrism payments into your workflow. Receive real-time event notifications via webhooks, query payment data through the API, and automate your fulfillment pipeline.
HashPrism sends signed HTTP POST requests to your endpoint when payment and refund events occur. Use webhooks to trigger fulfillment, update your database, send buyer receipts, or integrate with third-party services.
Every webhook request is a POST with the following headers:
HashPrism attempts delivery up to 3 times per event with exponential backoff (immediate, 1 second, 2 seconds). Your endpoint should return a 2xx status within 10 seconds. If all 3 attempts fail, the failure is logged in Dashboard → Settings → Webhooks but the event is not re-queued. Delivery status and HTTP response codes are available in the webhook events log.
{
"event": "payment.confirmed",
"data": {
"payment_id": "3f2a1c8e-...",
"product_name": "My eBook",
"product_slug": "my-ebook",
"currency": "USDC",
"amount_crypto": 9.99,
"price_usd": 9.99,
"tx_signature": "5yYZ1km..."
},
"timestamp": "2026-02-20T14:30:00.000Z"
}{
"event": "refund.confirmed",
"data": {
"refund_id": "9c4b2d1a-...",
"payment_id": "3f2a1c8e-...",
"product_name": "My eBook",
"product_slug": "my-ebook",
"currency": "USDC",
"amount_crypto": 9.99,
"price_usd": 9.99,
"tx_signature": "8aBC2zk..."
},
"timestamp": "2026-02-20T15:00:00.000Z"
}{
"event": "test",
"data": {
"message": "HashPrism webhook test — your endpoint is working."
},
"timestamp": "2026-02-20T15:00:00.000Z"
}Every webhook request includes an X-HashPrism-Signature header containing an HMAC-SHA256 hex digest of the raw request body, signed with your webhook secret. Always verify this before processing a payload.
import crypto from 'crypto'
export async function POST(req: Request) {
const rawBody = await req.text()
const signature = req.headers.get('x-hashprism-signature')
const expected = crypto
.createHmac('sha256', process.env.WEBHOOK_SECRET!)
.update(rawBody)
.digest('hex')
if (signature !== expected) {
return new Response('Unauthorized', { status: 401 })
}
const payload = JSON.parse(rawBody)
if (payload.event === 'payment.confirmed') {
// trigger your fulfillment logic here
}
return new Response('OK', { status: 200 })
}import hmac
import hashlib
def verify_webhook(raw_body: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(
secret.encode(),
raw_body,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(expected, signature)Always use the raw request body bytes for HMAC computation — not a parsed or re-serialized version of the JSON. Parsing and re-serializing can change whitespace and key order, causing verification to fail.
HashPrism exposes a REST API under /api/v1/. Most routes are public. Protected routes require a Supabase session cookie and are intended for creator-side automation.
| Method | Endpoint |
|---|---|
| GET | /api/v1/products/[username] |
| GET | /api/v1/products/[username]/[slug] |
| Method | Endpoint |
|---|---|
| POST | /api/v1/payments/create |
| GET | /api/v1/payments/status?reference= |
| GET | /api/v1/payments/solana?reference= |
| POST | /api/v1/payments/solana?reference= |
| POST | /api/v1/payments/expire |
| DELETE | /api/v1/payments/delete?id= |
| Method | Endpoint |
|---|---|
| POST | /api/v1/refunds/create |
| GET | /api/v1/refunds/status?reference= |
| GET | /api/v1/refunds/solana?reference= |
| POST | /api/v1/refunds/solana?reference= |
Solana Blinks (Blockchain Links) let buyers pay directly from X (Twitter), Discord, and any platform that supports the Solana Actions standard — without leaving the app. When you share a HashPrism product link, it unfurls into an interactive payment card.
Share a product link on X and followers can pay directly from the tweet card.
Buyers sign the transaction in their connected wallet without leaving the platform.
Blink payments fire the same payment.confirmed webhook — no integration changes needed.
HashPrism's existing Solana Pay endpoints are ~90% compatible with the Actions spec. Blinks support is on the near-term roadmap and will require no webhook changes when it ships.
Questions or integration help? contact us