Dispute creation

API allows to create a transaction dispute if the transaction is rejected but the user’s payment has been made. The dispute is created by sending additional files and a new amount of the transaction.

This API allows you to initiate a dispute over the transaction if there is disagreement about its execution. For example, a user could send an incorrect amount or the payment is made, but the transaction has been rejected. You can send additional files and a new amount of the transaction to confirm the dispute.

Request

POST https://repay.cx/api/v1/external/deals/{deal.id}/disputes

Headers

Name
Type
Description

api-key

string

API key for requests authentication

These fields can be passed as headers in an HTTP request depending on the API implementation.

Parameters

Name
Type
Description
Required

deal_id

string

Unique transaction identifier

new_amount

string (number)

New transaction amount to be specified in the dispute

Body

Name
Type
Description

files

file array

Files that are uploaded in the request, such as evidence for a dispute. Each file is passed with its type. Pay attention! The names of attached files must be written in Latin.

cURL Example

#!/bin/bash

deal_id=1  # Change to actual transaction ID
new_deal_amount=1000  # Change to actual amount
api_key="cashier-api-key"  # Change to the actual API key

# Files to be sent
file1="file1.pdf"
file2="file2.pdf"
file3="file3.pdf"

curl -X POST "http://repay.cx/api/v1/external/deals/$deal_id/disputes" \
-H "api-key: $api_key" \
-H "origin: your-domain" \
-F "files=@$file1;type=application/pdf" \
-F "files=@$file2;type=application/pdf" \
-F "files=@$file3;type=application/pdf" \
-F "new_amount=$new_deal_amount"

This code sends a POST request with multiple files, passing them in multipart/form-data format via -F. Headers and parameters including the API key and amount are also specified in the request.

Response

Example of a successful response

{
    "status_code": 200,
    "error": {},
    "payload": {
        "id": "5bc508c3-5788-4827-8da8-ef366a7ba545",
        "status": "uploaded"
    }
}
Name
Type
Description

payload

object

Additional information about transaction

payload.id

string (UUID4)

Unique identifier of created application

payload.status

string

Status of transaction, for example created

Last updated