Files
PowderCoatingLogix/src/PowderCoating.Application/Interfaces/IStripeConnectService.cs
T
spouliot 7fa385aeb8 Inline item editing on details pages; fix Stripe receipt_email
Allow description, quantity, and price to be edited inline on Quote,
Job, and Invoice details pages without re-opening the wizard. Coating
and prep service rows remain read-only by design. Invoice editing is
gated to Draft/Sent/Overdue statuses; totals update live in the DOM.

Remove receipt_email from Stripe PaymentIntent creation so customers
can use any email they choose at checkout — Stripe validates format
and sends the receipt to whatever the customer enters in the Payment
Element, eliminating the risk of a stored email mismatch blocking a
payment from processing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 11:49:04 -04:00

38 lines
1.7 KiB
C#

namespace PowderCoating.Application.Interfaces;
public interface IStripeConnectService
{
/// <summary>Returns the Stripe OAuth URL to begin the Standard Connect onboarding flow.</summary>
string GetOAuthUrl(int companyId, string redirectUri);
/// <summary>Exchanges the OAuth authorization code for a StripeAccountId and saves it to the company.</summary>
Task<(bool Success, string? ErrorMessage)> HandleOAuthCallbackAsync(string code, int companyId);
/// <summary>Deauthorizes the connected account and clears the company's Stripe Connect fields.</summary>
Task<(bool Success, string? ErrorMessage)> DisconnectAsync(int companyId);
/// <summary>
/// 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.
/// </summary>
Task<(bool Success, string? ClientSecret, string? PaymentIntentId, string? ErrorMessage)> CreatePaymentIntentAsync(
string connectedAccountId,
decimal invoiceTotal,
decimal surchargeAmount,
string currency,
string invoiceNumber,
int invoiceId);
/// <summary>
/// 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.
/// </summary>
Task<(bool Success, string? ClientSecret, string? PaymentIntentId, string? ErrorMessage)> CreateDepositPaymentIntentAsync(
string connectedAccountId,
decimal depositAmount,
decimal surchargeAmount,
string currency,
string quoteNumber,
int quoteId);
}