Refund Endpoint
Overview
One method for integrating with our system, is to expose a refund endpoint which returns a structured response. This endpoint will be used to action alerts, and it must respond with the specific structure defined below. The API key will be passed as a query parameter in the URL. Prior to implementing this endpoint, we recommend implementing the /orders/upload
endpoint, which will be used to perform the transaction matching logic.
This endpoint is designed for FinTechs that have multiple processors. If you’re a merchant using a single processor, instead request an integration build.
Endpoint Requirements
HTTP Method: POST
Query Parameter: api_key (Your unique API key)
Your endpoint should accept a POST request with the API key included in the query string like this:
https://your-domain.com/your-endpoint?api_key={{YOUR_API_KEY}}
You can set this URL in your account under developer settings:
Request Body
The request body will include the necessary details for processing a refund. This will be in JSON format (details of the request structure can be provided based on your specific requirements).
Here’s an example request body:
Response
Your endpoint must return a response that conforms to the following payload:
The potential responses are:
- Resolved - the alert was used to successfully refund a cardholder.
- AlreadyChargeback - the transaction was already a dispute.
- AlreadyRefunded - the transaction was already refunded prior to the alert being transmitted.
- UnmatchedGeneral - a catch-all rejection code for alerts rejected for various other reasons.
If there’s any issue with the request (e.g., missing API key or invalid data), appropriate HTTP status codes should be returned along with a message explaining the issue.