export type CheckoutMethod = {
    rail: string;
    label: string;
    connection_id: number;
    driver: string;
    display_name: string;
    flow: string;
    settlement: string;
    offline: boolean;
    vaultable?: boolean;
    delay_days: number | null;
    provision_policy: string;
    hint?: string | null;
    stripe_type?: string | null;
    stripe_excluded?: string[];
    icon_url?: string | null;
};

export type CheckoutPayload = {
    live?: boolean;
    purpose?: string;
    express?: CheckoutMethod[];
    methods?: CheckoutMethod[];
    stored?: Array<{
        id: number;
        rail: string;
        display_name: string;
        last4: string | null;
        is_default: boolean;
        connection_id: number;
    }>;
    stripe?: {
        connection_id: number;
        publishable_key: string;
        link: boolean;
        apple_pay?: boolean;
        google_pay?: boolean;
        payment_method_configuration?: string | null;
        excluded_payment_method_types?: string[];
    } | null;
    paypal?: {
        connection_id: number;
        client_id: string;
        sandbox: boolean;
    } | null;
    account_email?: string | null;
    account_name?: string | null;
    currency?: string;
    remittance?: {
        reference: string;
        rail?: string;
        instructions: {
            title: string;
            body: string;
            lines: Array<{ label: string; value: string; copy?: boolean }>;
        } | null;
    } | null;
    pending?: {
        status: string;
        rail: string | null;
        client_secret: string | null;
        publishable_key?: string | null;
        redirect_url?: string | null;
    } | null;
};
