βοΈ Overview
TagadaPay enables seamless API-based integration for chargeback providers who need to:- Fetch merchantsβ payments for alert matching
- Automatically trigger refunds when alerts occur
- Pass contextual metadata (alert details, provider info, reason codes) into the refund request
Dashboard β Settings β Access TokensThis token authenticates all API requests securely.
π Authentication
All endpoints require Bearer token authentication:- Each merchantβs token is scoped to their own data
- Providers must request the merchant to create and share this token during onboarding
π³ Endpoints Overview
| Endpoint | Method | Purpose |
|---|---|---|
/api/public/v1/payments | POST | Retrieve payments for matching alerts |
/api/public/v1/payments/refund | POST | Process refunds automatically with metadata |
π¦ 1οΈβ£ Fetch Payments
EndpointFetch transactions for alert reconciliation or matching. Example Request
πΈ 2οΈβ£ Refund Payment
EndpointInitiate a refund when a dispute alert (Ethoca, Verifi, RDR, or CDRN) is detected. Example Request
π§ Metadata Structure
Themetadata field provides context for the refund. This data is stored in the transaction record and enhances analytics.
Metadata Schema
| Field | Type | Example | Description |
|---|---|---|---|
source.type | string | "alert_provider" | Always βalert_providerβ for chargeback integrations |
source.provider | string | "disputifier" | Provider name (e.g., chargeblast, disputifier) |
dispute.alertId | string | "ETH-2024-123456" | Unique ID of the alert |
dispute.network | string | "ethoca" | Alert program name (ethoca, cdrn, rdr) |
dispute.reason | string | "Fraudulent transaction" | Human-readable explanation |
dispute.receivedAt | string | "2024-10-23T10:15:00Z" | ISO 8601 timestamp |
π Automatic vs Manual Refund Flow
βοΈ Automatic Flow
Used when the providerβs app has Auto Refund enabled. Flow:- Provider receives a chargeback alert
- Provider calls TagadaPayβs
/payments/refundwith metadata - TagadaPay refunds automatically, updates
status='refunded' - Provider is notified via
200 OKresponse (no webhook required)
π§© Manual Flow
Used when the provider does not auto-refund. Flow:- Merchant manually triggers refund in TagadaPay Dashboard
- Provider syncs payment data via
/paymentsAPI - Provider updates alert status internally after refund is detected
π¨ Error Handling & Idempotency
Duplicate alerts should send the sameorderId + alertId. TagadaPay safely ignores duplicate refund requests.
Error Codes
- 400: Missing fields or invalid JSON
- 401: Invalid or expired access token
- 404: Order not found
- 409: Transaction already refunded
Response
200 OK confirms success β no need for follow-up βoutcomeβ call.πͺ Step-by-Step Example Integration
1
Merchant Setup
- Go to Dashboard β Settings β Access Tokens
- Copy API key and share it with provider
2
Provider Setup
- Add TagadaPay integration in providerβs UI 2. Enter merchantβs Access Token
3
Fetch Transactions
Use
/payments to match alerts by transaction ID, card, and amount4
Trigger Refund
When an alert is confirmed, call
/payments/refund with metadata5
Verification
TagadaPay refunds payment, marks as disputed, and logs metadata
π‘ Common Mistakes & Best Practices
β Do
- Always include
metadata.source.type="alert_provider"andmetadata.source.providerwith your provider name - Use merchant-specific API keys (not global)
- Keep refund payloads idempotent (same
alertId) - Search for payment first using
/paymentsendpoint - Include alert timestamp in
dispute.receivedAt
β Donβt
- Skip metadata β it breaks automatic dispute tagging
- Send multiple refund calls with different IDs for the same alert
- Use sandbox token in production environment
- Hard-code transaction ID formats (support multiple processors)
π§ Complete Example Code
Node.js Implementation
β οΈ Internal Notes
This document is for internal and partner developers only.
Public release requires approval from the TagadaPay Engineering Team.Path:
Visibility: Internal β βDeveloper Toolsβ section
Public release requires approval from the TagadaPay Engineering Team.Path:
/internal/chargeback-provider-integrationVisibility: Internal β βDeveloper Toolsβ section
β Quick Reference Summary
π Authenticate:source.type="alert_provider", source.provider, and dispute objects.
π― Result:TagadaPay auto-handles refund + dispute marking + analytics tracking.
π§ With this single integration model, any chargeback provider can connect to TagadaPay in under one day β securely, consistently, and with full refund automation support.
