--- title: 'Chargeback Management Integration' description: 'High level guidelines for integrating chargeback management providers with TagadaPay' icon: 'shield' --- # Chargeback Management Integration ## What This Is About Chargeback management providers (ChargeBlast, Disputifier, RCVR, etc.) are SaaS platforms that help merchants handle payment disputes and chargebacks. They provide automated dispute management, fraud detection alerts, and dispute resolution services. **Goal**: When a merchant gets a dispute alert from these providers, we need to automatically mark the payment as disputed in TagadaPay and optionally trigger refunds. ## Expected Results ### High Level Flow ```mermaid graph TD A[Provider sends alert] --> B[We receive dispute notification] B --> C[Find the payment] C --> D[Match dispute to our payment record] D --> E[Mark as disputed] E --> F[Update payment status with provider metadata] F --> G[Optional refund] G --> H[Process refund if recommended by provider] ``` ### Key Outcomes - Payments are automatically tagged as disputed with source information - Merchants can see which provider flagged the dispute - Refunds can be processed automatically based on provider recommendations - Clear audit trail of dispute handling ## Current Status & Communication ### ChargeBlast ✅ (80% Complete) - **Code Location**: `src/app/actions/chargeblast.action.ts` - **Slack Channel**: `#fmjgroup-chargeblast` - **Status**: Implementation mostly done, needs testing - **Next Step**: Test with ChargeBlast team to validate integration ### Disputifier 🚧 (Early Stage) - **Slack Channel**: `#fmj-disputifier-api` - **Status**: Need to understand their API and integration approach - **Next Step**: Review API docs and plan integration ### Other Providers (Future) - RCVR - Chargeback.io - Chargeback911 - ChargeFlow ## Integration Patterns ### Two Main Approaches ```mermaid graph LR A[Push Mode] --> B[Provider calls our API] C[Pull Mode] --> D[We fetch dispute data from provider's API] B --> E[Like ChargeBlast does] D --> F[Periodic polling or webhooks] ``` ### Key Data Points - **Provider source**: Which provider flagged the dispute - **Alert type**: RDR, Ethoca, fraud, chargeback, etc. - **Dispute ID**: External dispute identifier - **Refund recommendation**: Whether to auto-refund ## Where to Find Information ### Code References - **Payment schema**: `src/lib/schema.ts` - see `payments` table and dispute fields - **Payment service**: `src/app/services/payment.ts` - refund and dispute handling - **ChargeBlast example**: `src/app/actions/chargeblast.action.ts` - current implementation ### Communication Channels - **ChargeBlast**: `#fmjgroup-chargeblast` - **Disputifier**: `#fmj-disputifier-api` - **General**: Ask in relevant Slack channels for API docs and testing ### Documentation Location - **Integration guides**: `mintly/docs` (to be created) - **API documentation**: Provider-specific docs (ask in Slack channels) ## Success Criteria - [ ] Payments automatically marked as disputed when alerts received - [ ] Provider metadata properly stored and visible - [ ] Refund processing works correctly - [ ] Integration tested and validated with provider teams - [ ] Clear documentation for merchant onboarding ## Next Steps 1. **ChargeBlast**: Test current implementation with provider team 2. **Disputifier**: Research API and plan integration approach 3. **Documentation**: Create integration guides for merchants 4. **Additional providers**: Expand to other providers as needed