@payunit/nodejs-sdk
Version:
PayUnit Payment Processor SDK
84 lines • 2.21 kB
TypeScript
import { PaymentCountry, RegisteredProviders } from '.';
export interface InitiatePaymentRequest {
total_amount: number;
currency: string;
transaction_id: string;
return_url?: string;
notify_url?: string;
payment_country?: string | PaymentCountry;
pay_with?: string | RegisteredProviders;
redirect_on_failed?: string | 'YES' | 'NO';
custom_fields?: Record<string, any>;
}
export interface MakePaymentMobileMoneyRequest {
amount: number;
gateway: string | RegisteredProviders;
currency: string;
transaction_id: string;
phone_number: string;
return_url?: string;
notify_url?: string;
}
export interface MakePaymentCardRequest {
amount: number;
gateway: string | RegisteredProviders;
currency: string;
transaction_id: string;
card_number: string;
expiry_month: string;
expiry_year: string;
cvv: string;
cardholder_name: string;
return_url: string;
notify_url: string;
}
export interface InitiatePaymentResponse {
t_id: string;
t_sum: string;
t_url: string;
transaction_id: string;
transaction_url: string;
providers: {
id: number;
created_at: string;
updated_at: string;
deleted_at: string;
shortcode: string;
name: string;
logo: string;
balance: string;
status: string;
country: {
id: number;
created_at: string;
updated_at: string;
deleted_at: string;
country_name: string;
country_code: string;
};
}[];
}
export interface MakePaymentResponse {
transaction_id: string;
provider_transaction_id: string;
payment_status: string;
meta: {
authorization: {
redirect: string;
mode: string;
};
};
}
export interface TransactionPaymentStatusResponse {
transaction_amount: number;
transaction_status: string;
transaction_id: string;
purchaseRef: string;
notify_url: string;
callback_url: string;
transaction_currency: string;
transaction_gateway: string;
fee: string;
message: string;
}
//# sourceMappingURL=collect.d.ts.map