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"
}
}Retrieves the details of an existing dispute alert.
Required permissions:
payment:dispute_alert:readpayment:basic:readmember:email:readmember:basic:readmember:phone:readpayment:dispute:readimport 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"
}
}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 alert.
"dspa_xxxxxxxxxxxxx"
A successful response
A dispute alert represents an early warning notification from a payment processor about a potential dispute or chargeback.
The unique identifier of the dispute alert.
"dspa_xxxxxxxxxxxxx"
The type of the dispute alert.
dispute, dispute_rdr, fraud The alerted amount in the specified currency.
6.9
The three-letter ISO currency code for the alerted 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 time the dispute alert was created.
"2023-12-01T05:00:00.401Z"
The date of the original transaction.
"2023-12-01T05:00:00.401Z"
Whether this alert incurs a charge.
The payment associated with the dispute alert.
Show child attributes
The dispute associated with the dispute alert.
Show child attributes
Was this page helpful?