-
Notifications
You must be signed in to change notification settings - Fork 12
/
FlutterwaveInit.d.ts
61 lines (61 loc) · 1.88 KB
/
FlutterwaveInit.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/// <reference types="react-native" />
export declare type Currency = 'AUD' | 'BIF' | 'CDF' | 'CAD' | 'CVE' | 'EUR' | 'GBP' | 'GHS' | 'GMD' | 'GNF' | 'KES' | 'LRD' | 'MWK' | 'MZN' | 'NGN' | 'RWF' | 'SLL' | 'STD' | 'TZS' | 'UGX' | 'USD' | 'XAF' | 'XOF' | 'ZAR' | 'ZMK' | 'ZMW' | 'ZWD';
export interface FlutterwaveInitSubAccount {
id: string;
transaction_split_ratio?: number;
transaction_charge_type?: string;
transaction_charge?: number;
}
export interface FlutterwaveInitOptionsBase {
amount: number;
currency?: Currency;
integrity_hash?: string;
payment_options?: string;
payment_plan?: number;
redirect_url: string;
subaccounts?: Array<FlutterwaveInitSubAccount>;
}
interface FlutterwavePaymentMeta {
[k: string]: any;
}
export interface FlutterwaveInitCustomer {
email: string;
phonenumber?: string;
name?: string;
}
export interface FlutterwaveInitCustomizations {
title?: string;
logo?: string;
description?: string;
}
export declare type FlutterwaveInitOptions = FlutterwaveInitOptionsBase & {
authorization: string;
tx_ref: string;
customer: FlutterwaveInitCustomer;
meta?: FlutterwavePaymentMeta | null;
customizations?: FlutterwaveInitCustomizations;
};
export interface FieldError {
field: string;
message: string;
}
export interface ResponseData {
status?: 'success' | 'error';
message: string;
error_id?: string;
errors?: Array<FieldError>;
code?: string;
data?: {
link: string;
};
}
/**
* This function is responsible for making the request to
* initialize a Flutterwave payment.
* @param options FlutterwaveInitOptions
* @param abortController AbortController
* @return Promise<string>
*/
export default function FlutterwaveInit(options: FlutterwaveInitOptions, abortController?: AbortController): Promise<string>;
export {};
//# sourceMappingURL=FlutterwaveInit.d.ts.map