Chargeback
A chargeback is a dispute raised by the customer against a specific transaction. It can occur due to reasons such as unsatisfactory product or service delivery, poor customer experience, or suspected fraudulent activity on the customer’s payment method. Since chargebacks involve the risk teams of both the customer’s bank and PhonePe’s partner banks, they must be treated as high-priority issues.
To help you manage chargebacks effectively, PhonePe provides a set of APIs:
- Fetch Dispute: Retrieve details of a specific dispute raised by a customer.
- Fetch List of Disputes: View all disputes associated with your transactions.
- Accept Dispute: Accept the chargeback raised by the customer.
- Contest Dispute: Challenge the chargeback if you believe it is invalid.
- Upload Evidence : Submit supporting documents to strengthen your case when contesting a dispute.
Using these APIs, you can track disputes in real time, respond appropriately, and ensure faster resolution of chargeback cases.
Environments
Use the environment URLs below to integrate and test your API calls. The Sandbox environment is intended for testing and validation, while the Production environment should be used once your integration is live. Make sure to switch the base URL based on the environment you’re working in.
| Environment | API |
| Sandbox | https://api-preprod.phonepe.com/apis/pg-sandbox/<Endpoint> |
| Production | https://api.phonepe.com/apis/pg/<Endpoint> |
📘 Test Before Production!
To ensure a smooth integration, please integrate with the Test environment first and then move to production.
API Endpoints
Here is a quick reference to the key APIs used in the Custom Checkout flow. Each API serves a specific purpose, from starting a transaction to processing refunds and retrieving statuses. Use this table to identify the right endpoint to call for every step in the payment journey.Endpoint Details:
| API | Method | Endpoint |
| Authorization | POST | /v1/oauth/token |
| Fetch Dispute | GET | /v1/disputes/{disputeId} |
| Fetch List of Disputes | GET | /v1/disputes?from=<epoch-timestamp>&to=<epoch-timestamp>&offset=<integer>&limit=<integer>&status=<statusTobeFetched> |
| Accept Dispute | POST | /v1/disputes/{disputeId}/accept |
| Contest Dispute | POST | /v1/disputes/{disputeId}/contest |
| Upload Evidence | POST | /v1/disputes/{disputeId}/evidences |
| Delete Evidence | DELETE | /v1/disputes/{disputeId}/evidences/{evidenceId} |