/** * @example * { * account_id: "biz_xxxxxxxxxxxxxx", * items: [] * } */ export interface CreateInvoicesRequest { /** The issuing account. */ account_id: string; /** Create a billing address linked to this member. */ billing_address?: CreateInvoicesRequest.BillingAddress | null; /** The buyer's adjustable fee in percentage points, with at most two decimal places. */ buyer_fee_percentage?: number; /** The contact name when creating an email-only member. */ customer_name?: string | null; /** When payment is due, as an ISO 8601 timestamp. */ due_at?: string | null; /** Resolve or create the member for this email, creating a Whop user when none exists. Mutually exclusive with member_id. */ email_address?: string | null; /** The variants being invoiced, all in the same currency. Each variant may appear once; use quantity for multiple units. Product and price come from each variant; a recurring variant must belong to a product, bills its renewal price and, once the invoice is paid, renews as a subscription charged to the payment method that paid it. With several items, every item that has a product must be a regular product, and all items need compatible payment, tax, and access settings. */ items: CreateInvoicesRequest.Items.Item[]; /** An address associated with the member. Mutually exclusive with billing_address. */ mailing_address_id?: string | null; /** The billed customer, a member of the account. Changing email recipients does not change this buyer. */ member_id?: string | null; /** Up to 50 caller-owned string key/value pairs. */ metadata?: Record; /** A saved payment method belonging to the member, prefixed `payt_`. Sending or issuing the invoice charges this method at the `charge_at` passed to that call, otherwise on `due_at`, or right away when there is no `due_at` or it has passed. Sending also emails the invoice now when the charge is later; issuing does not. */ payment_method_id?: string | null; /** Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices. */ recipient_emails?: string[]; } export declare namespace CreateInvoicesRequest { /** * Create a billing address linked to this member. */ interface BillingAddress { city: string; /** ISO 3166-1 alpha-2 country code. */ country: string; line1: string; line2?: (string | null) | undefined; name?: (string | null) | undefined; phone?: (string | null) | undefined; postal_code: string; state?: (string | null) | undefined; } type Items = Items.Item[]; namespace Items { type Item = unknown; } }