Skip to content

refactor(webhooks): name the payment and customer webhook event types - #1155

Merged
shreyav merged 1 commit into
mainfrom
named-enums-webhooks
Oct 9, 2026
Merged

shreyav merged 1 commit into
mainfrom
named-enums-webhooks

Conversation

@shreyav

@shreyav shreyav commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Independent PR on main.

What changed

  • The type field on OutgoingPaymentWebhook, IncomingPaymentWebhook, and CustomerWebhook now references OutgoingPaymentWebhookEventType, IncomingPaymentWebhookEventType, and CustomerWebhookEventType, each holding that family's event names such as OUTGOING_PAYMENT.REFUND_FAILED.
  • Rebuilt openapi.yaml and mintlify/openapi.yaml with make build.

Why

Integrators dispatch on the webhook type string. A named enum per family gives every generated SDK a type to switch on and lets a compiler flag an unhandled event name.

SDK impact

The wire format is unchanged. In statically typed SDKs the type field on these payloads changes from string to enum. A consumer that compares type against string literals keeps working where the enum is a string subtype or literal union; one that reads it as a plain string type needs a source change.

Test plan

  • make lint-openapi: Redocly reports the description valid, Spectral exits 0.
  • oasdiff breaking against main: no breaking changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MYijrrgsrFLJZ5fkmC5XwJ

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
grid-cards-demo Ignored Ignored Preview Oct 9, 2026 8:21pm UTC
grid-flow-builder Ignored Ignored Preview Oct 9, 2026 8:21pm UTC
grid-wallet-demo Ignored Ignored Preview Oct 9, 2026 8:21pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Critical impact] No blocking code issue remains; the PR appears safe to merge under the stated SDK rollout plan.

Summary

Names the payment and customer webhook enums without changing their event strings.

  • Adds IncomingPaymentWebhookEventType, OutgoingPaymentWebhookEventType, and CustomerWebhookEventType.
  • Updates the three webhook schemas and both generated OpenAPI bundles.
  • The previous wallet example mismatch is no longer present.
  • shreyav acknowledged that some SDK consumers need source changes and deferred shipping until those consumers are scheduled.

Reviews (2) · Last reviewed commit: "refactor(webhooks): name the payment and..." · Reviewed by Greptile

Comment thread openapi/components/schemas/webhooks/WalletOperationFailedData.yaml
@shreyav
shreyav force-pushed the named-enums-stablecoins branch from 2913d21 to 547ed7a Compare October 9, 2026 17:01
@shreyav
shreyav force-pushed the named-enums-webhooks branch from a9f3ff7 to 2e08ba9 Compare October 9, 2026 17:01
@shreyav
shreyav changed the base branch from named-enums-stablecoins to named-enums-customers October 9, 2026 17:02
@shreyav
shreyav force-pushed the named-enums-customers branch from c9e175d to fa1f658 Compare October 9, 2026 17:20
@shreyav
shreyav force-pushed the named-enums-webhooks branch from 2e08ba9 to c3de030 Compare October 9, 2026 17:20
@shreyav shreyav changed the title refactor(webhooks): name the webhook event type enums refactor(webhooks): name the payment and customer webhook event types Oct 9, 2026
@shreyav
shreyav marked this pull request as draft October 9, 2026 17:21
@shreyav
shreyav marked this pull request as ready for review October 9, 2026 18:21
AaryamanBhute
AaryamanBhute previously approved these changes Oct 9, 2026
The type field on the outgoing payment, incoming payment, and customer
webhooks declared its event names inline. Each family's names are now a
component schema. The wire format is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MYijrrgsrFLJZ5fkmC5XwJ
@shreyav
shreyav changed the base branch from named-enums-customers to main October 9, 2026 20:20
@shreyav
shreyav dismissed AaryamanBhute’s stale review October 9, 2026 20:20

The base branch was changed.

@mintlify

mintlify Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Grid 🟢 Ready View Preview Oct 9, 2026, 8:22 PM

@shreyav
shreyav merged commit d3526bc into main Oct 9, 2026
8 checks passed
@shreyav
shreyav deleted the named-enums-webhooks branch October 9, 2026 20:25

This branch was successfully deployed

1 active deployment
staging - mintlify — 6bafb183 Deployed Oct 9, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants