import type * as Whop from "../index.js"; export interface Payment { /** The account that received the payment, prefixed `biz_`. */ account_id: string | null; /** What the account keeps: the total less Whop's fees. */ amount_after_fees: Whop.Money; /** When Whop will capture this authorized card payment automatically unless it is voided first, as an ISO 8601 timestamp. Null when no automatic capture was requested. */ auto_capture_at: string | null; /** True when Whop refunded the payment automatically, for example on a dispute alert. */ auto_refunded: boolean; /** The billing address the buyer entered, or null. */ billing_address: Whop.PaymentAddress | null; /** Why the charge was created: a first purchase, a renewal, a one-time payment, or a manual charge. */ billing_reason: Whop.BillingReasons | null; /** When the hold on this authorized card payment expires if it is not captured first, as an ISO 8601 timestamp. Null when the payment was not created for later capture. */ capture_expires_at: string | null; /** The checkout configuration the buyer paid through, prefixed `ch_`, or null. */ checkout_configuration_id: string | null; /** The credential a buyer's surface presents to poll this payment, set its return URL and resume it when the bank asked the customer to authenticate. Only on payments created from a confirmation token or waiting on that authentication, and always null in list responses — retrieve the payment for it. */ client_secret: string | null; /** When the payment was created, as an ISO 8601 timestamp. */ created_at: string; /** The currency the payment settles in, lowercase ISO 4217. Every money field below is stated in it unless it says otherwise. */ currency: Whop.Currencies; /** The buyer's email address. Null without `member:email:read` on the account or when the buyer has no assigned email. */ customer_email: string | null; /** The phone number the buyer gave at checkout, when one was collected. */ customer_phone: string | null; /** The normalized decline reason of the most recent failed attempt, or null. */ decline_code: Whop.PaymentDeclineCodes | null; /** When an issuer warned that this payment will be disputed, or null. */ dispute_alerted_at: string | null; /** When the most recent dispute on this payment was opened, as an ISO 8601 timestamp. Null when the payment was never disputed, or without the payment:dispute:read permission. */ dispute_created_at: string | null; /** Why the most recent attempt failed, in plain words, or null. */ failure_message: string | null; /** For installment methods, how many payments the charge splits into. */ financing_installments_count: number | null; holds: Whop.PaymentHold[]; /** Payment ID, prefixed `pay_`. */ id: string; /** The buyer's IP address at checkout, as identified by Whop's fraud screening. Null when the payment was not screened at checkout, such as a subscription renewal or a charge made without the buyer present. */ ip_address: string | null; /** When the most recent charge attempt ran, or null. */ last_payment_attempt_at: string | null; line_items: Whop.ReceiptLineItem[]; /** The buyer's member record on the account, prefixed `mber_`. Null without the member:basic:read permission. */ member_id: string | null; /** The membership this payment is billed against, prefixed `mem_`. Null for one-off purchases or without the member:basic:read permission. */ membership_id: string | null; /** Your own key-value data attached when the payment was created. */ metadata: Record | null; /** True when funds are held until the order ships and no tracking number has been added yet. Null without the shipment:basic:read permission. */ needs_tracking: boolean | null; /** When the next automatic retry is scheduled, or null. */ next_payment_attempt_at: string | null; /** When the money was collected, or null while it has not been. */ paid_at: string | null; /** The instrument shaped for display: a buyer-facing name, the standard icon set, and the card's brand, last four and issuer identification number when it was a card. */ payment_instrument: Whop.PaymentInstrument | null; /** The stored payment method that was charged, prefixed `payt_`. Null when the method was not saved. */ payment_method_id: string | null; /** The kind of instrument used, for example `card`, `apple_pay`, `klarna`, or `us_bank_account`. */ payment_method_type: Whop.PaymentMethodTypes | null; payment_rule_matches: Whop.PaymentRuleMatch[]; /** How many charge attempts have failed on this payment. */ payments_failed: number; /** How much has been refunded so far, in the currency presented to the buyer. Zero when nothing has been refunded. */ presentment_refunded_amount: Whop.Money | null; /** The sales tax or VAT collected, in the currency presented to the buyer. Null when no tax applied. */ presentment_tax_amount: Whop.Money | null; /** The account-facing total in the currency presented to the buyer, before conversion into the settlement currency. Excludes buyer fees. */ presentment_total: Whop.Money | null; /** The product the variant belongs to, prefixed `prod_`. Null for a variant with no product. */ product_id: string | null; /** The promo code applied at checkout, prefixed `promo_`, or null. */ promo_code_id: string | null; /** The payment quote this payment charged, prefixed `pq_`: its purchase, promo code and `tax_amount` are the quote's. Null when the payment named no quote and tax was calculated at charge time. */ quote_id: string | null; /** Whop-hosted URL where the buyer can sign in and complete 3D Secure for an off-session charge the bank challenged — a subscription renewal or a saved-card payment. Null when recovery is unavailable, you lack `member:basic:read`, or in list responses. Retrieve the payment for it. */ recovery_url: string | null; /** True when the payment is `paid`, not yet fully refunded, and its processor supports refunds. */ refundable: boolean; /** How much has been refunded so far, as it settled — refunds convert at the rate in force when each one was issued, not the payment's original rate. */ refunded_amount: Whop.Money | null; /** When the payment was refunded, or null. */ refunded_at: string | null; /** When the earliest response is due on a dispute or Resolution Center case awaiting the account's response, as an ISO 8601 timestamp. Null when nothing awaits a response, or without the permission to read that dispute or case. */ response_due_at: string | null; /** True when the payment is `open` and Whop can attempt the charge again — see `POST /payments/{id}/retry`. */ retryable: boolean; /** Whop's published risk index from 0 (lowest) to 100 (highest), including enforced decision floors. This is not a fraud probability. Null when no score is available. */ risk_score: number | null; /** * Deprecated. Risk score explanations are no longer provided; always null. * DEPRECATED: Risk score explanations are no longer provided. Always null. */ risk_signals: Record | null; /** When the portion not listed in `holds` posts to the account's available balance, at midnight UTC. The `financial_activity.funds_available` webhook's `posted_at` carries the same value when the settlement that clears it posts. Null until the payment is paid, and always null in list responses — retrieve the payment for it. */ settlement_time_at: string | null; /** The shipment fulfilling this payment, prefixed `ship_`. Null when nothing ships or without the shipment:basic:read permission. */ shipment_id: string | null; /** The shipping address for physical goods, or null. */ shipping_address: Whop.PaymentAddress | null; /** The lifecycle state of the charge: `open` while collection is outstanding, `paid` once the money moved, `pending` while a settlement rail clears, `void`/`uncollectible` when it ended without collecting. */ status: Whop.ReceiptStatus; /** The dashboard's finer-grained reading of the payment, folding in refunds, disputes and Resolution Center cases. */ substatus: Whop.FriendlyReceiptStatus; /** The price before discounts, tax and fees. */ subtotal: Whop.Money | null; /** The sales tax or VAT collected. Null when no tax applied. */ tax_amount: Whop.Money | null; /** Whether `tax_amount` was added on top of the price (`exclusive`) or was already inside it (`inclusive`). */ tax_behavior: Whop.ReceiptTaxBehaviors | null; /** How much of the collected tax has been returned to the buyer so far. Zero when the payment carried no tax, or when nothing has been refunded. */ tax_refunded_amount: Whop.Money; /** True when the buyer completed 3D Secure for this payment. */ three_ds_verified: boolean; /** The account-facing total: the price after discounts, plus any tax added on top. Excludes buyer fees, which the buyer pays above this amount — so this is not necessarily what the buyer's statement shows. */ total: Whop.Money | null; /** When the payment last changed, as an ISO 8601 timestamp. */ updated_at: string; /** The total converted to USD at the time of the charge, for reporting across currencies. Excludes the adaptive pricing FX markup, which the account does not keep. */ usd_total: Whop.Money | null; /** The buyer. Null when the payment belongs to a company buyer rather than a user. */ user: Whop.UserSummary | null; /** The variant that was charged, prefixed `plan_`. */ variant_id: string | null; /** The Address Verification Service (AVS), cardholder name, and Card Verification Value (CVV/CVC) results, or null when the processor returned none. */ verification_checks: Whop.PaymentVerificationChecks | null; /** True when the payment can be voided or canceled. The request is rejected if the payment is no longer eligible — see `POST /payments/{id}/void`. */ voidable: boolean; }