Skip to main content
GET
/
dispute_alerts
/
{id}
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 disputeAlert = await client.disputeAlerts.retrieve('dspa_xxxxxxxxxxxxx');

console.log(disputeAlert.id);
{
  "id": "dspa_xxxxxxxxxxxxx",
  "alert_type": "dispute",
  "amount": 6.9,
  "currency": "usd",
  "created_at": "2023-12-01T05:00:00.401Z",
  "transaction_date": "2023-12-01T05:00:00.401Z",
  "charge_for_alert": true,
  "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"
    }
  },
  "dispute": {
    "id": "dspt_xxxxxxxxxxxxx",
    "amount": 6.9,
    "currency": "usd",
    "status": "warning_needs_response",
    "reason": "Product Not Received",
    "created_at": "2023-12-01T05:00:00.401Z"
  }
}

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 alert.

Example:

"dspa_xxxxxxxxxxxxx"

Response

A successful response

A dispute alert represents an early warning notification from a payment processor about a potential dispute or chargeback.

id
string
required

The unique identifier of the dispute alert.

Example:

"dspa_xxxxxxxxxxxxx"

alert_type
enum<string>
required

The type of the dispute alert.

Available options:
dispute,
dispute_rdr,
fraud
amount
number
required

The alerted amount in the specified currency.

Example:

6.9

currency
enum<string>
required

The three-letter ISO currency code for the alerted 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
created_at
string<date-time>
required

The time the dispute alert was created.

Example:

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

transaction_date
string<date-time> | null
required

The date of the original transaction.

Example:

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

charge_for_alert
boolean
required

Whether this alert incurs a charge.

payment
object
required

The payment associated with the dispute alert.

dispute
object
required

The dispute associated with the dispute alert.