Skip to main content
POST
/
disputes
/
{id}
/
update_evidence
JavaScript
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"
  }
}

Authorizations

Authorization
string
header
required

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 ***************************

Path Parameters

id
string
required

The unique identifier of the dispute to update.

Example:

"dspt_xxxxxxxxxxxxx"

Body

application/json

Parameters for UpdateDispute

access_activity_log
string | null

An IP access activity log showing the customer used the service.

billing_address
string | null

The billing address associated with the customer's payment method.

cancellation_policy_disclosure
string | null

The company's cancellation policy text to submit as evidence.

customer_email_address
string | null

The email address of the customer associated with the disputed payment.

customer_name
string | null

The full name of the customer associated with the disputed payment.

notes
string | null

Additional notes or context to submit as part of the dispute evidence.

product_description
string | null

A description of the product or service that was provided to the customer.

refund_policy_disclosure
string | null

The company's refund policy text to submit as evidence.

refund_refusal_explanation
string | null

An explanation of why the refund request was refused.

service_date
string | null

The date when the product or service was delivered to the customer.

cancellation_policy_attachment
FileInputWithId · object

A file upload containing the company's cancellation policy document.

customer_communication_attachment
FileInputWithId · object

A file upload containing evidence of customer communication. Must be a JPEG, PNG, GIF, or PDF.

refund_policy_attachment
FileInputWithId · object

A file upload containing the company's refund policy document.

uncategorized_attachment
FileInputWithId · object

A file upload for evidence that does not fit into the other categories.

Response

A successful response

A dispute is a chargeback or payment challenge filed against a company, including evidence and response status.

id
string
required

The unique identifier for the dispute.

Example:

"dspt_xxxxxxxxxxxxx"

amount
number
required

The disputed amount in the specified currency, formatted as a decimal.

Example:

6.9

currency
enum<string>
required

The three-letter ISO currency code for the disputed amount.

Available options:
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
status
enum<string>
required

The current status of the dispute lifecycle, such as needs_response, under_review, won, or lost.

Available options:
warning_needs_response,
warning_under_review,
warning_closed,
needs_response,
under_review,
won,
lost,
closed,
other
editable
boolean | null
required

Whether the dispute evidence can still be edited and submitted. Returns true only when the dispute status requires a response.

created_at
string<date-time> | null
required

The datetime the dispute was created.

Example:

"2023-12-01T05:00:00.401Z"

visa_rdr
boolean
required

Whether the dispute was automatically resolved through Visa Rapid Dispute Resolution (RDR).

needs_response_by
string<date-time> | null
required

The deadline by which dispute evidence must be submitted. Null if no response deadline is set.

Example:

"2023-12-01T05:00:00.401Z"

reason
string | null
required

A human-readable reason for the dispute.

Example:

"Product Not Received"

plan
object
required

The plan associated with the disputed payment. Null if the dispute is not linked to a specific plan.

product
object
required

The product associated with the disputed payment. Null if the dispute is not linked to a specific product.

company
object
required

The company that the dispute was filed against.

payment
object
required

The original payment that was disputed.

access_activity_log
string | null
required

A log of IP-based access activity for the customer on Whop, submitted as evidence in the dispute.

Example:

"192.168.1.1 - 2024-01-15 12:00:00 UTC"

billing_address
string | null
required

The customer's billing address from their payment details, submitted as evidence in the dispute.

Example:

"123 Main St, New York, NY 10001"

cancellation_policy_disclosure
string | null
required

A text disclosure describing the company's cancellation policy, submitted as dispute evidence.

Example:

"All sales are final. No refunds after 30 days."

customer_email_address
string | null
required

The customer's email address from their payment details, included in the evidence packet sent to the payment processor. Editable before submission.

Example:

"customer@example.com"

customer_name
string | null
required

The customer's full name from their payment details, included in the evidence packet sent to the payment processor. Editable before submission.

Example:

"Jane Doe"

notes
string | null
required

Additional freeform notes submitted by the company as part of the dispute evidence.

Example:

"Customer used the product for 3 months before disputing."

product_description
string | null
required

A description of the product or service provided, submitted as dispute evidence.

Example:

"Monthly subscription to premium analytics dashboard."

refund_policy_disclosure
string | null
required

A text disclosure describing the company's refund policy, submitted as dispute evidence.

Example:

"Refunds available within 14 days of purchase."

refund_refusal_explanation
string | null
required

An explanation from the company for why a refund was refused, submitted as dispute evidence.

Example:

"The customer exceeded the refund window by 60 days."

service_date
string | null
required

The date when the product or service was delivered to the customer, submitted as dispute evidence.

Example:

"2024-01-15"

cancellation_policy_attachment
object
required

The cancellation policy document uploaded as dispute evidence. Null if no cancellation policy has been provided.

customer_communication_attachment
object
required

Evidence of customer communication or product usage, uploaded as a dispute attachment. Null if not provided.

refund_policy_attachment
object
required

The refund policy document uploaded as dispute evidence. Null if no refund policy has been provided.

uncategorized_attachment
object
required

An additional attachment that does not fit into the standard evidence categories. Null if not provided.