UNPKG

quantictech-subscription-components

Version:

Biblioteca de componentes reutilizáveis para sistema de assinatura com Stripe - Arquitetura Service-to-Service

13 lines (12 loc) • 718 B
import { ApiResponse, CheckoutResponse, CreateCheckoutData, CreatePaymentIntentData, CreateSubscriptionData, Payment, PaymentIntentResponse, SubscriptionResponse } from '../types/subscription.types'; interface UsePaymentReturn { payments: Payment[]; loading: boolean; error: string | null; fetchPayments: () => Promise<void>; createSubscription: (data: CreateSubscriptionData) => Promise<ApiResponse<SubscriptionResponse>>; createPaymentIntent: (data: CreatePaymentIntentData) => Promise<ApiResponse<PaymentIntentResponse>>; createCheckout: (data: CreateCheckoutData) => Promise<ApiResponse<CheckoutResponse>>; } declare const usePayment: () => UsePaymentReturn; export default usePayment;