> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://beta-docs.payabli.com/api-reference/chargebacks/add-response-to-chargeback-or-return/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server. # Add response to dispute POST https://api-sandbox.payabli.com/api/ChargeBacks/response/{Id} Content-Type: application/json Add a response to a chargeback or ACH return. Reference: https://beta-docs.payabli.com/api-reference/chargebacks/add-response-to-chargeback-or-return ## Authentication - `requestToken` header (required) — API Key authentication via header ## Servers - `https://api-sandbox.payabli.com/api` (Sandbox, default) - `https://api.payabli.com/api` (Production) ## Request ### Path parameters - `Id` (long, required) — ID of chargeback or return record ### Headers - `idempotencyKey` (string, optional) — A unique ID you can include to prevent duplicating objects or transactions if a request is sent more than once. This key is not generated in Payabli, you must generate it yourself. ### Body (application/json) This endpoint expects an object. - `attachments` (list of FileContent, optional) — Array of attached files to response. - `contactEmail` (string, optional) — Email of response submitter. - `contactName` (string, optional) — Name of response submitter - `notes` (string, optional) — Response notes ## Response ### 200 Success - `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure. - `responseData` (integer, optional) — If `isSuccess` = true, this contains the chargeback identifier. If `isSuccess` = false, this contains the reason for the error. - `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'. ## Errors ### 400 Bad Request Error Bad request/ invalid data - `any` ### 401 Unauthorized Error Unauthorized request. - `any` ### 400 Bad Request Error Bad request/ invalid data - `any` ### 401 Unauthorized Error Unauthorized request. - `any` ### 500 Internal Server Error Internal API Error - `any` ### 503 Service Unavailable Error Database connection error - `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure. - `responseData` (map from string to any, optional) — The object containing the response data. - `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'. ## Types ### FileContent Contains details about a file. See See [fileObject Object Model](/api-reference/schemas/filecontent) for a complete reference. Max upload size is 30 MB. - `fContent` (string, optional) — Content of file, Base64-encoded Ignored if furl is specified. Max upload size is 30 MB. - `filename` (string, optional) — The name of the attached file. - `ftype` (enum, optional) — The MIME type of the file (if content is provided) - Allowed values: `pdf`, `doc`, `docx`, `jpg`, `jpeg`, `png`, `gif`, `txt` - `furl` (string, optional) — Optional url provided to show or download the file remotely ## Examples **Request** ```json {} ``` **Response** ```json { "isSuccess": true, "responseData": 126, "responseText": "Success" } ``` **SDK Code** ```python General success response example for chargebacks. import requests url = "https://api-sandbox.payabli.com/api/ChargeBacks/response/1000000" payload = {} headers = { "idempotencyKey": "6B29FC40-CA47-1067-B31D-00DD010662DA", "requestToken": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript General success response example for chargebacks. const url = 'https://api-sandbox.payabli.com/api/ChargeBacks/response/1000000'; const options = { method: 'POST', headers: { idempotencyKey: '6B29FC40-CA47-1067-B31D-00DD010662DA', requestToken: '', 'Content-Type': 'application/json' }, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go General success response example for chargebacks. package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-sandbox.payabli.com/api/ChargeBacks/response/1000000" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("idempotencyKey", "6B29FC40-CA47-1067-B31D-00DD010662DA") req.Header.Add("requestToken", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby General success response example for chargebacks. require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/ChargeBacks/response/1000000") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["idempotencyKey"] = '6B29FC40-CA47-1067-B31D-00DD010662DA' request["requestToken"] = '' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java General success response example for chargebacks. import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/ChargeBacks/response/1000000") .header("idempotencyKey", "6B29FC40-CA47-1067-B31D-00DD010662DA") .header("requestToken", "") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php General success response example for chargebacks. request('POST', 'https://api-sandbox.payabli.com/api/ChargeBacks/response/1000000', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', 'idempotencyKey' => '6B29FC40-CA47-1067-B31D-00DD010662DA', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```csharp General success response example for chargebacks. using RestSharp; var client = new RestClient("https://api-sandbox.payabli.com/api/ChargeBacks/response/1000000"); var request = new RestRequest(Method.POST); request.AddHeader("idempotencyKey", "6B29FC40-CA47-1067-B31D-00DD010662DA"); request.AddHeader("requestToken", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift General success response example for chargebacks. import Foundation let headers = [ "idempotencyKey": "6B29FC40-CA47-1067-B31D-00DD010662DA", "requestToken": "", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/ChargeBacks/response/1000000")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` > If you're a software company, you're a payments company™