payment/feat: add Stripe card details to Charge webhook type and interface#1322
payment/feat: add Stripe card details to Charge webhook type and interface#1322ClaudeWeb wants to merge 1 commit into
Conversation
…rface Parse payment_method_details.card from Stripe charge webhooks and thread card data (brand, last4, funding, country, exp_month, exp_year, fingerprint) through the Events.Charge interface type so consumers can populate PaymentTransaction card fields instead of hardcoding Nothing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR extends Stripe charge event handling to capture and surface card metadata. It introduces a ChangesStripe Card Details Event Enhancement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
PaymentMethodDetailsandChargeCardDetailstypes toStripe/Types/Webhook.hsto parsepayment_method_details.cardfrom Stripe charge webhook eventsCardDetailstype toInterface/Events/Types.hsandcardDetailsfield to the interfaceChargetypemkChargeObjectinInterface/Stripe.hsto map Stripe card data to the interfaceCardDetailsProblem
Stripe sends card details (
brand,last4,exp_month,exp_year,country,fingerprint,funding) insidepayment_method_details.cardin allcharge.*webhook events. TheStripe.Chargetype was missing this field, so it was silently dropped during JSON parsing and never reached the domain layer — leaving all card columns inPaymentTransactionasNothing.Test plan
charge.succeededwebhook with a card paymentEvents.Chargereceived by the handler has non-nullcardDetailsnammayatri/nammayatriwheremkChargeOrderTxnconsumescardDetails🤖 Generated with Claude Code
Summary by CodeRabbit