Skip to main content
GET
/
refunds
/
{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 refund = await client.refunds.retrieve('rf_xxxxxxxxxxxxxxx');

console.log(refund.id);
{
  "id": "rf_xxxxxxxxxxxxxxx",
  "amount": 6.9,
  "currency": "usd",
  "status": "pending",
  "created_at": "2023-12-01T05:00:00.401Z",
  "provider": "stripe",
  "provider_created_at": "2023-12-01T05:00:00.401Z",
  "reference_status": "available",
  "reference_type": "acquirer_reference_number",
  "reference_value": "74850120752",
  "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"
    }
  }
}

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

Example:

"rf_xxxxxxxxxxxxxxx"

Response

A successful response

A refund represents a full or partial reversal of a payment, including the amount, status, and payment provider.

id
string
required

The unique identifier for the refund.

Example:

"rf_xxxxxxxxxxxxxxx"

amount
number
required

The refunded amount as a decimal in the specified currency, such as 10.43 for $10.43 USD.

Example:

6.9

currency
enum<string>
required

The three-letter ISO currency code for the refunded 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,
usdt
status
enum<string>
required

The current processing status of the refund, such as pending, succeeded, or failed.

Available options:
pending,
requires_action,
succeeded,
failed,
canceled
created_at
string<date-time>
required

The datetime the refund was created.

Example:

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

provider
enum<string>
required

The payment provider that processed the refund.

Available options:
stripe,
coinbase,
paypal,
apple,
sezzle,
splitit,
platform_balance,
multi_psp,
adyen,
claritypay,
checkout_dot_com,
airwallex
provider_created_at
string<date-time> | null
required

The timestamp when the refund was created in the payment provider's system. Null if not available from the provider.

Example:

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

reference_status
enum<string> | null
required

The availability status of the refund tracking reference from the payment processor. Null if no reference was provided.

Available options:
available,
pending,
unavailable
reference_type
enum<string> | null
required

The type of tracking reference provided by the payment processor, such as an acquirer reference number. Null if no reference was provided.

Available options:
acquirer_reference_number,
retrieval_reference_number,
system_trace_audit_number
reference_value
string | null
required

The tracking reference value from the payment processor, used to trace the refund through banking networks. Null if no reference was provided.

Example:

"74850120752"

payment
object
required

The original payment that this refund was issued against. Null if the payment is no longer available.