docs: document the secure_payment.user_event webhook - #114
Conversation
Documents the new payer-funnel webhook emitted by the Secure Payment Page: the three userEvent values (wallet_connected, payment_sent_to_wallet, payment_approved_in_wallet), a payload example, and the field semantics -- notably that occurredAt and properties are client-reported telemetry and that wallet addresses appear only as hashes. Signature verification, delivery headers and retry behaviour are unchanged, so the existing guidance applies as-is.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Greptile SummaryThe PR documents the
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser as Secure Payment Page
participant API as Request Network API
participant Webhook as Platform Webhook
participant Store as Business Store
Browser->>API: Report payer-funnel step
API->>Webhook: secure_payment.user_event + delivery ID
Webhook->>Webhook: Verify raw-body HMAC
Webhook->>Store: Apply telemetry update and delivery ID atomically
alt First delivery
Store-->>Webhook: Update committed
else Repeated delivery
Store-->>Webhook: Successful no-op
end
Webhook-->>API: 200 OK
Reviews (7): Last reviewed commit: "docs: demonstrate atomic webhook idempot..." | Re-trigger Greptile |
Both guides present their event lists as complete -- "The 12 events" and "All supported webhook events" -- so leaving them untouched would have told integrators the payer-funnel event does not exist. Adds `secure_payment.user_event` to both tables, bumps the reconciliation heading to 13, and adds a handler case to the reconciliation switch example with an explicit warning not to reconcile money off it: a payer can approve in their wallet and the transaction can still fail on-chain, so payment.confirmed remains the settlement signal.
MantisClone
left a comment
There was a problem hiding this comment.
Optimistically Approved 👍 pending comment resolution 🚧
Requested change:
- Add a prominent note that
secure_payment.user_eventis best-effort browser telemetry. The browser request can still fail before the API accepts it. Webhook retries start only after that acceptance. Consumers must not treat an absent event as evidence that the payer did not take the step, and must usepayment.confirmedfor settlement/reconciliation. - Qualify the wallet-address sentence: when the SPP includes wallet information in event properties, it uses
wallet_address_hashedrather than a raw wallet address.
Why:
The current preview correctly says the fields are non-authoritative but promises the normal retry behavior without the pre-ingestion loss boundary. The wallet-address statement should describe SPP behavior precisely.
If unaddressed:
A platform can build drop-off, notification, or reconciliation logic on an intentionally incomplete event stream, or rely on an over-broad privacy guarantee.
Problem
Platforms need a documented contract for Secure Payment Page payer-funnel events. This is part of REQ-291.
Proposed Solution
secure_payment.user_event, its threeuserEventvalues, payload, and field semantics.Considerations
payment.confirmedfor reconciliation.propertiesis browser-provided telemetry. When the Secure Payment Page includes wallet information, it useswallet_address_hashedrather than a raw address.client_id.linked,secure_payment.access_rejected,kyt.screening.completed) remain out of scope.