import type * as Whop from "../../../../index.mjs"; /** * @example * { * account_id: "biz_xxxxxxxxxxxxxx" * } */ export interface CreatePaymentQuotesRequest extends Whop.PaymentInput { /** The buyer's billing address. Where tax is calculated when no shipping address is given, and the address a tax registration belongs to. A seller that collects tax on this purchase needs the buyer located by a `country` here, on `shipping_address`, a `presentment_country`, or an `ip_address`; without one the quote is refused with `quote_location_required`. Only the keys you supply are kept. The payment that consumes the quote must put the buyer in the same place, by country, state and postal code, through its own `shipping_address` or its confirmation token's billing address, or it is refused with `quote_mismatch`. */ address?: CreatePaymentQuotesRequest.Address | null; /** The buyer's IP address, when your server makes the call on their behalf. Locates the buyer when neither address carries a country and no `presentment_country` is sent. A quote located this way (`located_by` is `ip_address`) is a preview: a payment refuses it with `quote_preview_only`, so quote again with the buyer's address before paying. Also where `presentment_currency` `auto` and `recommended_currencies` find the buyer's local currency, and where a payment method must be able to collect it. */ ip_address?: string | null; /** What the buyer is purchasing. Each entry names an existing variant by `variant_id`. Several entries form a cart, which requires every variant to be compatible, belong to this account, and use the same currency. */ line_items?: CreatePaymentQuotesRequest.LineItems.Item[]; /** The country to price the purchase for, as an ISO 3166-1 alpha-2 code such as `JP`, when the buyer chose one: a store's country picker. Prices in the currency `auto` would pick for a buyer in that country, so send it instead of `presentment_currency`, never with it. Whether a payment method can collect that currency is still judged where the buyer is: by `ip_address`, and by this country only without one. With no address that carries a country, tax is estimated for this country (`located_by` is `presentment_country`) at the country level, and a quote located this way is a preview a payment refuses with `quote_preview_only`. Send it only once the buyer has chosen a country: without it, an `ip_address` estimates more precisely, such as for a US state. For a country Whop has no currency for, the quote is priced as `auto` for the buyer's `ip_address`, and tax is still estimated for the country. */ presentment_country?: string | null; /** The currency to price and charge the purchase in. Omit it, or send null, to price in the variants' own currency. `auto` prices in the currency of the country Whop places the buyer's `ip_address` in when the purchase can be converted into it and a payment method can collect it, and in the variants' own currency otherwise, including when no `ip_address` is sent or Whop cannot place it in a country. To choose that country instead, send `presentment_country` in place of this. A three-letter ISO 4217 code, such as `eur`, prices in that currency or is refused: with `presentment_currency_unsupported` when the purchase cannot be converted into it (adaptive pricing is off for the variant, the variant is not a one-time purchase, or `plan` describes a variant that does not exist yet), and with `presentment_currency_not_payable` when no payment method can collect it. A converted quote states every amount in this currency at an `exchange_rate` fixed until `expires_at`, and the payment that consumes it is charged in this currency at that rate. */ presentment_currency?: string | null; /** Where physical goods ship. When present it is where tax is calculated; omit it for digital goods. Only the keys you supply are kept. The payment that consumes the quote must ship to the same place, by country, state and postal code, or it is refused with `quote_mismatch`. */ shipping_address?: CreatePaymentQuotesRequest.ShippingAddress | null; /** The buyer's tax registration, for a business purchase. One entry. Prices the purchase as business-to-business where that applies (EU reverse charge, for one) and requires an `address` to belong to. */ tax_ids?: CreatePaymentQuotesRequest.TaxIds.Item[] | null; } export declare namespace CreatePaymentQuotesRequest { /** * The buyer's billing address. Where tax is calculated when no shipping address is given, and the address a tax registration belongs to. A seller that collects tax on this purchase needs the buyer located by a `country` here, on `shipping_address`, a `presentment_country`, or an `ip_address`; without one the quote is refused with `quote_location_required`. Only the keys you supply are kept. The payment that consumes the quote must put the buyer in the same place, by country, state and postal code, through its own `shipping_address` or its confirmation token's billing address, or it is refused with `quote_mismatch`. */ interface Address { /** City name. */ city?: (string | null) | undefined; /** ISO 3166-1 alpha-2 country code, such as `US`. */ country?: (string | null) | undefined; /** First line of the street address. */ line1?: (string | null) | undefined; /** Second line of the street address. */ line2?: (string | null) | undefined; /** The full name on the address. */ name?: (string | null) | undefined; /** Postal or ZIP code. */ postal_code?: (string | null) | undefined; /** State, province, or region code, such as `CA`. */ state?: (string | null) | undefined; } type LineItems = LineItems.Item[]; namespace LineItems { interface Item { /** How many units of the variant to purchase. Defaults to 1; more than 1 requires the variant to allow multiple quantities. */ quantity?: (number | null) | undefined; /** An existing variant to charge for, prefixed `plan_`. Each variant may appear once — use `quantity` for multiple units. */ variant_id: string; } } /** * Where physical goods ship. When present it is where tax is calculated; omit it for digital goods. Only the keys you supply are kept. The payment that consumes the quote must ship to the same place, by country, state and postal code, or it is refused with `quote_mismatch`. */ interface ShippingAddress { /** City name. */ city?: (string | null) | undefined; /** ISO 3166-1 alpha-2 country code, such as `US`. */ country?: (string | null) | undefined; /** First line of the street address. */ line1?: (string | null) | undefined; /** Second line of the street address. */ line2?: (string | null) | undefined; /** The full name on the address. */ name?: (string | null) | undefined; /** Postal or ZIP code. */ postal_code?: (string | null) | undefined; /** State, province, or region code, such as `CA`. */ state?: (string | null) | undefined; } type TaxIds = TaxIds.Item[]; namespace TaxIds { interface Item { /** The registration type. */ type: Item.Type; /** The registration number as issued. */ value: string; } namespace Item { /** The registration type. */ const Type: { readonly AdNrt: "ad_nrt"; readonly AoTin: "ao_tin"; readonly ArCuit: "ar_cuit"; readonly AlTin: "al_tin"; readonly AmTin: "am_tin"; readonly AwTin: "aw_tin"; readonly AuAbn: "au_abn"; readonly AuArn: "au_arn"; readonly EuVat: "eu_vat"; readonly AzTin: "az_tin"; readonly BsTin: "bs_tin"; readonly BhVat: "bh_vat"; readonly BdBin: "bd_bin"; readonly BbTin: "bb_tin"; readonly ByTin: "by_tin"; readonly BjIfu: "bj_ifu"; readonly BoTin: "bo_tin"; readonly BaTin: "ba_tin"; readonly BrCnpj: "br_cnpj"; readonly BrCpf: "br_cpf"; readonly BgUic: "bg_uic"; readonly BfIfu: "bf_ifu"; readonly KhTin: "kh_tin"; readonly CmNiu: "cm_niu"; readonly CaBn: "ca_bn"; readonly CaGstHst: "ca_gst_hst"; readonly CaPstBc: "ca_pst_bc"; readonly CaPstMb: "ca_pst_mb"; readonly CaPstSk: "ca_pst_sk"; readonly CaQst: "ca_qst"; readonly CvNif: "cv_nif"; readonly ClTin: "cl_tin"; readonly CnTin: "cn_tin"; readonly CoNit: "co_nit"; readonly CdNif: "cd_nif"; readonly CrTin: "cr_tin"; readonly HrOib: "hr_oib"; readonly DoRcn: "do_rcn"; readonly EcRuc: "ec_ruc"; readonly EgTin: "eg_tin"; readonly SvNit: "sv_nit"; readonly EtTin: "et_tin"; readonly EuOssVat: "eu_oss_vat"; readonly GeVat: "ge_vat"; readonly GhTin: "gh_tin"; readonly DeStn: "de_stn"; readonly GbVat: "gb_vat"; readonly GnNif: "gn_nif"; readonly HkBr: "hk_br"; readonly HuTin: "hu_tin"; readonly IsVat: "is_vat"; readonly InGst: "in_gst"; readonly IdNpwp: "id_npwp"; readonly IlVat: "il_vat"; readonly JpCn: "jp_cn"; readonly JpRn: "jp_rn"; readonly JpTrn: "jp_trn"; readonly KzBin: "kz_bin"; readonly KePin: "ke_pin"; readonly KgTin: "kg_tin"; readonly LaTin: "la_tin"; readonly LiUid: "li_uid"; readonly LiVat: "li_vat"; readonly MyFrp: "my_frp"; readonly MyItn: "my_itn"; readonly MySst: "my_sst"; readonly MrNif: "mr_nif"; readonly MxRfc: "mx_rfc"; readonly MdVat: "md_vat"; readonly MePib: "me_pib"; readonly MaVat: "ma_vat"; readonly NpPan: "np_pan"; readonly NzGst: "nz_gst"; readonly NgTin: "ng_tin"; readonly MkVat: "mk_vat"; readonly NoVat: "no_vat"; readonly NoVoec: "no_voec"; readonly OmVat: "om_vat"; readonly PeRuc: "pe_ruc"; readonly PhTin: "ph_tin"; readonly PlNip: "pl_nip"; readonly RoTin: "ro_tin"; readonly RuInn: "ru_inn"; readonly RuKpp: "ru_kpp"; readonly SaVat: "sa_vat"; readonly SnNinea: "sn_ninea"; readonly RsPib: "rs_pib"; readonly SgGst: "sg_gst"; readonly SgUen: "sg_uen"; readonly SiTin: "si_tin"; readonly ZaVat: "za_vat"; readonly KrBrn: "kr_brn"; readonly EsCif: "es_cif"; readonly ChUid: "ch_uid"; readonly ChVat: "ch_vat"; readonly TwVat: "tw_vat"; readonly TjTin: "tj_tin"; readonly TzVat: "tz_vat"; readonly ThVat: "th_vat"; readonly TrTin: "tr_tin"; readonly UgTin: "ug_tin"; readonly UaVat: "ua_vat"; readonly AeTrn: "ae_trn"; readonly UsEin: "us_ein"; readonly UyRuc: "uy_ruc"; readonly UzTin: "uz_tin"; readonly UzVat: "uz_vat"; readonly VeRif: "ve_rif"; readonly VnTin: "vn_tin"; readonly ZmTin: "zm_tin"; readonly ZwTin: "zw_tin"; readonly SrFin: "sr_fin"; readonly XiVat: "xi_vat"; }; type Type = (typeof Type)[keyof typeof Type]; } } }