From 7acdd07fbba119e7d5da67d107b8200bfd562869 Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 24 Aug 2026 04:06:46 +0000 Subject: [PATCH] feat(spec): add INCOMING_PAYMENT.PROCESSING to the webhook contract MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WebhookType describes itself as dot-notation that "lets consumers route purely on type without inspecting data.status". The incoming family breaks that promise: it has no PROCESSING event, so sparkcore's _get_incoming_webhook_type collapses CREATED, PENDING, PROCESSING and SENT onto INCOMING_PAYMENT.PENDING, while the outgoing equivalent gives PROCESSING its own event. A pull into an internal account therefore fires PENDING twice, and the second payload carries status PROCESSING inside an envelope typed PENDING — exactly the inspect-data.status case the contract says consumers should not need. Adds the value to WebhookType and to the IncomingPaymentWebhook type enum, mirroring the outgoing family. Contract only: sparkcore does not emit the event yet, and its WebhookType is generated from this spec, so this has to land before the emission fix can reference the new member. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01TxsyZEDjQDt97rR3kd2kxv --- mintlify/openapi.yaml | 2 ++ openapi.yaml | 2 ++ openapi/components/schemas/webhooks/IncomingPaymentWebhook.yaml | 1 + openapi/components/schemas/webhooks/WebhookType.yaml | 1 + 4 files changed, 6 insertions(+) diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 566f11245..51644742f 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -25485,6 +25485,7 @@ components: - OUTGOING_PAYMENT.REFUND_COMPLETED - OUTGOING_PAYMENT.REFUND_FAILED - INCOMING_PAYMENT.PENDING + - INCOMING_PAYMENT.PROCESSING - INCOMING_PAYMENT.COMPLETED - INCOMING_PAYMENT.FAILED - INCOMING_PAYMENT.REFUND_PENDING @@ -25575,6 +25576,7 @@ components: type: string enum: - INCOMING_PAYMENT.PENDING + - INCOMING_PAYMENT.PROCESSING - INCOMING_PAYMENT.COMPLETED - INCOMING_PAYMENT.FAILED - INCOMING_PAYMENT.REFUND_PENDING diff --git a/openapi.yaml b/openapi.yaml index 566f11245..51644742f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -25485,6 +25485,7 @@ components: - OUTGOING_PAYMENT.REFUND_COMPLETED - OUTGOING_PAYMENT.REFUND_FAILED - INCOMING_PAYMENT.PENDING + - INCOMING_PAYMENT.PROCESSING - INCOMING_PAYMENT.COMPLETED - INCOMING_PAYMENT.FAILED - INCOMING_PAYMENT.REFUND_PENDING @@ -25575,6 +25576,7 @@ components: type: string enum: - INCOMING_PAYMENT.PENDING + - INCOMING_PAYMENT.PROCESSING - INCOMING_PAYMENT.COMPLETED - INCOMING_PAYMENT.FAILED - INCOMING_PAYMENT.REFUND_PENDING diff --git a/openapi/components/schemas/webhooks/IncomingPaymentWebhook.yaml b/openapi/components/schemas/webhooks/IncomingPaymentWebhook.yaml index f9345e1a6..0bb75732a 100644 --- a/openapi/components/schemas/webhooks/IncomingPaymentWebhook.yaml +++ b/openapi/components/schemas/webhooks/IncomingPaymentWebhook.yaml @@ -10,6 +10,7 @@ allOf: type: string enum: - INCOMING_PAYMENT.PENDING + - INCOMING_PAYMENT.PROCESSING - INCOMING_PAYMENT.COMPLETED - INCOMING_PAYMENT.FAILED - INCOMING_PAYMENT.REFUND_PENDING diff --git a/openapi/components/schemas/webhooks/WebhookType.yaml b/openapi/components/schemas/webhooks/WebhookType.yaml index df52ceede..d60b445e4 100644 --- a/openapi/components/schemas/webhooks/WebhookType.yaml +++ b/openapi/components/schemas/webhooks/WebhookType.yaml @@ -10,6 +10,7 @@ enum: - OUTGOING_PAYMENT.REFUND_COMPLETED - OUTGOING_PAYMENT.REFUND_FAILED - INCOMING_PAYMENT.PENDING + - INCOMING_PAYMENT.PROCESSING - INCOMING_PAYMENT.COMPLETED - INCOMING_PAYMENT.FAILED - INCOMING_PAYMENT.REFUND_PENDING