From 601be1a64c401a43203983b5bee813c0d1974e77 Mon Sep 17 00:00:00 2001 From: MantisClone Date: Sat, 22 Aug 2026 00:28:04 +0200 Subject: [PATCH] fix: remove unused webhook event variants --- api-features/webhooks-events.mdx | 6 +----- api-reference/webhooks.mdx | 22 ++-------------------- use-cases/quickstart.mdx | 6 +----- use-cases/webhook-reconciliation.mdx | 10 +--------- 4 files changed, 5 insertions(+), 39 deletions(-) diff --git a/api-features/webhooks-events.mdx b/api-features/webhooks-events.mdx index 4d5ab6c..2a88a1a 100644 --- a/api-features/webhooks-events.mdx +++ b/api-features/webhooks-events.mdx @@ -9,21 +9,17 @@ Webhooks provide real-time notifications when payment and request events occur, ## Event Categories -The platform and Client ID webhook catalog includes **14 event types** across five categories: +The platform and Client ID webhook catalog includes **10 event types** across six categories: | Category | Events | | --- | --- | | **Payment** (core) | `payment.confirmed`, `payment.partial`, `payment.failed`, `payment.refunded` | -| **Payment** (Client ID-scoped) | `payment.confirmed.client_id`, `payment.partial.client_id` | -| **Payment** (Checkout-scoped) | `payment.confirmed.checkout`, `payment.partial.checkout` | | **Processing** (crypto-to-fiat) | `payment.processing` (with `subStatus`) | | **Request** | `request.recurring` | | **Compliance / Bank** | `compliance.updated`, `payment_detail.updated` | | **Secure Payment Page** (payer funnel) | `secure_payment.user_event` (with `userEvent`) | | **Secure Payment** (payer-wallet allowlist) | `secure_payment.access_rejected` | -The `.client_id` and `.checkout` variants are emitted in addition to the base `.confirmed` / `.partial` events when the request was created via a Client ID or as a checkout / secure payment, respectively. They include extra metadata (`clientId`, `origin`). - Payment webhook payloads include `payerAddress`, the address used to make the payment, and `payerEoaAddress`, the payer's connected wallet address. These can differ when a smart account is used. Both are `null` when unavailable. See the [Webhooks reference](/api-reference/webhooks) for the full payload schema. diff --git a/api-reference/webhooks.mdx b/api-reference/webhooks.mdx index 510d8bc..ccfca18 100644 --- a/api-reference/webhooks.mdx +++ b/api-reference/webhooks.mdx @@ -67,24 +67,6 @@ See [Payload Examples](#payload-examples) below for detailed webhook structures. | `payment.failed` | Payment execution failed | Recurring payments, cross-chain transfers | Notify failure, retry logic, pause subscriptions | | `payment.refunded` | Payment has been refunded to payer | Cross-chain payment failures, refund scenarios | Update order status, notify customer | -### Payment Events (Client ID-scoped) - -Emitted **in addition to** the core events when the originating request was created with a Client ID. Payload includes extra `clientId` and `origin` fields. - -| Event | Description | -|-------|-------------| -| `payment.confirmed.client_id` | Same as `payment.confirmed`, scoped to a Client ID | -| `payment.partial.client_id` | Same as `payment.partial`, scoped to a Client ID | - -### Payment Events (Checkout / Secure Payment-scoped) - -Emitted **in addition to** the core events when the request was created via a Secure Payment / checkout flow. - -| Event | Description | -|-------|-------------| -| `payment.confirmed.checkout` | Same as `payment.confirmed`, originating from a Secure Payment link | -| `payment.partial.checkout` | Same as `payment.partial`, originating from a Secure Payment link | - ### Processing Events | Event | Description | Context | Primary Use | @@ -229,8 +211,8 @@ All payment events include an `explorer` field linking to [Request Scan](https:/ - `paymentReference`: Short reference, also unique to a request, used to link payments to the request - `timestamp`: ISO 8601 formatted event timestamp - `paymentProcessor`: Either `request-network` (crypto) or `request-tech` (fiat) -- `payerAddress`: Resolved payer wallet — the on-chain sender for plain direct payments, or the resolved payer for recurring and intent-based flows (Secure Payment Page, LiFi, Safe, ERC-4337, multicall). `null` when it cannot be determined. Included on `payment.confirmed` and `payment.partial` events (and their `.client_id` / `.checkout` variants). -- `payerEoaAddress`: The payer's connected wallet address. It can differ from `payerAddress` when a smart account is used. `null` when unavailable. Included on `payment.confirmed` and `payment.partial` events (and their `.client_id` / `.checkout` variants). +- `payerAddress`: Resolved payer wallet — the on-chain sender for plain direct payments, or the resolved payer for recurring and intent-based flows (Secure Payment Page, LiFi, Safe, ERC-4337, multicall). `null` when it cannot be determined. Included on `payment.confirmed` and `payment.partial` events. +- `payerEoaAddress`: The payer's connected wallet address. It can differ from `payerAddress` when a smart account is used. `null` when unavailable. Included on `payment.confirmed` and `payment.partial` events. ### Payment Confirmed ```json diff --git a/use-cases/quickstart.mdx b/use-cases/quickstart.mdx index dd13193..4c4b3e7 100644 --- a/use-cases/quickstart.mdx +++ b/use-cases/quickstart.mdx @@ -259,7 +259,7 @@ Always verify against the **raw** request body before parsing. ### Webhook events for payment links -When a payer completes a payment on a payment link you created, your webhook receives a `payment.confirmed` event (or `payment.partial` for partial payments). For Client ID-scoped variants you'll also receive `payment.confirmed.client_id` / `payment.partial.client_id` with extra `clientId` and `origin` fields. +When a payer completes a payment on a payment link you created, your webhook receives a `payment.confirmed` event (or `payment.partial` for partial payments). **Example `payment.confirmed` payload:** @@ -302,10 +302,6 @@ Key fields to look for: | --- | --- | | `payment.confirmed` | Payment fully confirmed | | `payment.partial` | Partial payment received | -| `payment.confirmed.client_id` | Client ID-scoped variant of `payment.confirmed` | -| `payment.partial.client_id` | Client ID-scoped variant of `payment.partial` | -| `payment.confirmed.checkout` | Secure-payment-scoped variant of `payment.confirmed` | -| `payment.partial.checkout` | Secure-payment-scoped variant of `payment.partial` | | `payment.failed` | Payment failed | | `payment.refunded` | Payment refunded | | `payment.processing` | Offramp processing started | diff --git a/use-cases/webhook-reconciliation.mdx b/use-cases/webhook-reconciliation.mdx index c3d5825..3cd3dd9 100644 --- a/use-cases/webhook-reconciliation.mdx +++ b/use-cases/webhook-reconciliation.mdx @@ -9,7 +9,7 @@ A webhook handler that receives signed payment events from Request Network, veri **Audience:** any backend integrating Request Network where payment events drive state changes downstream. -## The 14 events +## The 10 events | Category | Event | When it fires | | --- | --- | --- | @@ -17,10 +17,6 @@ A webhook handler that receives signed payment events from Request Network, veri | | `payment.partial` | Partial payment received, more expected | | | `payment.failed` | Payment execution failed (recurring, cross-chain) | | | `payment.refunded` | Payment refunded to payer | -| Payment (Client ID) | `payment.confirmed.client_id` | Same as `payment.confirmed`, request was created via Client ID — payload includes `clientId` and `origin` | -| | `payment.partial.client_id` | Client ID-scoped partial | -| Payment (Checkout) | `payment.confirmed.checkout` | Same as `payment.confirmed`, request originated from a Secure Payment link | -| | `payment.partial.checkout` | Secure Payment-scoped partial | | Processing | `payment.processing` | Crypto-to-fiat offramp in progress (with detailed `subStatus`) | | Request | `request.recurring` | A new recurring billing cycle fired | | Compliance | `compliance.updated` | KYC or agreement status changed | @@ -104,14 +100,10 @@ app.post( async function handleEvent(event: any, deliveryId: string) { switch (event.event) { case "payment.confirmed": - case "payment.confirmed.client_id": - case "payment.confirmed.checkout": await markOrderPaid(event.requestId, event.txHash, deliveryId); break; case "payment.partial": - case "payment.partial.client_id": - case "payment.partial.checkout": await recordPartialPayment( event.requestId, event.amount,