Overview
TagadaPay provides a comprehensive API that allows chargeback providers to:- Fetch payments using flexible filtering options to match alerts with transactions
- Process refunds automatically with a single API call
- Track disputes by marking payments as disputed with detailed information
- Blacklist customers automatically to prevent future fraudulent transactions
Key Benefits
- Single API Call — Process refunds, mark disputes, and blacklist customers in one request
- Flexible Filtering — Find payments by transaction ID, card details, customer info, and more
- Comprehensive Tracking — Automatically track dispute status, type, and reason codes
- Fraud Prevention — Automatically blacklist customers when processing refunds
Getting Merchant API Keys
Before you can integrate with TagadaPay’s API, merchants need to create and share their API access tokens with you.Merchant Responsibilities
Merchants are responsible for creating API keys in their TagadaPay account and providing them to you during the integration setup process.1
Merchant Creates API Key
- Log in to the TagadaPay dashboard at app.tagadapay.com
- Navigate to Settings → API Keys
- Click Create API Key
- Give the key a descriptive name (e.g., “Chargeback Provider Integration”)
- Copy the generated API key
2
Merchant Shares API Key
Merchants should paste the API key into your provider’s configuration page or integration setup form.
Each merchant has their own unique API key that is scoped to their account data only. Never share API keys between merchants.
3
Provider Stores API Key Securely
Store the merchant’s API key securely in your system. You’ll use this key to authenticate all API requests on behalf of that merchant.
Authentication
All API requests require Bearer token authentication using the merchant’s API key:https://app.tagadapay.com
Endpoint 1: List Payments
Use this endpoint to search and filter payments to match chargeback alerts with transactions.Endpoint
Purpose
Fetch payments with flexible filtering options to:- Match alerts by transaction ID, card details, or customer information
- Filter by payment status, date ranges, and dispute information
- Support pagination for large result sets
Request Body
Filter Options
| Filter | Type | Description |
|---|---|---|
storeIds | string[] | Filter by store IDs |
status | string | Payment status: pending, succeeded, failed, refunded, etc. |
subStatus | string | Payment sub-status for more granular filtering |
currency | string[] | Filter by currency codes (e.g., ["USD", "EUR"]) |
orderId | string | Filter by specific order ID |
isDisputed | boolean | Filter by dispute status |
disputeStatus | string | Filter by dispute status: response-needed, under-review, won, lost, etc. |
disputeType | string | Filter by dispute type: first-chargeback, ethoca-alert, rdr, etc. |
card.last4 | string | Filter by last 4 digits of card |
card.brand | string | Filter by card brand: visa, mastercard, amex, etc. |
card.year | number | Filter by card expiration year |
card.month | number | Filter by card expiration month |
customer.email | string | Filter by customer email |
customer.fullName | string | Filter by customer full name |
date.condition | string | Date condition: is-equal-date, is-between-date, is-after-date, is-before-date |
date.value | string[] | Date values (ISO 8601 format) |
Example Request
Example Response
Endpoint 2: Refund Payment
Use this endpoint to process refunds with advanced options for dispute tracking and customer blacklisting.Endpoint
Purpose
Process full or partial refunds with optional features:- Mark as disputed — Automatically track dispute information
- Blacklist customer — Prevent future transactions from the same customer
- Cancel subscriptions — Automatically cancel associated subscriptions
Request Body
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
paymentIds | string[] | ✅ Yes | Array of payment IDs to refund |
amount | number | ❌ No | Partial refund amount (in minor units, e.g., cents). Omit for full refund |
metadata | object | ❌ No | Additional metadata to store with the refund |
cancelSubscription | boolean | ❌ No | If true, cancels any associated subscription |
dispute | object | ❌ No | Dispute information (see Dispute Options below) |
blacklistCustomer | boolean | ❌ No | If true, automatically blacklists the customer |
Dispute Options
When you include thedispute object, TagadaPay will automatically mark the payment as disputed with the provided information. This is especially useful for chargeback providers who want to track disputes in a single API call.
Dispute Object Structure
Dispute Status Values
| Value | Description |
|---|---|
response-needed | Merchant response required |
under-review | Currently being reviewed |
forfeited | Dispute forfeited |
won | Dispute won by merchant |
lost | Dispute lost by merchant |
unknown | Status unknown |
refunded | Dispute resolved with refund |
refunded_externally | Refunded outside of TagadaPay |
Dispute Type Values
| Value | Description |
|---|---|
information-request | Information request from card network |
first-chargeback | First chargeback |
second-chargeback | Second chargeback |
arbitration | Arbitration case |
fraud | Fraud dispute |
ethoca-alert | Ethoca alert notification |
verifi-alert | Verifi alert notification |
bank-return | Bank return |
paypal-claim | PayPal claim |
representment | Representment case |
rdr | Rapid Dispute Resolution |
Dispute Reason Codes
Common reason codes include:fraudulent, unrecognized, duplicate, subscription_canceled, product_unacceptable, credit_not_processed, general, and more.
Blacklist Customer Option
WhenblacklistCustomer is set to true, TagadaPay will automatically create a block rule that prevents future transactions from:
- The same customer ID
- The same email address
The blacklist is permanent by default and will block all future transactions from the blacklisted customer or email address.
Example: Full Refund with Dispute Tracking
Example: Partial Refund with Subscription Cancellation
Example Response
Complete Integration Example
Here’s a complete example showing how to handle a chargeback alert:Best Practices
✅ Do
- Always search first — Use the list payments endpoint to find the correct payment before refunding
- Include dispute information — Use the
disputeoption to track disputes automatically - Use blacklist for fraud — Enable
blacklistCustomerfor fraudulent transactions - Store metadata — Include relevant alert information in the
metadatafield - Handle errors gracefully — Check for payment not found, already refunded, etc.
- Use idempotent requests — Include unique alert IDs in metadata to prevent duplicate refunds
❌ Don’t
- Skip payment matching — Always verify you’re refunding the correct payment
- Forget dispute tracking — Use the
disputeoption to maintain accurate records - Expose API keys — Never log or expose merchant API keys
- Refund without verification — Always match alerts with payments before processing
- Ignore error responses — Handle API errors appropriately
Error Handling
Common Error Scenarios
| Error | Description | Solution |
|---|---|---|
401 Unauthorized | Invalid or missing API key | Verify the merchant’s API key is correct |
404 Not Found | Payment not found | Verify the payment ID exists and belongs to the merchant |
400 Bad Request | Invalid request parameters | Check request body format and required fields |
409 Conflict | Payment already refunded | Check payment status before attempting refund |
Error Response Format
Support
If you have questions or need assistance with the integration:- Email: api-support@tagadapay.com
- Documentation: TagadaPay API Reference
