Disputes
This page contains the logic that governs the creation and retrieval of disputes
Get Dispute For A Single User
GET
{{url}}/v1/disputes/:userId/user
Get a list of disputes data of a user specified in the path variable userId
Path Parameters
userId*
String
User ID whose dispute data is returned
Headers
Authorization*
String
"Bearer <YOUR_API_KEY>"
{
"status": "success",
"code": 200,
"count": 1,
"message": "Data retrieved successfully",
"data": [
{
"currency": "nil",
"disbursedAmount": 0,
"_id": "647bb82227630448728ee7bd",
"transaction": {
"_id": "6477631bdb2706b3bc1d28bd",
"trans_id": "709988524",
"delivery_addr": "Jos, Plateau State",
"pay_deadline": "2023-06-02T13:47:13.000Z",
"deadline_action": "nothing",
"seller": {
"_id": "644bb008c3c5e79ac2857cef",
"firstname": null,
"lastname": null,
"phone": null,
"photo": null,
"username": "Vicolas",
"vahlid_id": "68151491",
"email": "akohvictor1@gmail.com",
"referralCode": "VAHL-68151491",
"notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
"terms_conditions": {
"accepted": true,
"meta": {
"transaction": "6473d45cc667f96a3eb3d9f1",
"accepted_date": "2023-06-08T19:29:54.963Z",
"_id": "64822c32c8548d4c3cff91bb"
},
"_id": "64822c32c8548d4c3cff91ba"
}
},
"buyer": {
"_id": "64525e2c9c29739758c8dadd",
"firstname": null,
"lastname": null,
"phone": null,
"photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
"username": "toyabilo3@gmail.com",
"vahlid_id": "68162524",
"email": "toyabilo3@gmail.com",
"notificationToken": null
},
"products": [
{
"name": "Toy",
"prod_desc": "Perishable toy",
"prod_image": "https://lh6.googleusercontent.com/j4GKpC0L9fQ4PoqvZuuBAkEH7qXJ-_8BI4rphOJjbJmAJptgQ3SxKAl87WvEgdqPsy3XdEnthka0u2fivk4Fot9aW9rkBEBqzwLdo_mRs2BTGbv8BuEB-0WNeq8hrpyEzneGJDZT",
"prod_price": 2500,
"_id": "6477631bdb2706b3bc1d28be"
}
],
"products_price": 2500,
"is_deposit_made": true,
"is_delivery_made": true,
"is_delivery_confirmed": true,
"is_payment_reminded": false,
"status": "pending",
"is_service": false,
"test": false,
"fee": 62,
"vendorFee": 35,
"source": "developer",
"dev_mode": "live",
"promoPointsAwarded": false,
"anonymous": "buyer",
"currency": "NGN",
"created_at": "2023-05-31T15:09:15.264Z",
"updated_at": "2023-05-31T15:09:15.264Z",
"hash": "jb8iik72xiay28x1566edr99vb3m3rev6tnj9s85fyeeyqnr7r",
"__v": 0
},
"dispute_id": "624469359",
"title": "Half Payment",
"description": "Another description",
"reported_by": {
"_id": "644bb008c3c5e79ac2857cef",
"firstname": null,
"lastname": null,
"phone": null,
"photo": null,
"username": "Vicolas",
"vahlid_id": "68151491",
"email": "akohvictor1@gmail.com",
"password_reset_hash": null,
"is_auth": true,
"is_verified": true,
"developer_mode": "active",
"role": "user",
"blocked": false,
"referralPoints": 0,
"transactionPoints": 10,
"referralCode": "VAHL-68151491",
"referralCount": 0,
"pointsHistory": [],
"redemptions": [],
"referredUsers": [],
"created_at": "2023-04-28T11:37:44.830Z",
"updated_at": "2023-06-08T19:29:55.048Z",
"__v": 0,
"passwordChangedAt": "2023-06-03T18:34:22.266Z",
"live_api_key": "VHL-8w6kzuewtr5x48rtkr1s4nc83dz8vzgr44auiw1q",
"test_api_key": "VHL-TEST-fardnnxxvif7uy9gejvyfbvt9j47poz1egx4zide",
"api_key": "VHL-8w6kzuewtr5x48rtkr1s4nc83dz8vzgr44auiw1q",
"notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
"terms_conditions": {
"accepted": true,
"meta": {
"transaction": "6473d45cc667f96a3eb3d9f1",
"accepted_date": "2023-06-08T19:29:54.963Z",
"_id": "64822c32c8548d4c3cff91bb"
},
"_id": "64822c32c8548d4c3cff91ba"
}
},
"reported_user": {
"_id": "644bb008c3c5e79ac2857cef",
"firstname": null,
"lastname": null,
"phone": null,
"photo": null,
"username": "Vicolas",
"vahlid_id": "68151491",
"email": "akohvictor1@gmail.com",
"password_reset_hash": null,
"is_auth": true,
"is_verified": true,
"developer_mode": "active",
"role": "user",
"blocked": false,
"referralPoints": 0,
"transactionPoints": 10,
"referralCode": "VAHL-68151491",
"referralCount": 0,
"pointsHistory": [],
"redemptions": [],
"referredUsers": [],
"created_at": "2023-04-28T11:37:44.830Z",
"updated_at": "2023-06-08T19:29:55.048Z",
"__v": 0,
"passwordChangedAt": "2023-06-03T18:34:22.266Z",
"live_api_key": "VHL-8w6kzuewtr5x48rtkr1s4nc83dz8vzgr44auiw1q",
"test_api_key": "VHL-TEST-fardnnxxvif7uy9gejvyfbvt9j47poz1egx4zide",
"api_key": "VHL-8w6kzuewtr5x48rtkr1s4nc83dz8vzgr44auiw1q",
"notificationToken": "BBDFvCzB2w0pPh6HdHD9LEe9OsGnE6tBjEJ60gNcmMMcKFlUgmp1dMPrCYmgVFezkNBuFjapm29AOT5Ni0BRPM0",
"terms_conditions": {
"accepted": true,
"meta": {
"transaction": "6473d45cc667f96a3eb3d9f1",
"accepted_date": "2023-06-08T19:29:54.963Z",
"_id": "64822c32c8548d4c3cff91bb"
},
"_id": "64822c32c8548d4c3cff91ba"
}
},
"status": "refunded",
"source": "developer",
"dev_mode": "live",
"created_at": "2023-06-03T22:01:06.636Z",
"updated_at": "2023-06-04T17:03:29.034Z"
}
]
}
Sign Dispute Chat Image Upload
GET
{{url}}/v1/disputes/ping/sign-dispute-chat-image-upload
Generate Cloudinary image upload signature
Headers
Authorization*
String
"Bearer <YOUR_API_KEY>"
{
"status": true,
"code": 200,
"message": "Cloudinary image upload signed successfully.",
"data": {
"signature": "3ba03a7a4083d8e1d1c146812523bb55a11c9615",
"timestamp": 1686401506,
"cloudname": "vahlid",
"apikey": "947631247496439"
}
}
Get A Single Dispute
GET
{{url}}/v1/disputes/:dispute_id
Return a single dispute data specified in the path variable dispute_id
Path Parameters
dispute_id*
String
Dispute dispute_id
Headers
Authorization*
String
"Bearer <YOUR_API_KEY>"
{
"status": true,
"code": 200,
"message": "success",
"data": {
"currency": "nil",
"disbursedAmount": 0,
"source": "developer",
"dev_mode": "live",
"_id": "646f59a0be520f17bed9b6f8",
"transaction": {
"dev_mode": "live",
"_id": "645e7c60b1dc2eca7e7c942d",
"trans_id": "TEST-801466473",
"delivery_addr": "Lagos",
"pay_deadline": "2023-05-18T16:58:18.000Z",
"deadline_action": "nothing",
"seller": {
"_id": "645238b99af8343783637e5c",
"firstname": "Abass",
"lastname": "Adisa",
"phone": "08094145784",
"photo": "https://res.cloudinary.com/vahlid/image/upload/v1685716788/vahlid_mern/avatar/ok8rjghmmqir3eimikzg.jpg",
"username": "Abass20",
"vahlid_id": "68885611",
"email": "cafipo8199@meidecn.com",
"referralCode": "VAHL-68885611",
"notificationToken": null
},
"buyer": {
"_id": "64525e2c9c29739758c8dadd",
"firstname": null,
"lastname": null,
"phone": null,
"photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
"username": "toyabilo3@gmail.com",
"vahlid_id": "68162524",
"email": "toyabilo3@gmail.com",
"notificationToken": null
},
"products": [
{
"name": "Massage",
"prod_desc": "Full body massage",
"prod_price": 15000,
"_id": "645e7c60b1dc2eca7e7c942e"
},
{
"name": "Develop mobile app",
"prod_desc": "Develop Vahlid mobile app",
"prod_price": 1000000,
"_id": "645e7c60b1dc2eca7e7c942f"
}
],
"products_price": 1015000,
"is_deposit_made": false,
"is_delivery_made": false,
"is_delivery_confirmed": false,
"is_payment_reminded": false,
"status": "pending",
"is_service": true,
"test": false,
"fee": 15325,
"vendorFee": 2000,
"source": "api",
"promoPointsAwarded": false,
"anonymous": "buyer",
"currency": "NGN",
"disburse": {
"amount": 1015000,
"exchangeRate": 1,
"currency": "NGN",
"_id": "645e7c60b1dc2eca7e7c9430"
},
"created_at": "2023-05-12T17:50:24.986Z",
"updated_at": "2023-05-12T17:50:24.986Z",
"hash": "cdpdyjd1j221zem4p9dojofyin1hoi394ss1j6vu1izmazngke",
"__v": 0
},
"dispute_id": "730768178",
"title": "No Payment",
"description": "Buyer has refused to make payments even when I have sent her the invoice to show the legitimacy of the transaction, buyer is not serious.",
"reported_by": {
"_id": "645238b99af8343783637e5c",
"firstname": "Abass",
"lastname": "Adisa",
"phone": "08094145784",
"photo": "https://res.cloudinary.com/vahlid/image/upload/v1685716788/vahlid_mern/avatar/ok8rjghmmqir3eimikzg.jpg",
"username": "Abass20",
"vahlid_id": "68885611",
"email": "cafipo8199@meidecn.com",
"password_reset_hash": null,
"is_auth": true,
"is_verified": true,
"developer_mode": "inactive",
"role": "agent",
"blocked": false,
"referralPoints": 0,
"transactionPoints": 0,
"referralCode": "VAHL-68885611",
"referralCount": 0,
"pointsHistory": [],
"redemptions": [],
"referredUsers": [],
"created_at": "2023-05-03T10:34:33.929Z",
"updated_at": "2023-06-04T20:24:51.456Z",
"__v": 0,
"otp": null,
"otpExpiryTime": null,
"notificationToken": null,
"cloudinaryImagePublicID": "vahlid_mern/avatar/ok8rjghmmqir3eimikzg"
},
"reported_user": {
"_id": "64525e2c9c29739758c8dadd",
"firstname": null,
"lastname": null,
"phone": null,
"photo": "https://res.cloudinary.com/vahlid/image/upload/v1685907632/vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd.png",
"username": "toyabilo3@gmail.com",
"vahlid_id": "68162524",
"email": "toyabilo3@gmail.com",
"password_reset_hash": null,
"is_auth": false,
"is_verified": true,
"developer_mode": "inactive",
"role": "agent",
"blocked": false,
"referralPoints": 0,
"transactionPoints": 0,
"referralCount": 0,
"pointsHistory": [],
"redemptions": [],
"referredUsers": [],
"created_at": "2023-05-03T13:14:20.691Z",
"updated_at": "2023-06-04T19:55:11.789Z",
"__v": 0,
"notificationToken": null,
"otp": null,
"otpExpiryTime": null,
"cloudinaryImagePublicID": "vahlid_mern/avatar/w2yjl1o3uai5zo2zufwd",
"passwordChangedAt": "2023-06-04T19:49:29.122Z"
},
"status": "pending",
"created_at": "2023-05-25T12:50:40.754Z",
"updated_at": "2023-05-25T12:50:40.754Z"
}
}
Get Messages For A Dispute
GET
{{url}}/v1/disputes/:dispute_id/messages
Return a list of Messages associated with a Dispute specified in the path variable dispute_id
and a total number of results.
Path Parameters
dispute_id*
String
Dispute dispute_id
Query Parameters
page
String
Page of the transaction to be returned. The default is 1 (first page).
sort
String
Arrange the data returned in a specific order, either in ascending or descending order, based on one or more fields. It is sorted by the most recent data by default
limit
String
The number of results to be returned. The default is 10
Headers
Authorization*
String
"Bearer <YOUR_API_KEY>"
{
"status": "success",
"code": 200,
"count": 1,
"message": "Data retrieved successfully",
"data": [
{
"source": "developer",
"dev_mode": "live",
"_id": "6479ff5440af5f6570f69285",
"dispute_id": "646f59a0be520f17bed9b6f8",
"author": "645238b99af8343783637e5c",
"senderName": "Abass19",
"uuid": "b7b1d069-8040-45af-ad16-63739c5a261b",
"message": "Hello there 👋",
"created_at": "2023-06-02T14:40:20.937Z",
"updated_at": "2023-06-02T14:40:20.937Z"
},
]
}
Create A Dispute
POST
{{url}}/v1/disputes
Create a dispute by reporting a user to a transaction
Headers
Authorization*
String
"Bearer <YOUR_API_KEY>"
Request Body
transaction*
String
Transaction _id
title*
String
Dispute title
reported_user*
String
User ID of the user you want to report
description*
String
Dispute description
{
"status": "fail",
"error": {
"statusCode": 400,
"status": "fail",
"isOperational": true
},
"message": "User with this ID: 61863b6d4e60124ffc8a77e0 was not found.",
}
Last updated
Was this helpful?