import type * as Whop from "../../../../index.mjs"; /** * @example * { * currencies: ["eur"], * variant_ids: ["plan_xxxxxxxxxxxxx"], * product_ids: ["prod_xxxxxxxxxxxxx"] * } */ export interface ListPaymentsRequest { /** Which sales to list. `account_sales` returns sales for the accounts the caller can read. `user_sales` returns only sales the signed-in user received personally, outside any account; it requires the user's own Whop login session and cannot be combined with `account_id`. */ mode?: Whop.ListPaymentsRequestMode; /** Only payments charged by this account, prefixed `biz_`. */ account_id?: string; /** Only payments in this lifecycle state. */ status?: Whop.ListPaymentsRequestStatus; /** Only payments whose most recently attached kept shipment is in this tracking state. `missing_tracking` selects paid payments with a captured shipping address and no kept shipment, excluding fully refunded payments. `needs_tracking` selects payments with an open pre-shipment funds hold and no kept shipment. Shipment states do not imply a payment or refund state. Requires `shipment:basic:read` as well as `payment:basic:read`; user-wide lists include only accounts readable under both scopes. Only supported with `mode=account_sales`. */ tracking_status?: Whop.ListPaymentsRequestTrackingStatus; /** Only payments charged for this reason. `subscription_cycle` also matches renewals recorded as `subscription_update`. */ billing_reason?: Whop.ListPaymentsRequestBillingReason; /** Only payments presented in this three-letter currency, such as `usd`. */ currency?: string; /** Only payments made by this buyer, prefixed `user_`. This filters sales the caller can read, so `me` is not accepted; list the caller's own purchases with `GET /memberships?user_id=me`. */ user_id?: string; /** Search payments by payment ID, dispute ID, user ID, membership ID, user email, name, or username. Email filtering requires the member:email:read permission. */ query?: string; /** Also cover the account's connected accounts. Requires `account_id`, and is a 400 without it. Without `query`, lists the payments of the account and every connected account, newest first by `created_at` only; another `order` is a 400. The listing is cut off after 10 seconds, which a rare filter on an account with little recent activity can reach; add a `query` to narrow it. With `query`, matches on payment, dispute, user or membership ID, buyer email, or a card's first 6 or 8 digits and last 4 separated by a space or dash (`424242 4242`); free-text queries such as a name search only the named account. Connected accounts' payments are returned only for connected accounts you can read payments on. */ include_connected_accounts?: boolean; /** Only payments made by this member, prefixed `mber_`. */ member_id?: string; /** Only payments billed under this membership, prefixed `mem_`. */ membership_id?: string; /** Only payments for this product, prefixed `prod_`. */ product_id?: string; /** Only payments priced by this variant, prefixed `plan_`. */ variant_id?: string; /** Only payments created before this ISO 8601 timestamp. */ created_before?: string; /** Only payments created after this ISO 8601 timestamp. */ created_after?: string; /** Only payments in any of these lifecycle states, with the same meanings as `status`. Repeat the parameter to pass several. Combined with `status` when both are sent. */ statuses?: Whop.ListPaymentsRequestStatusesItem | Whop.ListPaymentsRequestStatusesItem[]; /** Only payments whose `substatus` is any of these. Repeat the parameter to pass several. `incomplete` also matches payments that report `incomplete` because no finer status was recorded. */ substatuses?: Whop.ListPaymentsRequestSubstatusesItem | Whop.ListPaymentsRequestSubstatusesItem[]; /** Only payments charged for any of these reasons, with the same meanings as `billing_reason`. Repeat the parameter to pass several. Combined with `billing_reason` when both are sent. */ billing_reasons?: Whop.ListPaymentsRequestBillingReasonsItem | Whop.ListPaymentsRequestBillingReasonsItem[]; /** Only payments presented in any of these three-letter currencies. Repeat the parameter to pass several. Combined with `currency` when both are sent. */ currencies?: string | string[]; /** Only payments priced by any of these variants, each prefixed `plan_`. Repeat the parameter to pass several. Combined with `variant_id` when both are sent. */ variant_ids?: string | string[]; /** Only payments for any of these products, each prefixed `prod_`. Repeat the parameter to pass several. Combined with `product_id` when both are sent. */ product_ids?: string | string[]; /** Only payments paid with any of these methods: a card brand such as `amex`, a wallet such as `apple_pay`, or a payment method type such as `paypal`. Repeat the parameter to pass several. */ payment_methods?: Whop.ListPaymentsRequestPaymentMethodsItem | Whop.ListPaymentsRequestPaymentMethodsItem[]; /** Only payments whose shipment is in any of these tracking states, or that still need a tracking number (`needs_tracking`). Repeat the parameter to pass several. Requires `account_id` and the shipment:basic:read permission. */ tracking_states?: Whop.ListPaymentsRequestTrackingStatesItem | Whop.ListPaymentsRequestTrackingStatesItem[]; /** Only payments refunded after this ISO 8601 timestamp. */ refunded_after?: string; /** Only payments refunded before this ISO 8601 timestamp. */ refunded_before?: string; /** Only payments with a dispute alert after this ISO 8601 timestamp. */ dispute_alerted_after?: string; /** Only payments with a dispute alert before this ISO 8601 timestamp. */ dispute_alerted_before?: string; /** Only payments with a dispute opened after this ISO 8601 timestamp. */ dispute_created_after?: string; /** Only payments with a dispute opened before this ISO 8601 timestamp. */ dispute_created_before?: string; /** The field to sort by. `amount` sorts by the amount charged, in the currency it was charged in. */ order?: Whop.ListPaymentsRequestOrder; /** The sort direction. */ direction?: Whop.ListPaymentsRequestDirection; /** Number of results to return from the start of the range. */ first?: number; /** Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. */ after?: string; /** Number of results to return from the end of the range. */ last?: number; /** Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. */ before?: string; }