import type * as Whop from "../index.js"; export interface PaymentQuote { /** The account the purchase is priced for, prefixed `biz_`. */ account_id: string; /** The billing address the purchase was priced with, or null. Where tax was calculated when no shipping address was given, and the address the registration belongs to. */ address: Whop.PaymentAddress | null; /** Three-letter ISO 4217 code of the variants' own currency, lowercase. Equal to `currency` when nothing was converted. */ base_currency: string; /** `total` in `base_currency` at `exchange_rate`: the variants' own prices after the promo code, plus `tax_amount` converted at `exchange_rate` when tax is added on top. Equal to `total` when nothing was converted. The payment charges `total`, in `currency`. */ base_total: Whop.Money; /** When the quote was priced, as an ISO 8601 timestamp. */ created_at: string; /** Three-letter ISO 4217 currency code the purchase is priced and charged in, lowercase: the variants' own currency, or the `presentment_currency` it was converted into. */ currency: string; /** What the promo code takes off. Zero without a code. */ discount: Whop.Money; /** How many units of `currency` one unit of `base_currency` buys, as a decimal string such as `"5.4321"`: the rate the variants' prices were converted at, fixed until `expires_at`, and the rate a payment consuming the quote is charged at. A string, like money amounts, so no float rounds it in transit. Null when nothing was converted. */ exchange_rate: string | null; /** When the quote stops being chargeable, as an ISO 8601 timestamp. Quote again after it. */ expires_at: string; /** Payment quote ID, prefixed `pq_`. */ id: string; line_items: Whop.PaymentQuoteLineItem[]; /** Which location tax was calculated for: `shipping_address` when it carries a country, else the billing `address` when it does, else the `presentment_country` sent, else the buyer's `ip_address`. A quote located by `presentment_country` or `ip_address` is a preview that estimates tax: a payment cannot use it, so quote again with the buyer's address to pay. Null when nothing in the request located the buyer, which only a seller that collects no tax on this purchase is quoted without; `tax_status` is then `not_applicable`. */ located_by: PaymentQuote.LocatedBy | null; /** The payment holding this quote, prefixed `pay_`, or null while it is unspent. A declined payment keeps its quote and can be retried; check that payment's `status`. */ payment_id: string | null; /** The promo code the quote applied, prefixed `promo_`, or null. */ promo_code_id: string | null; recommended_currencies: string[]; /** The shipping address the purchase was priced with, or null. When present it is where tax was calculated. */ shipping_address: Whop.PaymentAddress | null; /** The price of every line before the promo code, tax and fees. */ subtotal: Whop.Money; /** The tax a payment consuming this quote charges. Zero unless `tax_status` is `calculated`. */ tax_amount: Whop.Money; /** Whether tax is added on top of the price (`exclusive`) or already inside it (`inclusive`). Null when no tax was calculated. */ tax_behavior: PaymentQuote.TaxBehavior | null; tax_ids: Whop.TaxId[]; /** `calculated`: every line was priced and a payment may consume the quote. `not_applicable`: this seller collects no tax on this purchase, so the quote owes none and may still be consumed. `unavailable`: tax could not be priced — the provider did not answer, or this seller's tax setup cannot price a purchase here — so a payment refuses the quote; quote again, or charge without `quote_id` to have tax calculated at charge time. */ tax_status: PaymentQuote.TaxStatus; /** What the buyer pays: the subtotal less the discount, plus `tax_amount` when tax is added on top. */ total: Whop.Money; } export declare namespace PaymentQuote { /** Which location tax was calculated for: `shipping_address` when it carries a country, else the billing `address` when it does, else the `presentment_country` sent, else the buyer's `ip_address`. A quote located by `presentment_country` or `ip_address` is a preview that estimates tax: a payment cannot use it, so quote again with the buyer's address to pay. Null when nothing in the request located the buyer, which only a seller that collects no tax on this purchase is quoted without; `tax_status` is then `not_applicable`. */ const LocatedBy: { readonly ShippingAddress: "shipping_address"; readonly Address: "address"; readonly PresentmentCountry: "presentment_country"; readonly IpAddress: "ip_address"; }; type LocatedBy = (typeof LocatedBy)[keyof typeof LocatedBy]; /** Whether tax is added on top of the price (`exclusive`) or already inside it (`inclusive`). Null when no tax was calculated. */ const TaxBehavior: { readonly Inclusive: "inclusive"; readonly Exclusive: "exclusive"; }; type TaxBehavior = (typeof TaxBehavior)[keyof typeof TaxBehavior]; /** `calculated`: every line was priced and a payment may consume the quote. `not_applicable`: this seller collects no tax on this purchase, so the quote owes none and may still be consumed. `unavailable`: tax could not be priced — the provider did not answer, or this seller's tax setup cannot price a purchase here — so a payment refuses the quote; quote again, or charge without `quote_id` to have tax calculated at charge time. */ const TaxStatus: { readonly Calculated: "calculated"; readonly NotApplicable: "not_applicable"; readonly Unavailable: "unavailable"; }; type TaxStatus = (typeof TaxStatus)[keyof typeof TaxStatus]; }