import type * as Whop from "../index.js"; export interface Dispute { /** Whether the dispute can be conceded to the customer with `POST /disputes/{id}/accept`. True only for a chargeback still awaiting a response, before `evidence_due_at`, whose payment processor supports accepting disputes. Inquiries are never acceptable. */ acceptable: boolean; /** The account the dispute was filed against, prefixed `biz_`. */ account_id: string | null; /** The disputed amount, in whole units of `currency`. */ amount: number; /** The customer who filed the dispute. */ buyer: Whop.DisputeBuyer; /** When the dispute was opened, as an ISO 8601 timestamp. */ created_at: string; /** Three-letter ISO currency code of the disputed amount. */ currency: string; /** The evidence packet sent to the processor to contest the dispute. */ evidence: Whop.DisputeEvidence; /** The deadline to submit evidence, as an ISO 8601 timestamp. `null` when the network already auto-resolved the dispute (Visa RDR) with no evidence round, or when the processor hasn't reported a deadline for this dispute. */ evidence_due_at: string | null; /** Whether `evidence` can still be changed and submitted. */ evidence_editable: boolean; /** Why evidence can no longer be edited. `null` while `evidence_editable` is true. */ evidence_locked_reason: Dispute.EvidenceLockedReason | null; /** When the evidence was submitted to the processor, as an ISO 8601 timestamp. */ evidence_submitted_at: string | null; /** The dispute fee charged to the seller, in the currency it was collected in. `null` when no fee was charged, such as for an inquiry or a Visa RDR resolution. */ fee: Whop.Money | null; /** Dispute ID, prefixed `dspt_`. */ id: string; /** Whether this is a pre-dispute inquiry rather than a formal chargeback. Inquiries follow the same lifecycle but move no funds unless one escalates. */ inquiry: boolean; issuer_comments: Whop.DisputeIssuerComment[]; line_items: Whop.ReceiptLineItem[]; /** The payment being disputed. */ payment: Whop.DisputePayment; /** The product the disputed payment was for, prefixed `prod_`. */ product_id: string | null; /** Why the customer says they are disputing, normalized across processors and card networks. `other` covers a processor reason Whop has not categorized yet. */ reason: Dispute.Reason; /** The raw card-network or processor reason code, such as `10.4`. Informational only — `reason` is not derived from it. */ reason_code: string | null; /** Where the dispute stands. `needs_response` is awaiting evidence, `under_review` is with the processor, `won` returned the funds to the seller, `lost` returned them to the customer, and `prevented` means the customer was refunded before any ruling, so it settles like `lost`. The `warning_` statuses are the same stages for an inquiry, which moves no funds. A dispute past its `evidence_due_at` reports `under_review` — the window to respond has closed. */ status: Dispute.Status; /** When the dispute was last changed, as an ISO 8601 timestamp. */ updated_at: string; /** The variant the disputed payment was made on, prefixed `plan_`. */ variant_id: string | null; } export declare namespace Dispute { /** Why evidence can no longer be edited. `null` while `evidence_editable` is true. */ const EvidenceLockedReason: { readonly Submitted: "submitted"; readonly ResponseWindowClosed: "response_window_closed"; readonly NotContestable: "not_contestable"; }; type EvidenceLockedReason = (typeof EvidenceLockedReason)[keyof typeof EvidenceLockedReason]; /** Why the customer says they are disputing, normalized across processors and card networks. `other` covers a processor reason Whop has not categorized yet. */ const Reason: { readonly Fraudulent: "fraudulent"; readonly Unrecognized: "unrecognized"; readonly DeclinedAuthorization: "declined_authorization"; readonly ProductNotReceived: "product_not_received"; readonly ProductUnacceptable: "product_unacceptable"; readonly SubscriptionCanceled: "subscription_canceled"; readonly CreditNotProcessed: "credit_not_processed"; readonly Duplicate: "duplicate"; readonly ProcessingError: "processing_error"; readonly DocumentationRequest: "documentation_request"; readonly BankCannotProcess: "bank_cannot_process"; readonly Other: "other"; }; type Reason = (typeof Reason)[keyof typeof Reason]; /** Where the dispute stands. `needs_response` is awaiting evidence, `under_review` is with the processor, `won` returned the funds to the seller, `lost` returned them to the customer, and `prevented` means the customer was refunded before any ruling, so it settles like `lost`. The `warning_` statuses are the same stages for an inquiry, which moves no funds. A dispute past its `evidence_due_at` reports `under_review` — the window to respond has closed. */ const Status: { readonly NeedsResponse: "needs_response"; readonly WarningNeedsResponse: "warning_needs_response"; readonly UnderReview: "under_review"; readonly WarningUnderReview: "warning_under_review"; readonly Won: "won"; readonly Lost: "lost"; readonly Prevented: "prevented"; readonly WarningClosed: "warning_closed"; }; type Status = (typeof Status)[keyof typeof Status]; }