20 lines
942 B
C#
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);
|
|
} |