@vantagepay/vantagepay 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +515 -0
- package/dist/apiConfig.d.ts +10 -0
- package/dist/apiError.d.ts +5 -0
- package/dist/apiTokens.d.ts +7 -0
- package/dist/authentication/index.d.ts +22 -0
- package/dist/authentication/types.d.ts +67 -0
- package/dist/baseApi.d.ts +9 -0
- package/dist/common/types.d.ts +99 -0
- package/dist/consumers/index.d.ts +11 -0
- package/dist/consumers/types.d.ts +358 -0
- package/dist/content/index.d.ts +7 -0
- package/dist/devices/types.d.ts +20 -0
- package/dist/eventTypes.d.ts +10 -0
- package/dist/gmoney/index.d.ts +48 -0
- package/dist/gmoney/types.d.ts +136 -0
- package/dist/hubtel/index.d.ts +21 -0
- package/dist/hubtel/types.d.ts +35 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.m.js +2 -0
- package/dist/index.m.js.map +1 -0
- package/dist/index.modern.mjs +2 -0
- package/dist/index.modern.mjs.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/log/index.d.ts +19 -0
- package/dist/log/messageTemplate.d.ts +10 -0
- package/dist/log/types.d.ts +20 -0
- package/dist/lookups/index.d.ts +28 -0
- package/dist/lookups/types.d.ts +1840 -0
- package/dist/merchants/index.d.ts +36 -0
- package/dist/merchants/types.d.ts +479 -0
- package/dist/payments/index.d.ts +38 -0
- package/dist/payments/types.d.ts +2015 -0
- package/dist/qr/index.d.ts +6 -0
- package/dist/reports/index.d.ts +8 -0
- package/dist/reports/types.d.ts +67 -0
- package/dist/system/index.d.ts +4 -0
- package/dist/tokens/types.d.ts +38 -0
- package/dist/transflow/index.d.ts +11 -0
- package/dist/transflow/types.d.ts +11 -0
- package/package.json +47 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { OtpVerificationResponse, TokenResponse } from '../authentication/types';
|
|
2
|
+
import { BaseApi } from '../baseApi';
|
|
3
|
+
import { Device } from '../devices/types';
|
|
4
|
+
import { Currency } from '../lookups/types';
|
|
5
|
+
import { BasicMerchant, Merchant, MerchantFile, MerchantProduct, TerminalConfiguration, TerminalPaymentQrCodeUrls, TerminalPaymentQrCodes, TerminalSetup } from './types';
|
|
6
|
+
export declare class Merchants extends BaseApi {
|
|
7
|
+
private readonly productDetailCache;
|
|
8
|
+
private productsCache;
|
|
9
|
+
private createMerchantProductProxy;
|
|
10
|
+
private getAllProducts;
|
|
11
|
+
getActiveProductTypes(): Promise<string[]>;
|
|
12
|
+
getMerchantNamesFromProductType(productType: string): Promise<string[]>;
|
|
13
|
+
getProductTypesForMerchant(merchantName: string): Promise<string[]>;
|
|
14
|
+
getProductsForMerchantAndProductType(productType: string, merchantName: string): Promise<any[]>;
|
|
15
|
+
getProductDetails(productReference: string): Promise<MerchantProduct>;
|
|
16
|
+
getProducts(): Promise<MerchantProduct[]>;
|
|
17
|
+
createProduct(product: MerchantProduct): Promise<MerchantProduct>;
|
|
18
|
+
updateProduct(product: MerchantProduct): Promise<MerchantProduct>;
|
|
19
|
+
deleteProduct(productReference: string): Promise<void>;
|
|
20
|
+
getMerchant(): Promise<Merchant>;
|
|
21
|
+
createMerchant(request: Merchant): Promise<Merchant>;
|
|
22
|
+
updateMerchant(request: Merchant): Promise<Merchant>;
|
|
23
|
+
getMerchantAgreement(): Promise<string>;
|
|
24
|
+
acceptMerchantAgreement(): Promise<void>;
|
|
25
|
+
verifyMobileNumber(msisdn?: string): Promise<void>;
|
|
26
|
+
validateOtp(otpValue: string, msisdn?: string): Promise<OtpVerificationResponse>;
|
|
27
|
+
validateMerchantName(name: string): Promise<boolean>;
|
|
28
|
+
createUser(username: string, password: string, mobileNumber?: string, emailAddress?: string): Promise<TokenResponse>;
|
|
29
|
+
switchToMerchant(merchantReference: string): Promise<TokenResponse>;
|
|
30
|
+
getUserMerchants(): Promise<BasicMerchant[]>;
|
|
31
|
+
setupPosTerminal(terminalReference: string, merchantSource?: string, deviceInformation?: Device): Promise<TerminalSetup>;
|
|
32
|
+
getPosTerminalConfiguration(terminalReference: string, merchantSource?: string): Promise<TerminalConfiguration>;
|
|
33
|
+
getTerminalPaymentQrCodes(amountInCents: number, currency: Currency): Promise<TerminalPaymentQrCodes>;
|
|
34
|
+
getTerminalPaymentQrCodeUrls(amountInCents: number, currency: Currency): Promise<TerminalPaymentQrCodeUrls>;
|
|
35
|
+
uploadFile(request: MerchantFile): Promise<void>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
import { MerchantCategory } from '../lookups/types';
|
|
2
|
+
import { Country } from '../lookups/types';
|
|
3
|
+
import { Currency } from '../lookups/types';
|
|
4
|
+
import { LoginCredentials } from '../authentication/types';
|
|
5
|
+
import { Gender } from '../lookups/types';
|
|
6
|
+
import { Address } from '../common/types';
|
|
7
|
+
import { IdentityDocument } from '../common/types';
|
|
8
|
+
import { KybProvider } from '../lookups/types';
|
|
9
|
+
import { KybStatus } from '../lookups/types';
|
|
10
|
+
import { Language } from '../lookups/types';
|
|
11
|
+
import { Device } from '../devices/types';
|
|
12
|
+
import { Bank } from '../lookups/types';
|
|
13
|
+
import { MerchantFileType } from '../lookups/types';
|
|
14
|
+
import { MobileWalletOperator } from '../lookups/types';
|
|
15
|
+
import { ProductType } from '../lookups/types';
|
|
16
|
+
import { DayOfWeek } from '../lookups/types';
|
|
17
|
+
import { DevicePlatform } from '../devices/types';
|
|
18
|
+
import { QrCodeType } from '../lookups/types';
|
|
19
|
+
export declare class AdditionalTerminalReference {
|
|
20
|
+
terminalType: TerminalType;
|
|
21
|
+
reference: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class BasicEmployee {
|
|
24
|
+
reference?: string;
|
|
25
|
+
yourReference?: string;
|
|
26
|
+
title?: string;
|
|
27
|
+
firstName: string;
|
|
28
|
+
lastName: string;
|
|
29
|
+
employeeNumber: number;
|
|
30
|
+
passcode?: string;
|
|
31
|
+
isActive: boolean;
|
|
32
|
+
posPermissions: PosPermissions;
|
|
33
|
+
}
|
|
34
|
+
export declare class BasicMerchant {
|
|
35
|
+
reference?: string;
|
|
36
|
+
userReference?: string;
|
|
37
|
+
yourReference?: string;
|
|
38
|
+
source: string;
|
|
39
|
+
name: string;
|
|
40
|
+
categoryCode: MerchantCategory;
|
|
41
|
+
category: string;
|
|
42
|
+
emailAddress?: string;
|
|
43
|
+
mobileNumber?: string;
|
|
44
|
+
countryIsoCode: Country;
|
|
45
|
+
currency: Currency;
|
|
46
|
+
kybStatusSummary: KybStatusSummary;
|
|
47
|
+
shortCode?: number;
|
|
48
|
+
isActive: boolean;
|
|
49
|
+
}
|
|
50
|
+
export declare class Business {
|
|
51
|
+
reference?: string;
|
|
52
|
+
parentBusinessReference?: string;
|
|
53
|
+
createdDate: Date;
|
|
54
|
+
yourReference?: string;
|
|
55
|
+
source: string;
|
|
56
|
+
name: string;
|
|
57
|
+
emailAddress?: string;
|
|
58
|
+
mobileNumber?: string;
|
|
59
|
+
phoneNumber?: string;
|
|
60
|
+
isEmailVerified: boolean;
|
|
61
|
+
isMobileNumberVerified: boolean;
|
|
62
|
+
isActive: boolean;
|
|
63
|
+
}
|
|
64
|
+
export declare class Employee {
|
|
65
|
+
createdDate: Date;
|
|
66
|
+
loginCredentials?: LoginCredentials;
|
|
67
|
+
userReference?: string;
|
|
68
|
+
isOwner: boolean;
|
|
69
|
+
dateOfBirth?: Date;
|
|
70
|
+
gender?: Gender;
|
|
71
|
+
countryIsoCode?: Country;
|
|
72
|
+
emailAddress?: string;
|
|
73
|
+
mobileNumber?: string;
|
|
74
|
+
profileImage?: string;
|
|
75
|
+
notificationEmailAddress?: string;
|
|
76
|
+
notificationMobileNumber?: string;
|
|
77
|
+
notificationSettings: EmployeeNotificationEventSetting[];
|
|
78
|
+
addresses: Address[];
|
|
79
|
+
identityDocuments: IdentityDocument[];
|
|
80
|
+
reference?: string;
|
|
81
|
+
yourReference?: string;
|
|
82
|
+
title?: string;
|
|
83
|
+
firstName: string;
|
|
84
|
+
lastName: string;
|
|
85
|
+
employeeNumber: number;
|
|
86
|
+
passcode?: string;
|
|
87
|
+
isActive: boolean;
|
|
88
|
+
posPermissions: PosPermissions;
|
|
89
|
+
}
|
|
90
|
+
export declare enum EmployeeNotificationEvent {
|
|
91
|
+
PaymentSuccessful = 1,
|
|
92
|
+
PaymentFailed = 2
|
|
93
|
+
}
|
|
94
|
+
export declare class EmployeeNotificationEventSetting {
|
|
95
|
+
event: EmployeeNotificationEvent;
|
|
96
|
+
description: string;
|
|
97
|
+
sendEmail: boolean;
|
|
98
|
+
sendSms: boolean;
|
|
99
|
+
terminalReferences: string[];
|
|
100
|
+
}
|
|
101
|
+
export declare enum FuelPurchaseMethod {
|
|
102
|
+
ByAmount = "ByAmount",
|
|
103
|
+
ByQuantity = "ByQuantity",
|
|
104
|
+
ByAmountAndQuantity = "ByAmountAndQuantity"
|
|
105
|
+
}
|
|
106
|
+
export declare class HostedPaymentOptions {
|
|
107
|
+
cardNotPresentMID?: number;
|
|
108
|
+
isVisaEnabled: boolean;
|
|
109
|
+
isMastercardEnabled: boolean;
|
|
110
|
+
isAmericanExpressEnabled: boolean;
|
|
111
|
+
isDinersEnabled: boolean;
|
|
112
|
+
settlementTime: SettlementTime;
|
|
113
|
+
}
|
|
114
|
+
export declare enum Industry {
|
|
115
|
+
None = "None",
|
|
116
|
+
Retail = "Retail",
|
|
117
|
+
Restaurant = "Restaurant",
|
|
118
|
+
Forecourt = "Forecourt",
|
|
119
|
+
Workshop = "Workshop"
|
|
120
|
+
}
|
|
121
|
+
export declare class KybFileResult {
|
|
122
|
+
provider: KybProvider;
|
|
123
|
+
status: KybStatus;
|
|
124
|
+
createdDate: Date;
|
|
125
|
+
lastUpdatedDate?: Date;
|
|
126
|
+
}
|
|
127
|
+
export declare enum KybStatusSummary {
|
|
128
|
+
Unverified = "Unverified",
|
|
129
|
+
Verified = "Verified",
|
|
130
|
+
PartiallyVerified = "PartiallyVerified",
|
|
131
|
+
Rejected = "Rejected"
|
|
132
|
+
}
|
|
133
|
+
export declare class Merchant {
|
|
134
|
+
createdDate: Date;
|
|
135
|
+
loginCredentials?: LoginCredentials;
|
|
136
|
+
tradingName?: string;
|
|
137
|
+
franchiseName?: string;
|
|
138
|
+
capturedBy?: string;
|
|
139
|
+
capturedFrom?: string;
|
|
140
|
+
industry: Industry;
|
|
141
|
+
phoneNumber?: string;
|
|
142
|
+
notificationEmailAddress?: string;
|
|
143
|
+
notificationMobileNumber?: string;
|
|
144
|
+
city?: string;
|
|
145
|
+
state?: string;
|
|
146
|
+
languageIsoCode: Language;
|
|
147
|
+
webSiteUrl?: string;
|
|
148
|
+
isRegistrationComplete: boolean;
|
|
149
|
+
isEmailVerified: boolean;
|
|
150
|
+
isMobileNumberVerified: boolean;
|
|
151
|
+
vCard?: string;
|
|
152
|
+
logoImage?: string;
|
|
153
|
+
taxNumber?: string;
|
|
154
|
+
companyRegistrationNumber?: string;
|
|
155
|
+
companyRegistrationDate?: Date;
|
|
156
|
+
adminPasscode?: string;
|
|
157
|
+
logoUrl?: string;
|
|
158
|
+
hostedPaymentUrl?: string;
|
|
159
|
+
hostedPaymentOptions?: HostedPaymentOptions;
|
|
160
|
+
posOptions?: PosOptions;
|
|
161
|
+
business?: Business;
|
|
162
|
+
addresses: Address[];
|
|
163
|
+
employees: Employee[];
|
|
164
|
+
terminals: Terminal[];
|
|
165
|
+
files: MerchantFile[];
|
|
166
|
+
notificationSettings: MerchantNotificationEventSetting[];
|
|
167
|
+
attributes: MerchantAttributeValue[];
|
|
168
|
+
bankAccounts: MerchantBankAccount[];
|
|
169
|
+
mobileWallets: MerchantMobileWallet[];
|
|
170
|
+
operatingTimes: OperatingTime[];
|
|
171
|
+
devices: Device[];
|
|
172
|
+
qrCodes: MerchantQrCode[];
|
|
173
|
+
reference?: string;
|
|
174
|
+
userReference?: string;
|
|
175
|
+
yourReference?: string;
|
|
176
|
+
source: string;
|
|
177
|
+
name: string;
|
|
178
|
+
categoryCode: MerchantCategory;
|
|
179
|
+
category: string;
|
|
180
|
+
emailAddress?: string;
|
|
181
|
+
mobileNumber?: string;
|
|
182
|
+
countryIsoCode: Country;
|
|
183
|
+
currency: Currency;
|
|
184
|
+
kybStatusSummary: KybStatusSummary;
|
|
185
|
+
shortCode?: number;
|
|
186
|
+
isActive: boolean;
|
|
187
|
+
}
|
|
188
|
+
export declare enum MerchantAttribute {
|
|
189
|
+
GhIPSSMerchantId = 2,
|
|
190
|
+
VisaPAN = 3,
|
|
191
|
+
MasterCardPAN = 4,
|
|
192
|
+
NIBSSMerchantReference = 6
|
|
193
|
+
}
|
|
194
|
+
/** Model to hold various attributes about a merchant. */
|
|
195
|
+
export declare class MerchantAttributeValue {
|
|
196
|
+
name: string;
|
|
197
|
+
attribute: MerchantAttribute;
|
|
198
|
+
value: string;
|
|
199
|
+
}
|
|
200
|
+
export declare class MerchantBankAccount {
|
|
201
|
+
reference?: string;
|
|
202
|
+
createdDateUtc: Date;
|
|
203
|
+
accountNumber: string;
|
|
204
|
+
bank: Bank;
|
|
205
|
+
currency: Currency;
|
|
206
|
+
accountName?: string;
|
|
207
|
+
branchName?: string;
|
|
208
|
+
/** The branch code associated with the bank which holds the bank account. */
|
|
209
|
+
routingCode?: string;
|
|
210
|
+
/**
|
|
211
|
+
* Can be set to True when creating a brand new Merchant to indicate that default settlement rules should be created for the bank account or when editing a Merchant if HasSettlementRules = FALSE.
|
|
212
|
+
* Attempting to set this property to FALSE if HasSettlementRules = TRUE has no effect because currently the only way to delete or disable settlement rules is via direct database access.
|
|
213
|
+
*/
|
|
214
|
+
isSettlement: boolean;
|
|
215
|
+
/** This property will be set to TRUE if default settlement rules have been created for this bank account in the database. */
|
|
216
|
+
hasSettlementRules: boolean;
|
|
217
|
+
isActive: boolean;
|
|
218
|
+
}
|
|
219
|
+
export declare class MerchantFile {
|
|
220
|
+
fileType: MerchantFileType;
|
|
221
|
+
kybResults: KybFileResult[];
|
|
222
|
+
reference?: string;
|
|
223
|
+
yourReference?: string;
|
|
224
|
+
fileName: string;
|
|
225
|
+
mimeType: string;
|
|
226
|
+
base64Data?: string;
|
|
227
|
+
createdDate: Date;
|
|
228
|
+
lastUpdatedDate?: Date;
|
|
229
|
+
}
|
|
230
|
+
export declare class MerchantLoginCredentials {
|
|
231
|
+
emailAddress?: string;
|
|
232
|
+
mobileNumber?: string;
|
|
233
|
+
/** Gets or sets the username (required). */
|
|
234
|
+
username: string;
|
|
235
|
+
/** Gets or sets the password (required). */
|
|
236
|
+
password: string;
|
|
237
|
+
}
|
|
238
|
+
export declare class MerchantMobileWallet {
|
|
239
|
+
reference?: string;
|
|
240
|
+
msisdn: string;
|
|
241
|
+
mobileWalletOperator: MobileWalletOperator;
|
|
242
|
+
currency: Currency;
|
|
243
|
+
accountName?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Can be set to True when creating a brand new Merchant to indicate that default settlement rules should be created for the mobile wallet or when editing a Merchant if HasSettlementRules = FALSE.
|
|
246
|
+
* Attempting to set this property to FALSE if HasSettlementRules = TRUE has no effect because currently the only way to delete or disable settlement rules is via direct database access.
|
|
247
|
+
*/
|
|
248
|
+
isSettlement: boolean;
|
|
249
|
+
/** This property will be set to TRUE if default settlement rules have been created for this mobile wallet in the database. */
|
|
250
|
+
hasSettlementRules: boolean;
|
|
251
|
+
isActive: boolean;
|
|
252
|
+
}
|
|
253
|
+
export declare class MerchantNameVerificationRequest {
|
|
254
|
+
merchantName: string;
|
|
255
|
+
}
|
|
256
|
+
export declare class MerchantNameVerificationResponse {
|
|
257
|
+
accessToken?: string;
|
|
258
|
+
}
|
|
259
|
+
export declare enum MerchantNotificationEvent {
|
|
260
|
+
PaymentSuccessful = 1,
|
|
261
|
+
PaymentFailed = 2,
|
|
262
|
+
SettlementConfirmation = 3
|
|
263
|
+
}
|
|
264
|
+
export declare class MerchantNotificationEventSetting {
|
|
265
|
+
event: MerchantNotificationEvent;
|
|
266
|
+
description: string;
|
|
267
|
+
sendEmail: boolean;
|
|
268
|
+
sendSms: boolean;
|
|
269
|
+
terminalReferences: string[];
|
|
270
|
+
}
|
|
271
|
+
export declare class MerchantProduct {
|
|
272
|
+
reference?: string;
|
|
273
|
+
createdDate: Date;
|
|
274
|
+
lastUpdatedDate?: Date;
|
|
275
|
+
yourReference?: string;
|
|
276
|
+
name: string;
|
|
277
|
+
description?: string;
|
|
278
|
+
unitLabel?: string;
|
|
279
|
+
productType: ProductType;
|
|
280
|
+
currency: Currency;
|
|
281
|
+
amountInCents: number;
|
|
282
|
+
maximumAmountInCents: number;
|
|
283
|
+
futureAmountInCents: number;
|
|
284
|
+
futureAmountEffectiveFromDate?: Date;
|
|
285
|
+
fullAmountRequired: boolean;
|
|
286
|
+
quantityRequired: boolean;
|
|
287
|
+
isActive: boolean;
|
|
288
|
+
fields: MerchantProductField[];
|
|
289
|
+
}
|
|
290
|
+
export declare class MerchantProductCatalog {
|
|
291
|
+
reference?: string;
|
|
292
|
+
industry: Industry;
|
|
293
|
+
name: string;
|
|
294
|
+
description?: string;
|
|
295
|
+
isActive: boolean;
|
|
296
|
+
products: MerchantProduct[];
|
|
297
|
+
}
|
|
298
|
+
export declare class MerchantProductField {
|
|
299
|
+
key: string;
|
|
300
|
+
name: string;
|
|
301
|
+
isRequired: boolean;
|
|
302
|
+
isAccountKey: boolean;
|
|
303
|
+
selectionItems: MerchantProductFieldSelectionItem[];
|
|
304
|
+
}
|
|
305
|
+
export declare class MerchantProductFieldSelectionItem {
|
|
306
|
+
label: string;
|
|
307
|
+
value: string;
|
|
308
|
+
}
|
|
309
|
+
export declare class MerchantQrCode {
|
|
310
|
+
reference?: string;
|
|
311
|
+
createdDate: Date;
|
|
312
|
+
lastUpdatedDate?: Date;
|
|
313
|
+
name: string;
|
|
314
|
+
shortUrl: string;
|
|
315
|
+
fullUrl: string;
|
|
316
|
+
label?: string;
|
|
317
|
+
notes?: string;
|
|
318
|
+
options: MerchantQrCodeOptions;
|
|
319
|
+
isActive: boolean;
|
|
320
|
+
}
|
|
321
|
+
export declare class MerchantQrCodeOptions {
|
|
322
|
+
amountInCents: number;
|
|
323
|
+
isAmountEditable: boolean;
|
|
324
|
+
tipAmountInCents: number;
|
|
325
|
+
tipEmployeeReference?: string;
|
|
326
|
+
splitReference?: string;
|
|
327
|
+
isQrCode: boolean;
|
|
328
|
+
currency?: Currency;
|
|
329
|
+
currencySymbol: string;
|
|
330
|
+
feePercentage: number;
|
|
331
|
+
enableCustomReference: boolean;
|
|
332
|
+
enableTip: boolean;
|
|
333
|
+
enableRating: boolean;
|
|
334
|
+
redirectUrl?: string;
|
|
335
|
+
notificationEmailAddresses: string[];
|
|
336
|
+
notificationMobileNumbers: string[];
|
|
337
|
+
metaData: {
|
|
338
|
+
[key: string]: string;
|
|
339
|
+
};
|
|
340
|
+
clientData: {
|
|
341
|
+
[key: string]: string;
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
export declare class OperatingTime {
|
|
345
|
+
reference?: string;
|
|
346
|
+
dayOfWeek: DayOfWeek;
|
|
347
|
+
fromTime: string;
|
|
348
|
+
toTime: string;
|
|
349
|
+
}
|
|
350
|
+
export declare class PosOptions {
|
|
351
|
+
isRefundsEnabled: boolean;
|
|
352
|
+
isCancellationsEnabled: boolean;
|
|
353
|
+
isPurchaseWithCashbackEnabled: boolean;
|
|
354
|
+
isWithdrawalsEnabled: boolean;
|
|
355
|
+
isBalanceCheckEnabled: boolean;
|
|
356
|
+
isCurrencyConversionEnabled: boolean;
|
|
357
|
+
isRcsPaymentEnabled: boolean;
|
|
358
|
+
isDebiCheckEnabled: boolean;
|
|
359
|
+
isPreAuthorizationEnabled: boolean;
|
|
360
|
+
isManualCardEntryEnabled: boolean;
|
|
361
|
+
isInvoiceNumberEnabled: boolean;
|
|
362
|
+
isPasscodeAlwaysRequired: boolean;
|
|
363
|
+
fuelPurchaseMethod: FuelPurchaseMethod;
|
|
364
|
+
}
|
|
365
|
+
export declare class PosPermissions {
|
|
366
|
+
canCreateUsers: boolean;
|
|
367
|
+
canProcessRefunds: boolean;
|
|
368
|
+
canCloseAndAccessBatchReports: boolean;
|
|
369
|
+
canEditDeviceSettings: boolean;
|
|
370
|
+
canExceedMaximumSaleLimits: boolean;
|
|
371
|
+
}
|
|
372
|
+
export declare enum SettlementTime {
|
|
373
|
+
None = "None",
|
|
374
|
+
IntraDay = "IntraDay",
|
|
375
|
+
EndOfDay = "EndOfDay",
|
|
376
|
+
TPlusOne = "TPlusOne",
|
|
377
|
+
TPlusTwo = "TPlusTwo",
|
|
378
|
+
TPlusThree = "TPlusThree",
|
|
379
|
+
TPlusSeven = "TPlusSeven"
|
|
380
|
+
}
|
|
381
|
+
export declare class Terminal {
|
|
382
|
+
reference?: string;
|
|
383
|
+
yourReference?: string;
|
|
384
|
+
device?: Device;
|
|
385
|
+
createdDate: Date;
|
|
386
|
+
name: string;
|
|
387
|
+
hostedPaymentUrl?: string;
|
|
388
|
+
isActive: boolean;
|
|
389
|
+
isLinked: boolean;
|
|
390
|
+
/**
|
|
391
|
+
* The list of all QR codes associated with the Terminal including QR codes that originated in external systems and QR codes generated in this system (V2QR).
|
|
392
|
+
* V2QR codes are not stored in the database, they are generated on-the-fly every time Merchant details are retrieved, and are added to this collection at that time.
|
|
393
|
+
*/
|
|
394
|
+
qrCodes: TerminalQrCode[];
|
|
395
|
+
/**
|
|
396
|
+
* A list of QR codes that originated in external systems that are associated with the Terminal.
|
|
397
|
+
* These QR codes are stored in the database when a Merchant is registered with an external Merchant management system and QR codes are supplied by that external system.
|
|
398
|
+
*/
|
|
399
|
+
externalQrCodes: TerminalQrCode[];
|
|
400
|
+
notificationTokens: TerminalNotificationToken[];
|
|
401
|
+
additionalReferences: AdditionalTerminalReference[];
|
|
402
|
+
}
|
|
403
|
+
export declare class TerminalConfiguration {
|
|
404
|
+
merchant: BasicMerchant;
|
|
405
|
+
industry: Industry;
|
|
406
|
+
primaryAddress?: Address;
|
|
407
|
+
merchantId: number;
|
|
408
|
+
terminalId: number;
|
|
409
|
+
posMerchantId?: string;
|
|
410
|
+
posTerminalId?: string;
|
|
411
|
+
terminalReference: string;
|
|
412
|
+
accessToken: string;
|
|
413
|
+
adminPasscode: string;
|
|
414
|
+
hostedPaymentUrl: string;
|
|
415
|
+
posOptions: PosOptions;
|
|
416
|
+
features: TerminalFeatures;
|
|
417
|
+
employees: BasicEmployee[];
|
|
418
|
+
}
|
|
419
|
+
export declare class TerminalFeatures {
|
|
420
|
+
isQrCodeEnabled: boolean;
|
|
421
|
+
isCardEnabled: boolean;
|
|
422
|
+
isCashEnabled: boolean;
|
|
423
|
+
isMobileMoneyEnabled: boolean;
|
|
424
|
+
}
|
|
425
|
+
export declare class TerminalNotificationToken {
|
|
426
|
+
reference?: string;
|
|
427
|
+
token: string;
|
|
428
|
+
platform: DevicePlatform;
|
|
429
|
+
}
|
|
430
|
+
export declare class TerminalPaymentQrCodes {
|
|
431
|
+
zapperQrCodeBase64?: string;
|
|
432
|
+
snapScanQrCodeBase64?: string;
|
|
433
|
+
vantagePayQrCodeBase64?: string;
|
|
434
|
+
mtnMoMoQrCodeBase64?: string;
|
|
435
|
+
}
|
|
436
|
+
export declare class TerminalPaymentQrCodeUrls {
|
|
437
|
+
zapperQrCodeUrl?: string;
|
|
438
|
+
snapScanQrCodeUrl?: string;
|
|
439
|
+
vantagePayQrCodeUrl?: string;
|
|
440
|
+
mtnMoMoQrCodeUrl?: string;
|
|
441
|
+
}
|
|
442
|
+
export declare class TerminalQrCode {
|
|
443
|
+
qrCodeType: QrCodeType;
|
|
444
|
+
qrCode: string;
|
|
445
|
+
}
|
|
446
|
+
export declare class TerminalSetup {
|
|
447
|
+
qrCodeBase64: string;
|
|
448
|
+
checkAccessToken: string;
|
|
449
|
+
doesTerminalExist: boolean;
|
|
450
|
+
isTerminalActive: boolean;
|
|
451
|
+
isTerminalLinked: boolean;
|
|
452
|
+
}
|
|
453
|
+
export declare enum TerminalType {
|
|
454
|
+
None = "None",
|
|
455
|
+
GHIPPS = "GHIPPS",
|
|
456
|
+
NIBSS = "NIBSS",
|
|
457
|
+
PAX = "PAX",
|
|
458
|
+
Verifone = "Verifone"
|
|
459
|
+
}
|
|
460
|
+
export declare class CategoryDetails {
|
|
461
|
+
type: string;
|
|
462
|
+
merchants: MerchantDetail[];
|
|
463
|
+
}
|
|
464
|
+
export declare class MerchantDetail {
|
|
465
|
+
name: string;
|
|
466
|
+
products: ProductDetail[];
|
|
467
|
+
}
|
|
468
|
+
export declare class ProductDetail {
|
|
469
|
+
reference: string;
|
|
470
|
+
name: string;
|
|
471
|
+
description?: string;
|
|
472
|
+
unitLabel?: string;
|
|
473
|
+
amountInCents: number;
|
|
474
|
+
futureAmountInCents: number;
|
|
475
|
+
futureAmountEffectiveFromDate?: Date;
|
|
476
|
+
fullAmountRequired: boolean;
|
|
477
|
+
quantityRequired: boolean;
|
|
478
|
+
fields: MerchantProductField[];
|
|
479
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BaseApi } from '../baseApi';
|
|
2
|
+
import { Address } from '../common/types';
|
|
3
|
+
import { MobileWalletOperator } from '../lookups/types';
|
|
4
|
+
import { MerchantQrCodeOptions } from '../merchants/types';
|
|
5
|
+
import { PaymentRequest, PaymentStatusResponse, QrCodeValidationRequest, QrCodeValidationResponse, CardVerificationPaymentRequest, MerchantPaymentRequest, PaymentReceiptResponse } from './types';
|
|
6
|
+
import { CardRequest, CardResponse, BankAccountRequest, BankAccountResponse, VerifyCardRequest } from '../tokens/types';
|
|
7
|
+
import { AxiosInstance } from 'axios';
|
|
8
|
+
export declare class Payments extends BaseApi {
|
|
9
|
+
private readonly hubConnection;
|
|
10
|
+
private readonly baseUrl;
|
|
11
|
+
private activeTransactions;
|
|
12
|
+
private manuallyStartedPaymentStatusChecking;
|
|
13
|
+
constructor(axiosInstance: AxiosInstance, consoleLogging?: boolean);
|
|
14
|
+
pay(request: PaymentRequest): Promise<PaymentStatusResponse>;
|
|
15
|
+
payMerchant(merchantReference: string, request: MerchantPaymentRequest): Promise<PaymentStatusResponse>;
|
|
16
|
+
paymentStatusCheck(paymentReference: string): Promise<PaymentStatusResponse>;
|
|
17
|
+
paymentReceipt(paymentReference: string): Promise<PaymentReceiptResponse>;
|
|
18
|
+
createCardToken(request: CardRequest): Promise<CardResponse>;
|
|
19
|
+
createBankAccountToken(request: BankAccountRequest): Promise<BankAccountResponse>;
|
|
20
|
+
verifyCardToken(request: VerifyCardRequest): Promise<CardResponse>;
|
|
21
|
+
createCardVerificationPayment(request: CardVerificationPaymentRequest): Promise<PaymentStatusResponse>;
|
|
22
|
+
submitPinCode(transactionReference: string, pin: string): Promise<void>;
|
|
23
|
+
rejectPinCode(transactionReference: string): Promise<void>;
|
|
24
|
+
submitConfirmation(transactionReference: string, confirm: boolean): Promise<void>;
|
|
25
|
+
submitAddress(transactionReference: string, request: Address): Promise<void>;
|
|
26
|
+
validateQrCode(request: QrCodeValidationRequest): Promise<QrCodeValidationResponse>;
|
|
27
|
+
sendEmailPaymentNotification(paymentReference: string, emailAddress: string, templateName?: string): Promise<void>;
|
|
28
|
+
sendSmsPaymentNotification(paymentReference: string, msisdn: string): Promise<void>;
|
|
29
|
+
stopPaymentStatusChecking(paymentReference?: string): Promise<void>;
|
|
30
|
+
startPaymentStatusChecking(paymentReference?: string): Promise<PaymentStatusResponse>;
|
|
31
|
+
getOfflinePaymentFormUrl(timestamp: number, merchantId: number, terminalId: number, batchNumber: string, options: MerchantQrCodeOptions): string;
|
|
32
|
+
getRequiredPinLength(mobileWalletOperator: MobileWalletOperator): number;
|
|
33
|
+
luhnCheck(creditCardNumber: string): boolean;
|
|
34
|
+
private checkPaymentUpdateStatus;
|
|
35
|
+
private onStatusPollingInterval;
|
|
36
|
+
private addPaymentStatusCheckInterval;
|
|
37
|
+
private removePaymentStatusCheckInterval;
|
|
38
|
+
}
|