@monei-js/components
Version:
MONEI UI Components enable you to collect sensitive payment information using customizable UI components.
194 lines (193 loc) • 4.63 kB
TypeScript
export declare enum NextActionType {
CONFIRM = "CONFIRM",
FRICTIONLESS_CHALLENGE = "FRICTIONLESS_CHALLENGE",
BIZUM_CHALLENGE = "BIZUM_CHALLENGE",
CHALLENGE = "CHALLENGE",
COMPLETE = "COMPLETE"
}
export declare enum CardBrand {
Visa = "visa",
Mastercard = "mastercard",
Amex = "amex",
Discover = "discover",
Diners = "diners",
JCB = "jcb",
Maestro = "maestro",
UnionPay = "unionpay",
Elo = "elo",
Hipercard = "hipercard"
}
export declare enum TransactionType {
AUTH = "AUTH",
SALE = "SALE",
PAYOUT = "PAYOUT",
VERIF = "VERIF"
}
export interface PaymentResult {
id: string;
status: string;
orderId?: string;
amount?: number;
currency?: string;
accountId?: string;
statusCode?: string;
statusMessage?: string;
nextAction?: {
type: NextActionType;
mustRedirect: boolean;
redirectUrl: string;
};
}
export interface Customer {
email?: string;
name?: string;
phone?: string;
}
export interface Address {
country?: string;
city?: string;
line1?: string;
line2?: string;
zip?: string;
state?: string;
}
export interface BillingDetails {
name?: string;
email?: string;
phone?: string;
company?: string;
address?: Address;
}
export interface PaymentMethod {
card?: {
cardholderName?: string;
cardholderEmail?: string;
};
}
export declare type GetPaymentMethodsRequest = {
accountId?: string;
paymentId?: string;
t?: number;
};
export declare type GetPaymentMethodsResponse = {
paymentMethods: string[];
livemode: boolean;
accountId: string;
amount?: number;
currency?: string;
merchantName?: string;
merchantUrl?: string;
countryCode?: string;
metadata: {
card: {
brands: CardBrand[];
};
paypal?: {
clientId: string;
merchantId: string;
};
googlePay?: {
merchantId: string;
cvcRequired?: boolean;
};
applePay?: {
merchantId: string;
};
clickToPay?: {
tokenSupport: boolean;
preselected: boolean;
visa: {
srciDpaId: string;
srcInitiatorId: string;
};
mastercard: {
srciDpaId: string;
srcInitiatorId: string;
};
discover: {
srciDpaId: string;
srcInitiatorId: string;
};
};
};
};
export declare type CreateTokenRequest = {
accountId?: string;
paymentId?: string;
sessionId?: string;
amount?: number;
currency?: string;
paymentMethod: {
card?: {
number: string;
expMonth: string;
expYear: string;
cvc: string;
};
paypal?: {};
cofidis?: {};
googlePay?: {
token: string;
};
applePay?: {
token: string;
};
bizum?: {
phoneNumber: string;
remember?: boolean;
};
clickToPay?: {
token: string;
cardBrand: string;
};
};
};
export declare type CreateTokenResponse = {
paymentToken?: string;
error?: string;
paypal?: {
orderId: string;
};
};
export declare type CreatePaymentRequest = {
accountId: string;
pointOfSaleId: string;
amount: number;
currency: string;
signature: string;
};
export declare type SendPaymentReceiptRequest = {
paymentId: string;
signature: string;
customerEmail?: string;
language?: string;
};
export declare type CreateApplePaySessionRequest = {
accountId: string;
validationUrl: string;
domainName: string;
displayName: string;
};
export declare type CalculateFinancingRequest = {
amount: number;
accountId: string;
paymentMethod?: string;
};
export declare type CalculateFinancingResponse = Array<{
financingAmount: number;
tin: number;
interestAmount: number;
tae: number;
quote: number;
installments: number;
totalAmount: number;
legalPhrase: string;
capEuros: number;
capPercent: number;
}>;
export declare type ValidateBizumPhoneRequest = {
accountId?: string;
paymentId?: string;
amount?: number;
phoneNumber: string;
};