import type * as Whop from "../index.mjs"; export interface Refund { /** The account that issued the refund, prefixed `biz_`. */ account_id: string | null; /** The refunded amount as it settled, in the payment's settlement currency, so pages of refunds net against the payment's `refunded_amount`. Converted at the rate in force when the refund was issued, not the payment's original rate. Null only when no exchange rate is recorded for a legacy multi-currency payment. */ amount: Whop.Money | null; /** When the refund was requested, as an ISO 8601 timestamp. */ created_at: string; /** A merchant-facing explanation of why the refund failed, in the request's language. Null unless the refund failed or was canceled. */ failure_message: string | null; /** Why the refund failed, normalized across providers. Null unless the refund failed or was canceled. */ failure_reason: Refund.FailureReason | null; /** Refund ID, prefixed `rf_`. */ id: string; /** Your own key-value data attached when the refund was requested. */ metadata: Record | null; /** The refunded amount in the currency the processor moved. */ original_amount: Whop.Money; /** The payment this refund reverses, prefixed `pay_`. */ payment_id: string; /** The payment provider that processed the refund, such as `paypal` or `coinbase`. */ provider: string; /** When the provider created the refund, as an ISO 8601 timestamp. */ provider_created_at: string | null; /** Why the refund was issued, when recorded. */ reason: Refund.Reason | null; /** Whether a banking-network tracking reference is available for this refund. */ reference_status: Refund.ReferenceStatus | null; /** The kind of tracking reference, such as an acquirer reference number. */ reference_type: Refund.ReferenceType | null; /** The tracking reference the buyer's bank can trace the refund by. */ reference_value: string | null; /** Where the refund stands with the processor: `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. */ status: Refund.Status; /** When the refund last changed, as an ISO 8601 timestamp. */ updated_at: string; /** True when the card network initiated the refund through Rapid Dispute Resolution. */ visa_rdr: boolean; } export declare namespace Refund { /** Why the refund failed, normalized across providers. Null unless the refund failed or was canceled. */ const FailureReason: { readonly BankDeclined: "bank_declined"; readonly ExpiredOrCanceledCard: "expired_or_canceled_card"; readonly LostOrStolenCard: "lost_or_stolen_card"; readonly InsufficientFunds: "insufficient_funds"; readonly ChargeDisputed: "charge_disputed"; readonly NotRefundable: "not_refundable"; readonly MerchantRequest: "merchant_request"; readonly Unknown: "unknown"; }; type FailureReason = (typeof FailureReason)[keyof typeof FailureReason]; /** Why the refund was issued, when recorded. */ const Reason: { readonly Duplicate: "duplicate"; readonly Fraudulent: "fraudulent"; readonly RequestedByCustomer: "requested_by_customer"; readonly ExpiredUncapturedCharge: "expired_uncaptured_charge"; readonly DisputeAlert: "dispute_alert"; }; type Reason = (typeof Reason)[keyof typeof Reason]; /** Whether a banking-network tracking reference is available for this refund. */ const ReferenceStatus: { readonly Available: "available"; readonly Pending: "pending"; readonly Unavailable: "unavailable"; }; type ReferenceStatus = (typeof ReferenceStatus)[keyof typeof ReferenceStatus]; /** The kind of tracking reference, such as an acquirer reference number. */ const ReferenceType: { readonly AcquirerReferenceNumber: "acquirer_reference_number"; readonly RetrievalReferenceNumber: "retrieval_reference_number"; readonly SystemTraceAuditNumber: "system_trace_audit_number"; }; type ReferenceType = (typeof ReferenceType)[keyof typeof ReferenceType]; /** Where the refund stands with the processor: `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. */ const Status: { readonly Pending: "pending"; readonly RequiresAction: "requires_action"; readonly Succeeded: "succeeded"; readonly Failed: "failed"; readonly Canceled: "canceled"; }; type Status = (typeof Status)[keyof typeof Status]; }