BCards/src/BCards.Web/Services/IPaymentService.cs
2025-07-14 23:21:25 -03:00

20 lines
942 B
C#

using BCards.Web.Models;
using Stripe;
namespace BCards.Web.Services;
public interface IPaymentService
{
Task<string> CreateCheckoutSessionAsync(string userId, string planType, string returnUrl, string cancelUrl);
Task<Customer> CreateOrGetCustomerAsync(string userId, string email, string name);
Task<Stripe.Subscription> HandleWebhookAsync(string requestBody, string signature);
Task<List<Price>> GetPricesAsync();
Task<bool> CancelSubscriptionAsync(string subscriptionId);
Task<Stripe.Subscription> UpdateSubscriptionAsync(string subscriptionId, string newPriceId);
Task<PlanLimitations> GetPlanLimitationsAsync(string planType);
// Novos métodos para gerenciamento de assinatura
Task<Stripe.Subscription?> GetSubscriptionDetailsAsync(string userId);
Task<List<Invoice>> GetPaymentHistoryAsync(string userId);
Task<string> CreatePortalSessionAsync(string customerId, string returnUrl);
}