Skip to main content
GET
/
v1
/
refunds
/
{id}
TypeScript SDK
import { Solifyn } from 'solifyn';

const solifyn = new Solifyn({ apiKey: 'your_private_api_key_here' });

// Retrieve a refund
const refund = await solifyn.refunds.get('ref_019e56a1...');
console.log('Refund details:', refund);
{
  "id": "ref_123",
  "whopId": "rf_xyz123",
  "amount": 10.5,
  "currency": "USD",
  "status": "succeeded",
  "paymentId": "pay_123",
  "createdAt": "2025-01-01T12:00:00Z",
  "updatedAt": "2025-01-01T12:00:00Z",
  "idempotencyKey": "idemp_abc123",
  "provider": "stripe",
  "reason": "requested_by_customer",
  "referenceValue": "ARN123456789",
  "providerCreatedAt": "2025-01-01T12:00:00Z"
}

Authorizations

Authorization
string
header
required

Authenticate requests using your standard bearer API key (e.g. YOUR_API_KEY).

Path Parameters

id
string
required

Refund ID

Example:

"ref_123"

Response

200 - application/json

Refund resolved successfully.

id
string<uuid>
required

The refund ID

Example:

"ref_123"

whopId
string
required

The Whop Refund ID

Example:

"rf_xyz123"

amount
number
required

Refunded amount

Example:

10.5

currency
string
required

Currency code

Example:

"USD"

status
enum<string>
required

Status of the refund

Available options:
pending,
succeeded,
failed,
canceled
Example:

"succeeded"

paymentId
string<uuid>
required

The associated Payment ID

Example:

"pay_123"

createdAt
string<date-time>
required

Timestamp when the refund was created in our system

Example:

"2025-01-01T12:00:00Z"

updatedAt
string<date-time>
required

Timestamp when the refund was last updated

Example:

"2025-01-01T12:00:00Z"

idempotencyKey
string | null

Client-generated key to prevent duplicate refunds

Example:

"idemp_abc123"

provider
string | null

The payment provider used

Example:

"stripe"

reason
string | null

Reason for the refund

Example:

"requested_by_customer"

referenceValue
string | null

Acquirer Reference Number (ARN) or tracking number

Example:

"ARN123456789"

providerCreatedAt
string<date-time> | null

Timestamp when the refund was processed by the provider

Example:

"2025-01-01T12:00:00Z"