Files
GoblinPay/migrations/0006_webhook.sql
T
2ro bd67bfc92e GoblinPay: receive-only Grin payment server
A self-hostable Grin payment server for shops, creators, and sites: show a
code, Grin lands in your wallet, with a verifiable Grin payment proof on
receive. Workspace crates (gp-core / gp-nostr / gp-server / gp-wallet /
gp-goblin-sender), a WooCommerce connector, a hosted /pay/<token> checkout,
and NIP-44 v3 gift-wrapped payment DMs carried over the Nym mixnet. All
secrets are read from the environment; none are committed.
2026-07-02 04:29:54 -04:00

21 lines
722 B
SQL

-- Milestone 6: HTTP webhook deliveries, persisted for idempotent retry with
-- backoff. The body is the exact signed JSON (the HMAC is recomputed from it
-- and the configured secret at send time). id is the event id, which is also
-- the idempotency key the receiver dedupes on.
CREATE TABLE webhook_delivery (
id TEXT PRIMARY KEY,
payment_id TEXT,
event_type TEXT NOT NULL,
url TEXT NOT NULL,
body TEXT NOT NULL,
attempts INTEGER NOT NULL DEFAULT 0,
delivered INTEGER NOT NULL DEFAULT 0,
next_attempt_at TEXT NOT NULL,
last_error TEXT,
created_at TEXT NOT NULL,
updated_at TEXT NOT NULL
);
CREATE INDEX idx_webhook_pending ON webhook_delivery (delivered, next_attempt_at);