For the complete webhook guide — setup, signature verification, event catalog, payload schemas, and best practices — see the central Webhooks documentation.Documentation Index
Fetch the complete documentation index at: https://docs.solvapay.com/llms.txt
Use this file to discover all available pages before exploring further.
Quick Reference
Edge Runtimes
Fetch runtimes (Deno, Cloudflare Workers, Supabase Edge)
For web-standards fetch runtimes,@solvapay/server/fetch provides a solvapayWebhook factory that handles the full lifecycle (read body, verify signature, parse, respond):
SOLVAPAY_WEBHOOK_SECRET from the environment automatically. Use verifyWebhook from @solvapay/server/edge if you need manual control over the request lifecycle.
See the Supabase Edge Functions guide for the complete setup.
Event Types
| Event | Description |
|---|---|
payment.succeeded | Payment successfully processed |
payment.failed | Payment attempt failed |
payment.refunded | Refund successfully processed |
payment.refund_failed | Refund attempt failed |
purchase.created | New purchase created |
purchase.updated | Purchase modified |
purchase.cancelled | Purchase cancelled |
purchase.expired | Purchase expired |
purchase.suspended | Purchase suspended |
customer.created | Customer created |
customer.updated | Customer updated |
customer.deleted | Customer deleted |
Side effects on Customer and Transaction records
Two SolvaPay-internal webhook handlers update derived data you may rely on:- Card mirror on
payment_intent.succeeded. When a payment succeeds, SolvaPay mirrors the card brand, last4, expMonth, and expYear onto theCustomerrecord.GET /v1/sdk/payment-method?customerRef=…reads from this mirror, so the SDK’susePaymentMethodhook andCurrentPlanCardnever round-trip to Stripe. The mirror is updated whenever a new successful payment lands, so the “payment method on file” always reflects the last working card. - Refund FX normalization. For refunds against transactions with a non-unity exchange rate (e.g. EUR → USD), the refund record now stores both the original-currency amount and the USD equivalent computed from the source transaction’s stored
exchangeRate. This keeps wallet balances and revenue reports consistent after cross-currency refunds.