Conversation
Greptile SummaryThis PR renames webhook event types from flat identifiers (e.g., Key issues found:
The core rename and envelope restructuring is well-executed and internally consistent across most files. However, these three specification errors exist in the KYC webhook area and retry documentation — all of which would produce misleading documentation and incorrect consumer implementations. Confidence Score: 3/5
|
ac110b3 to
3a66bc6
Compare
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-openapi studio · code · diff
✅ grid-python studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-typescript studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
3a66bc6 to
3909f05
Compare
Additional Comments (3)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
12a7548 to
8c37e14
Compare
Additional Comments (5)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
8c37e14 to
0845a00
Compare
Additional Comments (5)
Affects lines 17, 41, 50, 66, 75, 81, 178, 214, 248 with tab titles, JSON examples, and code comparisons.
|
6c8bf4c to
f585358
Compare
Additional Comments (3)
The old With the new dot-notation types, multiple enum values map to the same schema — e.g., Consider adding a discriminator:
propertyName: type
mapping:
OUTGOING_PAYMENT.PENDING: ./OutgoingPaymentWebhook.yaml
OUTGOING_PAYMENT.COMPLETED: ./OutgoingPaymentWebhook.yaml
OUTGOING_PAYMENT.FAILED: ./OutgoingPaymentWebhook.yaml
OUTGOING_PAYMENT.REFUNDED: ./OutgoingPaymentWebhook.yaml
INCOMING_PAYMENT.PENDING: ./IncomingPaymentWebhook.yaml
INCOMING_PAYMENT.COMPLETED: ./IncomingPaymentWebhook.yaml
INCOMING_PAYMENT.FAILED: ./IncomingPaymentWebhook.yaml
CUSTOMER.KYC_APPROVED: ./CustomerKycWebhook.yaml
CUSTOMER.KYC_REJECTED: ./CustomerKycWebhook.yaml
CUSTOMER.KYC_SUBMITTED: ./CustomerKycWebhook.yaml
CUSTOMER.KYC_MANUALLY_APPROVED: ./CustomerKycWebhook.yaml
CUSTOMER.KYC_MANUALLY_REJECTED: ./CustomerKycWebhook.yaml
ACCOUNT.BALANCE_UPDATED: ./AccountStatusWebhook.yaml
INVITATION.CLAIMED: ./InvitationClaimedWebhook.yaml
BULK_UPLOAD.COMPLETED: ./BulkUploadWebhook.yaml
BULK_UPLOAD.FAILED: ./BulkUploadWebhook.yaml
TEST: ./TestWebhookRequest.yaml
The If only individual customers trigger KYC webhooks this is intentional — but it is worth adding a comment to make that explicit. If business customers can also receive KYC webhooks, consider making data:
oneOf:
- $ref: ../customers/IndividualCustomer.yaml
- $ref: ../customers/BusinessCustomer.yaml
The |
f585358 to
d2d670f
Compare
Additional Comments (3)
If business customers are never subject to these webhooks, a comment clarifying this constraint would prevent confusion. If they are, consider a oneOf/anyOf union: data:
oneOf:
- $ref: ../customers/IndividualCustomer.yaml
- $ref: ../customers/BusinessCustomer.yaml
The Consider adjusting the description to acknowledge that the data:
type: object
description: >-
The primary resource object associated with this event. For most event types,
this mirrors the corresponding GET endpoint response, but may include
additional webhook-specific fields (e.g., requestedReceiverCustomerInfoFields
on INCOMING_PAYMENT.PENDING).
The completed outgoing payment example now contains Additionally, the 7 new |
d2d670f to
b2b3170
Compare
Additional Comments (3)
The design doc lists The implementation's choice (
The design doc lists these KYC types with a But the implementation in
Two things to clarify:
If the KYC flow is intentionally restricted to individual customers only, please add a comment here to document that assumption. If business customer KYC events are (or will be) possible, the data:
oneOf:
- $ref: ../customers/IndividualCustomer.yaml
- $ref: ../customers/BusinessCustomer.yaml |
b2b3170 to
acd1679
Compare
Additional Comments (2)
Add this value to match the design specification:
The design document is included in the repository for future reference. Correcting these names prevents confusion for future contributors who read this document to understand the webhook design. |
| keys: [ "type" ] | ||
|
|
||
| # ── beneficiaryType: beneficiary schemas ── | ||
| # # ── destinationType: transaction and quote destination schemas ── |
There was a problem hiding this comment.
qq should we remove these commented out sections, or were you keeping them here intentionally? just curious
There was a problem hiding this comment.
Generation is sometimes trial and error. Leaving these here until i feel totally comfortable with stainless.yml. Sometimes i go and uncomment some of these if something's not working as expected
| description: The ID of the customer as associated in your platform | ||
| example: 019542f5-b3e7-1d02-0000-000000000001 | ||
| enum: | ||
| - ACCOUNT.BALANCE_UPDATED |
There was a problem hiding this comment.
maybeee we should make this INTERNAL_ACCOUNT.BALANCE_UPDATED? feels like external account webhooks are coming soon
There was a problem hiding this comment.
good call out, updated
…ation types - Adopt OBJECT.EVENT dot-notation for all webhook types (e.g., OUTGOING_PAYMENT.COMPLETED) - Wrap all webhook data under a unified `data` key (Stripe-style full resource embed) - Rename webhook files to match resource-event pattern - Move test webhook endpoint to /sandbox/webhooks/test - Update documentation and examples to match new schema
acd1679 to
6f28758
Compare
Additional Comments (3)
Either add the missing enum values to
If this event type is intentionally supported, the description in |

TL;DR
Updated webhook event type names to be more descriptive and consistent.
Changes defined in https://docs.google.com/document/d/1YdRboRlrwm0HKmRdyp-lbHZcfYUtJMF5NWk35vd_dZI/edit?tab=t.0