import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const dispute = await client.disputes.updateEvidence('dspt_xxxxxxxxxxxxx');
console.log(dispute.id);{
"id": "dspt_xxxxxxxxxxxxx",
"amount": 6.9,
"currency": "usd",
"status": "warning_needs_response",
"editable": true,
"created_at": "2023-12-01T05:00:00.401Z",
"visa_rdr": true,
"needs_response_by": "2023-12-01T05:00:00.401Z",
"reason": "Product Not Received",
"plan": {
"id": "plan_xxxxxxxxxxxxx"
},
"product": {
"id": "prod_xxxxxxxxxxxxx",
"title": "Pickaxe Analytics"
},
"company": {
"id": "biz_xxxxxxxxxxxxxx",
"title": "<string>"
},
"payment": {
"id": "pay_xxxxxxxxxxxxxx",
"total": 6.9,
"subtotal": 6.9,
"usd_total": 6.9,
"currency": "usd",
"created_at": "2023-12-01T05:00:00.401Z",
"paid_at": "2023-12-01T05:00:00.401Z",
"dispute_alerted_at": "2023-12-01T05:00:00.401Z",
"payment_method_type": "acss_debit",
"billing_reason": "subscription_create",
"card_brand": "mastercard",
"card_last4": "4242",
"user": {
"id": "user_xxxxxxxxxxxxx",
"name": "John Doe",
"username": "johndoe42",
"email": "john.doe@example.com"
},
"member": {
"id": "<string>",
"phone": "<string>"
},
"membership": {
"id": "mem_xxxxxxxxxxxxxx",
"status": "trialing"
}
},
"access_activity_log": "192.168.1.1 - 2024-01-15 12:00:00 UTC",
"billing_address": "123 Main St, New York, NY 10001",
"cancellation_policy_disclosure": "All sales are final. No refunds after 30 days.",
"customer_email_address": "customer@example.com",
"customer_name": "Jane Doe",
"notes": "Customer used the product for 3 months before disputing.",
"product_description": "Monthly subscription to premium analytics dashboard.",
"refund_policy_disclosure": "Refunds available within 14 days of purchase.",
"refund_refusal_explanation": "The customer exceeded the refund window by 60 days.",
"service_date": "2024-01-15",
"cancellation_policy_attachment": {
"id": "<string>",
"filename": "document.pdf",
"content_type": "image/jpeg",
"url": "https://media.whop.com/abc123/optimized.jpg"
},
"customer_communication_attachment": {
"id": "<string>",
"filename": "document.pdf",
"content_type": "image/jpeg",
"url": "https://media.whop.com/abc123/optimized.jpg"
},
"refund_policy_attachment": {
"id": "<string>",
"filename": "document.pdf",
"content_type": "image/jpeg",
"url": "https://media.whop.com/abc123/optimized.jpg"
},
"uncategorized_attachment": {
"id": "<string>",
"filename": "document.pdf",
"content_type": "image/jpeg",
"url": "https://media.whop.com/abc123/optimized.jpg"
}
}Update a dispute with evidence data to attempt to win the dispute.
Required permissions:
payment:disputeplan:basic:readaccess_pass:basic:readcompany:basic:readpayment:basic:readmember:email:readmember:basic:readmember:phone:readimport Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const dispute = await client.disputes.updateEvidence('dspt_xxxxxxxxxxxxx');
console.log(dispute.id);{
"id": "dspt_xxxxxxxxxxxxx",
"amount": 6.9,
"currency": "usd",
"status": "warning_needs_response",
"editable": true,
"created_at": "2023-12-01T05:00:00.401Z",
"visa_rdr": true,
"needs_response_by": "2023-12-01T05:00:00.401Z",
"reason": "Product Not Received",
"plan": {
"id": "plan_xxxxxxxxxxxxx"
},
"product": {
"id": "prod_xxxxxxxxxxxxx",
"title": "Pickaxe Analytics"
},
"company": {
"id": "biz_xxxxxxxxxxxxxx",
"title": "<string>"
},
"payment": {
"id": "pay_xxxxxxxxxxxxxx",
"total": 6.9,
"subtotal": 6.9,
"usd_total": 6.9,
"currency": "usd",
"created_at": "2023-12-01T05:00:00.401Z",
"paid_at": "2023-12-01T05:00:00.401Z",
"dispute_alerted_at": "2023-12-01T05:00:00.401Z",
"payment_method_type": "acss_debit",
"billing_reason": "subscription_create",
"card_brand": "mastercard",
"card_last4": "4242",
"user": {
"id": "user_xxxxxxxxxxxxx",
"name": "John Doe",
"username": "johndoe42",
"email": "john.doe@example.com"
},
"member": {
"id": "<string>",
"phone": "<string>"
},
"membership": {
"id": "mem_xxxxxxxxxxxxxx",
"status": "trialing"
}
},
"access_activity_log": "192.168.1.1 - 2024-01-15 12:00:00 UTC",
"billing_address": "123 Main St, New York, NY 10001",
"cancellation_policy_disclosure": "All sales are final. No refunds after 30 days.",
"customer_email_address": "customer@example.com",
"customer_name": "Jane Doe",
"notes": "Customer used the product for 3 months before disputing.",
"product_description": "Monthly subscription to premium analytics dashboard.",
"refund_policy_disclosure": "Refunds available within 14 days of purchase.",
"refund_refusal_explanation": "The customer exceeded the refund window by 60 days.",
"service_date": "2024-01-15",
"cancellation_policy_attachment": {
"id": "<string>",
"filename": "document.pdf",
"content_type": "image/jpeg",
"url": "https://media.whop.com/abc123/optimized.jpg"
},
"customer_communication_attachment": {
"id": "<string>",
"filename": "document.pdf",
"content_type": "image/jpeg",
"url": "https://media.whop.com/abc123/optimized.jpg"
},
"refund_policy_attachment": {
"id": "<string>",
"filename": "document.pdf",
"content_type": "image/jpeg",
"url": "https://media.whop.com/abc123/optimized.jpg"
},
"uncategorized_attachment": {
"id": "<string>",
"filename": "document.pdf",
"content_type": "image/jpeg",
"url": "https://media.whop.com/abc123/optimized.jpg"
}
}A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
The unique identifier of the dispute to update.
"dspt_xxxxxxxxxxxxx"
Parameters for UpdateDispute
An IP access activity log showing the customer used the service.
The billing address associated with the customer's payment method.
The company's cancellation policy text to submit as evidence.
The email address of the customer associated with the disputed payment.
The full name of the customer associated with the disputed payment.
Additional notes or context to submit as part of the dispute evidence.
A description of the product or service that was provided to the customer.
The company's refund policy text to submit as evidence.
An explanation of why the refund request was refused.
The date when the product or service was delivered to the customer.
A file upload containing the company's cancellation policy document.
Show child attributes
A file upload containing evidence of customer communication. Must be a JPEG, PNG, GIF, or PDF.
Show child attributes
A file upload containing the company's refund policy document.
Show child attributes
A file upload for evidence that does not fit into the other categories.
Show child attributes
A successful response
A dispute is a chargeback or payment challenge filed against a company, including evidence and response status.
The unique identifier for the dispute.
"dspt_xxxxxxxxxxxxx"
The disputed amount in the specified currency, formatted as a decimal.
6.9
The three-letter ISO currency code for the disputed amount.
usd, sgd, inr, aud, brl, cad, dkk, eur, nok, gbp, sek, chf, hkd, huf, jpy, mxn, myr, pln, czk, nzd, aed, eth, ape, cop, ron, thb, bgn, idr, dop, php, try, krw, twd, vnd, pkr, clp, uyu, ars, zar, dzd, tnd, mad, kes, kwd, jod, all, xcd, amd, bsd, bhd, bob, bam, khr, crc, xof, egp, etb, gmd, ghs, gtq, gyd, ils, jmd, mop, mga, mur, mdl, mnt, nad, ngn, mkd, omr, pyg, pen, qar, rwf, sar, rsd, lkr, tzs, ttd, uzs, rub, btc, cny, usdt The current status of the dispute lifecycle, such as needs_response, under_review, won, or lost.
warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, won, lost, closed, other Whether the dispute evidence can still be edited and submitted. Returns true only when the dispute status requires a response.
The datetime the dispute was created.
"2023-12-01T05:00:00.401Z"
Whether the dispute was automatically resolved through Visa Rapid Dispute Resolution (RDR).
The deadline by which dispute evidence must be submitted. Null if no response deadline is set.
"2023-12-01T05:00:00.401Z"
A human-readable reason for the dispute.
"Product Not Received"
The plan associated with the disputed payment. Null if the dispute is not linked to a specific plan.
Show child attributes
The product associated with the disputed payment. Null if the dispute is not linked to a specific product.
Show child attributes
The company that the dispute was filed against.
Show child attributes
The original payment that was disputed.
Show child attributes
A log of IP-based access activity for the customer on Whop, submitted as evidence in the dispute.
"192.168.1.1 - 2024-01-15 12:00:00 UTC"
The customer's billing address from their payment details, submitted as evidence in the dispute.
"123 Main St, New York, NY 10001"
A text disclosure describing the company's cancellation policy, submitted as dispute evidence.
"All sales are final. No refunds after 30 days."
The customer's email address from their payment details, included in the evidence packet sent to the payment processor. Editable before submission.
"customer@example.com"
The customer's full name from their payment details, included in the evidence packet sent to the payment processor. Editable before submission.
"Jane Doe"
Additional freeform notes submitted by the company as part of the dispute evidence.
"Customer used the product for 3 months before disputing."
A description of the product or service provided, submitted as dispute evidence.
"Monthly subscription to premium analytics dashboard."
A text disclosure describing the company's refund policy, submitted as dispute evidence.
"Refunds available within 14 days of purchase."
An explanation from the company for why a refund was refused, submitted as dispute evidence.
"The customer exceeded the refund window by 60 days."
The date when the product or service was delivered to the customer, submitted as dispute evidence.
"2024-01-15"
The cancellation policy document uploaded as dispute evidence. Null if no cancellation policy has been provided.
Show child attributes
Evidence of customer communication or product usage, uploaded as a dispute attachment. Null if not provided.
Show child attributes
The refund policy document uploaded as dispute evidence. Null if no refund policy has been provided.
Show child attributes
An additional attachment that does not fit into the standard evidence categories. Null if not provided.
Show child attributes
Was this page helpful?