import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class Transactions extends APIResource { /** * Get all transactions for a creator with product filter */ list(query?: TransactionListParams | null | undefined, options?: RequestOptions): APIPromise; /** * Get transactions for a specific checkout session */ listForSession(checkoutSessionID: string, query?: TransactionListForSessionParams | null | undefined, options?: RequestOptions): APIPromise; /** * Refund a transaction */ refund(transactionID: string | number, body?: TransactionRefundParams | null | undefined, options?: RequestOptions): APIPromise; } export interface TransactionListResponse { data?: TransactionListResponse.Data; message?: string; status?: string; } export declare namespace TransactionListResponse { interface Data { pagination?: Data.Pagination; transactions?: Array; } namespace Data { interface Pagination { current_page?: number; has_more?: boolean; per_page?: number; total_items?: number; total_pages?: number; } interface Transaction { id?: string; fan?: Transaction.Fan; service?: Transaction.Service; servicePayment?: Transaction.ServicePayment; subscriber?: unknown; } namespace Transaction { interface Fan { id?: string; country_code?: string; email?: string; name?: string; phone?: string; } interface Service { id?: string; price?: number; title?: string; } interface ServicePayment { id?: string; fund_release_on?: string; fund_released?: boolean; payment_type?: string; } } } } export interface TransactionListForSessionResponse { data?: TransactionListForSessionResponse.Data; message?: string; status?: string; } export declare namespace TransactionListForSessionResponse { interface Data { pagination?: Data.Pagination; transactions?: Array; } namespace Data { interface Pagination { current_page?: number; has_more?: boolean; per_page?: number; total_items?: number; total_pages?: number; } interface Transaction { id?: string; fan?: Transaction.Fan; service?: Transaction.Service; servicePayment?: Transaction.ServicePayment; subscriber?: unknown; } namespace Transaction { interface Fan { id?: string; country_code?: string; email?: string; name?: string; phone?: string; } interface Service { id?: string; price?: number; title?: string; } interface ServicePayment { id?: string; fund_release_on?: string; fund_released?: boolean; payment_type?: string; } } } } export interface TransactionRefundResponse { data?: TransactionRefundResponse.Data; message?: string; request_id?: string; status?: string; } export declare namespace TransactionRefundResponse { interface Data { creator_amount_deduction?: number; proportional_fee?: number; refund_amount?: number; refund_amount_cents?: number; refund_cost?: number; refund_id?: string; refund_type?: 'full' | 'partial'; transaction_id?: string; } } export interface TransactionListParams { /** * ID of the customer to get transactions for */ customer_id?: number | string; /** * Page number for pagination */ page?: number; /** * Number of items per page */ per_page?: number; /** * ID of the product to get transactions for */ product_id?: number | string; } export interface TransactionListForSessionParams { /** * Page number for pagination */ page?: number; /** * Number of items per page */ per_page?: number; } export interface TransactionRefundParams { /** * Amount in cents to refund */ amount_cents?: number; } export declare namespace Transactions { export { type TransactionListResponse as TransactionListResponse, type TransactionListForSessionResponse as TransactionListForSessionResponse, type TransactionRefundResponse as TransactionRefundResponse, type TransactionListParams as TransactionListParams, type TransactionListForSessionParams as TransactionListForSessionParams, type TransactionRefundParams as TransactionRefundParams, }; } //# sourceMappingURL=transactions.d.ts.map