API Documentation

API Documentation

API Endpoint

                
            

Description

This API endpoint allows you to create a dispute on Casap. The dispute will be identified by a unique identifier generated by Casap. This UUID will be returned in the response. The created dispute can be viewed in the "Dispute Detail" page on Casap, or it can be accessed at https://disputes-sandbox.casaphq.com/dispute/

Headers

Header Description Required
x-api-key The API key for authentication Yes
x-api-secret The API secret for authentication Yes
x-user-uuid The UUID of the user creating the dispute Yes
x-org-uuid The UUID of the user creating the dispute Yes
Content-Type The format of the request payload (should be JSON) No
version | int | required 1
This is the description of the field.
v1 | object | required {transactionDetails:[], orgUUID: "..."}
This is an object representing the fields for the v1 version of the API.
orgUUID | string | required "76851218-a1e8-418e-9151-8c2d61709521"
This is the orgUUID of the organization that the user belongs to.
transactionDetails | list | required
The list of transactions that belongs to this dispute.
transactionID | string | required "9b9eb6e0-4925-4fc6-bfe5-9552a03f595d"
This is the transaction ID of the transaction that you want to create a dispute for.
merchant | string | required "Amazon"
The merchant for the transaction.
transactedAmount | int | required 2399
The amount that transaction was authorized for. This should be in cents.
settledAmount | int | required 2399
The amount that transaction was finally settled for. This should be in cents.
transactionTimestamp | int | required 1692986978
The timestamp of the transaction. This should be in epoch time.
network | enum | required 1
The network of the card used for the transaction. This should be one of the following values:
NETWORK_TYPE_VISA = 1;
NETWORK_TYPE_MASTERCARD = 2;
NETWORK_TYPE_AMEX = 3;
transactionType | enum | required 1
The type of the transaction. This should be one of the following values:
TRANSACTION_TYPE_DEBIT = 1;
TRANSACTION_TYPE_CREDIT = 2;
TRANSACTION_TYPE_ACH = 3;
TRANSACTION_TYPE_ATM = 4;
thirdPartyTicketID | string | optional "ZEN-123-456"
The ticket ID for any third party tickets (zendesk) opened for this transaction.
thirdPartyTicketUrl | string | optional "https://zendesk.com/ZEN-123-456"
The URL for any third party tickets (zendesk) opened for this transaction.
customerInfo | object | required
The customer information for the dispute.
name | string | required "Beyonce Knowles"
The name of the customer.
email | string | required "bey@beehive.com"
The email of the customer.
accountId | string | required "12345678"
The account ID of the customer.
risk | int | optional 22
Risk of the account in percentage, 0-100.
notes | object | optional
The notes for the dispute.
comment | string | required "The thinks it's fraud"
The comment for the note.
author | string | required "70720526-3cb5-418e-9f9d-a1d07a056061"
The user uuid of the author of the note.
timestamp | int | required 1692986978
The timestamp of the note. This should be in epoch time.
fileUrls | list[string] | optional ["https://s3.amazonaws.com/bucket/path/image.png"]
The list of file URLs for the note.

Authentication

The /api/dispute endpoint requires authentication to ensure secure access.

API Key and Secret

API key and secret must be included in the request headers (X-API-Key and X-API-Secret). These values are generated and provided by the server administrator.

User Authentication

The UUID of the user creating the dispute must be included in the X-User-UUID header. This ensures that only authorized users can create disputes on behalf of their account. The org UUID must also be provided in the header for authentication purposes

Example Request

            
        

Example Response

            
        

Response Status Codes

Success Response

Status Code: 200 OK

Error Responses

Status Code: 400 Bad Request

  • Possible Causes: Missing or Invalid JSON Payload
  • Example Error String: Missing X-User-UUID header

Status Code: 401 Unauthorized

  • Possible Causes: Invalid API key or API secret.
  • Example Error String: Unauthorized

Status Code: 429 Unauthorized

  • Possible Causes: Too many requests per minute.
  • Example Error String: RateLimited
  • Retry-After: 60
  • X-RateLimit-Limit: 5

Status Code: 500 Internal Server Error

  • Possible Causes: An error occurred while processing the dispute creation.
  • Example Error String: Error occurred while creating dispute