UNPKG

@wepublish/api

Version:
25 lines (24 loc) 1.66 kB
import { PrismaClient } from '@prisma/client'; import { BasePaymentProvider, CancelRemoteSubscriptionProps, CheckIntentProps, CreatePaymentIntentProps, Intent, IntentState, PaymentProviderProps, UpdatePaymentWithIntentStateProps, UpdateRemoteSubscriptionAmountProps, WebhookForPaymentIntentProps, WebhookResponse } from './payment-provider'; export interface PayrexxSubscripionsPaymentProviderProps extends PaymentProviderProps { instanceName: string; instanceAPISecret: string; webhookSecret: string; prisma: PrismaClient; } export declare class PayrexxSubscriptionPaymentProvider extends BasePaymentProvider { readonly instanceName: string; readonly instanceAPISecret: string; readonly webhookSecret: string; readonly prisma: PrismaClient; readonly remoteManagedSubscription: boolean; constructor(props: PayrexxSubscripionsPaymentProviderProps); updateRemoteSubscriptionAmount(props: UpdateRemoteSubscriptionAmountProps): Promise<void>; cancelRemoteSubscription(props: CancelRemoteSubscriptionProps): Promise<void>; updatePaymentWithIntentState({ intentState, paymentClient, subscriptionClient, userClient, invoiceClient, subscriptionPeriodClient, invoiceItemClient }: UpdatePaymentWithIntentStateProps): Promise<any>; updateAmountUpstream(subscriptionId: number, amount: string): Promise<void>; cancelSubscriptionUpstream(subscriptionId: number): Promise<void>; webhookForPaymentIntent(props: WebhookForPaymentIntentProps): Promise<WebhookResponse>; createIntent(props: CreatePaymentIntentProps): Promise<Intent>; checkIntentStatus({ intentID }: CheckIntentProps): Promise<IntentState>; }