namespace PowderCoating.Application.Interfaces; public interface IStripeConnectService { /// Returns the Stripe OAuth URL to begin the Standard Connect onboarding flow. string GetOAuthUrl(int companyId, string redirectUri); /// Exchanges the OAuth authorization code for a StripeAccountId and saves it to the company. Task<(bool Success, string? ErrorMessage)> HandleOAuthCallbackAsync(string code, int companyId); /// Deauthorizes the connected account and clears the company's Stripe Connect fields. Task<(bool Success, string? ErrorMessage)> DisconnectAsync(int companyId); /// /// Creates a Stripe PaymentIntent on the connected account for the given amount (in dollars). /// Returns the client secret needed by Stripe.js on the payment page. /// Task<(bool Success, string? ClientSecret, string? PaymentIntentId, string? ErrorMessage)> CreatePaymentIntentAsync( string connectedAccountId, decimal invoiceTotal, decimal surchargeAmount, string currency, string customerEmail, string invoiceNumber, int invoiceId); /// /// Creates a Stripe PaymentIntent on the connected account for a quote deposit. /// Metadata includes type=deposit so the webhook can distinguish it from invoice payments. /// Task<(bool Success, string? ClientSecret, string? PaymentIntentId, string? ErrorMessage)> CreateDepositPaymentIntentAsync( string connectedAccountId, decimal depositAmount, decimal surchargeAmount, string currency, string customerEmail, string quoteNumber, int quoteId); }