payrex-js-sdk
Version:
A PayRex SDK written for NodeJS
37 lines (34 loc) • 1.09 kB
text/typescript
import { AvailablePaymentMethods, PayrexPaymentMethodOptions } from '../types.cjs';
type PayrexNextAction = {
type: string;
redirect_url: string;
};
type CreatePaymentIntentPayload = {
amount: number;
payment_methods: AvailablePaymentMethods;
currency: string;
description?: string;
payment_method_options?: PayrexPaymentMethodOptions;
statement_descriptor?: string;
metadata?: Record<string, string>;
};
type PaymentIntentResource = {
id: string;
resource: string;
amount: number;
amount_received: number;
amount_capturable: number;
client_secret: string;
currency: string;
description: string;
livemode: boolean;
metadata: Record<string, string> | null;
next_action: PayrexNextAction | null;
payment_method_options: PayrexPaymentMethodOptions;
payment_methods: AvailablePaymentMethods | string[];
statement_descriptor: string | null;
status: string;
created_at: number;
updated_at: number;
};
export type { CreatePaymentIntentPayload, PaymentIntentResource, PayrexNextAction };