pawapay-sdk 0.1.6 → 1.0.1
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 +134 -112
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2169 -1271
- package/package.json +7 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,1432 +1,2330 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* Required string length: 36
|
|
16
|
-
* @example depositId: "<INSERT_UUID_FOR_DEPOSIT>"
|
|
17
|
-
*/
|
|
1
|
+
//#region src/types/v2/deposits.t.d.ts
|
|
2
|
+
type BaseDepositStatusReponse = {
|
|
3
|
+
status: "FOUND";
|
|
4
|
+
data: {
|
|
5
|
+
status: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
type DepositStatusNotFoundResponse = BaseDepositStatusReponse & {
|
|
9
|
+
status: "NOT_FOUND";
|
|
10
|
+
data: null;
|
|
11
|
+
};
|
|
12
|
+
type DepositStatusAcceptedReponse = BaseDepositStatusReponse & {
|
|
13
|
+
status: "FOUND";
|
|
14
|
+
data: {
|
|
18
15
|
depositId: string;
|
|
19
|
-
|
|
20
|
-
* @description The amount to be collected (deposit) or disbursed (payout or refund).
|
|
21
|
-
*
|
|
22
|
-
* Amount must follow below requirements or the request will be rejected:
|
|
23
|
-
*
|
|
24
|
-
* Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
|
|
25
|
-
* The minimum and maximum amount depends on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
|
|
26
|
-
* Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
|
|
27
|
-
* Trailing zeroes are permitted.
|
|
28
|
-
*
|
|
29
|
-
* Valid examples:
|
|
30
|
-
*
|
|
31
|
-
* 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5
|
|
32
|
-
*
|
|
33
|
-
* Not valid examples:
|
|
34
|
-
*
|
|
35
|
-
* @ 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32
|
|
36
|
-
*
|
|
37
|
-
* Required string length: 1 - 23
|
|
38
|
-
*
|
|
39
|
-
* @example Example: "15"
|
|
40
|
-
|
|
41
|
-
*/
|
|
16
|
+
status: "ACCEPTED";
|
|
42
17
|
amount: string;
|
|
43
|
-
/**
|
|
44
|
-
* @description The currency in which the amount is specified.
|
|
45
|
-
*
|
|
46
|
-
* Format must be the ISO 4217 three character currency code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_4217#Active_codes |Wikipedia}.
|
|
47
|
-
*
|
|
48
|
-
* You can find all the supported currencies that the specific correspondent supports {@link https://docs.pawapay.io/using_the_api#correspondents | from here}.
|
|
49
|
-
*
|
|
50
|
-
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account together with the currencies.
|
|
51
|
-
*
|
|
52
|
-
* @example Example: "MWK"
|
|
53
|
-
*/
|
|
54
18
|
currency: string;
|
|
55
|
-
|
|
56
|
-
* @description The country in which the MMO operates.
|
|
57
|
-
*
|
|
58
|
-
* Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements | Wikipedia}.
|
|
59
|
-
*
|
|
60
|
-
* @example Example: "MWI"
|
|
61
|
-
*/
|
|
62
|
-
country?: string;
|
|
63
|
-
/**
|
|
64
|
-
* @description The correspondent code refers to the specific MMO that the specified phone number (MSISDN) has an active mobile money wallet with.
|
|
65
|
-
*
|
|
66
|
-
* You can find all the supported correspondents {@link https://docs.pawapay.io/using_the_api#correspondents | listed here}.
|
|
67
|
-
*
|
|
68
|
-
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account.
|
|
69
|
-
*
|
|
70
|
-
* You can use the {@link https://docs.pawapay.io/v1/api-reference/toolkit/predict-correspondent | predict correspondent} enpoint to predict the correct correspondent to use based on the phone number (MSISDN).
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* Example: "AIRTEL_MWI"
|
|
74
|
-
*/
|
|
75
|
-
correspondent: string;
|
|
76
|
-
/**
|
|
77
|
-
* @description The phone number (MSISDN) of the recipient or payer must be specified as the `value` of the `address`.
|
|
78
|
-
*/
|
|
19
|
+
country: string;
|
|
79
20
|
payer: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
*/
|
|
86
|
-
type: "MSISDN" & string;
|
|
87
|
-
/**
|
|
88
|
-
* @description The phone number (MSISDN) of the payer or recipient.
|
|
89
|
-
*
|
|
90
|
-
* The format is described in {@link https://en.wikipedia.org/wiki/MSISDN | Wikipedia}.
|
|
91
|
-
*
|
|
92
|
-
* MSISDN validation has following rules:
|
|
93
|
-
*
|
|
94
|
-
* - Only digits without whitespaces or any other separators or prefixes like '+'
|
|
95
|
-
* - Should not start with zero.
|
|
96
|
-
* - Country code is mandatory.
|
|
97
|
-
* - Should not exceed or be less than the valid length of specified country.
|
|
98
|
-
* - Valid examples for Malawi: 265999123456
|
|
99
|
-
*
|
|
100
|
-
* Not valid examples for Malawi:
|
|
101
|
-
* +265999123456, +2650999123456, 265 999 123 456, 265-9991-23456, 0265999123456,
|
|
102
|
-
*
|
|
103
|
-
* @example {value: "265 999 123 678"}
|
|
104
|
-
*
|
|
105
|
-
*/
|
|
106
|
-
address: {
|
|
107
|
-
value: string;
|
|
108
|
-
};
|
|
21
|
+
type: string;
|
|
22
|
+
accountDetails: {
|
|
23
|
+
phoneNUmber: string;
|
|
24
|
+
provider: string;
|
|
25
|
+
};
|
|
109
26
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
* @example Example:"2020-02-21T17:32:28Z"
|
|
116
|
-
*/
|
|
117
|
-
customerTimestamp: string;
|
|
118
|
-
/**
|
|
119
|
-
* @description Short description for the transaction.
|
|
120
|
-
*
|
|
121
|
-
* Depending on the specific MMO performing the transaction this message may be visible to the customer in the SMS receipt or within their transaction history.
|
|
122
|
-
*
|
|
123
|
-
* Must be between 4 and 22 alphanumeric characters.
|
|
124
|
-
*
|
|
125
|
-
* Required string length: 4 - 22
|
|
126
|
-
*
|
|
127
|
-
* @example Example: "Note of 4 to 22 chars"
|
|
128
|
-
*/
|
|
129
|
-
statementDescription: string;
|
|
130
|
-
/**
|
|
131
|
-
* @description For MMOs (correspondents) that use a preauthorisation code instead of a PIN prompt for authorising the deposit.
|
|
132
|
-
*
|
|
133
|
-
* Required string length: 1 - 36
|
|
134
|
-
*/
|
|
135
|
-
preAuthorisationCode?: string;
|
|
136
|
-
/**
|
|
137
|
-
* @description A list of metadata that you can attach to the payment for providing additional context about the payment.
|
|
138
|
-
*
|
|
139
|
-
* For example, adding orderId to indicate for which order this payment was for or customerId to know which customer this payment pertains to.
|
|
140
|
-
*
|
|
141
|
-
* Metadata will not be visible to the customer that is party to this payment.
|
|
142
|
-
* It will be visible in the pawaPay Dashboard on the payment details page and in your financial statements as a JSON object to support automated reconciliation.\
|
|
143
|
-
* It is also possible to search for recent payments in the pawaPay Dashboard using global search based on the values of metadata.
|
|
144
|
-
*
|
|
145
|
-
* Up to 10 metadata fields can be attached to a payment.
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* @param {string} metadata.fieldName - The name of the metadata that you are attaching to the payment.
|
|
149
|
-
* @example {fieldName: "orderId"}
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* @param {string} metadata.metadata.fieldValue - The value for this metadata field
|
|
153
|
-
* @example {fieldValue: "ORD-123456789"}
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
* @param {boolean} metadata.isPII - Indicates whether the field contains personally identifiable information. Used for enabling compliance with GDPR or other relevant data privacy laws.
|
|
157
|
-
* @example {isPII: true}
|
|
158
|
-
*/
|
|
159
|
-
metadata?: Array<{
|
|
160
|
-
fieldName: string;
|
|
161
|
-
fieldValue: string;
|
|
162
|
-
isPII?: boolean;
|
|
163
|
-
}>;
|
|
27
|
+
customerMessage: string;
|
|
28
|
+
clientReferenceId: string;
|
|
29
|
+
created: string;
|
|
30
|
+
metadata: object;
|
|
31
|
+
};
|
|
164
32
|
};
|
|
165
|
-
type
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
* Required string length: 36
|
|
169
|
-
* @example depositId: "<INSERT_UUID_FOR_DEPOSIT>"
|
|
170
|
-
*/
|
|
33
|
+
type DepositStatusProcessingReponse = BaseDepositStatusReponse & {
|
|
34
|
+
status: "FOUND";
|
|
35
|
+
data: {
|
|
171
36
|
depositId: string;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
* COMPLETED - The payment has been successfully processed.
|
|
175
|
-
* FAILED - The payment request has been proceessed, but failed.
|
|
176
|
-
* Available options: `COMPLETED`, `FAILED`
|
|
177
|
-
*/
|
|
178
|
-
status: string;
|
|
179
|
-
/**
|
|
180
|
-
* @description The amount to be collected or disbursed.
|
|
181
|
-
*
|
|
182
|
-
* Amount must follow below requirements or the request will be rejected:
|
|
183
|
-
*
|
|
184
|
-
* Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
|
|
185
|
-
* The minimum and maximum amount depends on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
|
|
186
|
-
* Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
|
|
187
|
-
* Trailing zeroes are permitted.
|
|
188
|
-
*
|
|
189
|
-
* Valid examples:
|
|
190
|
-
*
|
|
191
|
-
* 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5
|
|
192
|
-
*
|
|
193
|
-
* Not valid examples:
|
|
194
|
-
*
|
|
195
|
-
* @ 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32
|
|
196
|
-
*
|
|
197
|
-
* Required string length: 1 - 23
|
|
198
|
-
*
|
|
199
|
-
* @example Example: "15"
|
|
200
|
-
|
|
201
|
-
*/
|
|
202
|
-
requestedAmount: string;
|
|
203
|
-
/**
|
|
204
|
-
* @description The currency in which the amount is specified.
|
|
205
|
-
*
|
|
206
|
-
* Format must be the ISO 4217 three character currency code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_4217#Active_codes |Wikipedia}.
|
|
207
|
-
*
|
|
208
|
-
* You can find all the supported currencies that the specific correspondent supports {@link https://docs.pawapay.io/using_the_api#correspondents | from here}.
|
|
209
|
-
*
|
|
210
|
-
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account together with the currencies.
|
|
211
|
-
*
|
|
212
|
-
* @example Example: "MWK"
|
|
213
|
-
*/
|
|
37
|
+
status: "PROCESSING";
|
|
38
|
+
amount: string;
|
|
214
39
|
currency: string;
|
|
215
|
-
/**
|
|
216
|
-
* @description The country in which the MMO operates.
|
|
217
|
-
*
|
|
218
|
-
* Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements | Wikipedia}.
|
|
219
|
-
*
|
|
220
|
-
* @example Example: "MWI"
|
|
221
|
-
*/
|
|
222
40
|
country: string;
|
|
223
|
-
/**
|
|
224
|
-
* @description The correspondent code refers to the specific MMO that the specified phone number (MSISDN) has an active mobile money wallet with.
|
|
225
|
-
*
|
|
226
|
-
* You can find all the supported correspondents {@link https://docs.pawapay.io/using_the_api#correspondents | listed here}.
|
|
227
|
-
*
|
|
228
|
-
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account.
|
|
229
|
-
*
|
|
230
|
-
* You can use the {@link https://docs.pawapay.io/v1/api-reference/toolkit/predict-correspondent | predict correspondent} enpoint to predict the correct correspondent to use based on the phone number (MSISDN).
|
|
231
|
-
*
|
|
232
|
-
* @example
|
|
233
|
-
* Example: "AIRTEL_MWI"
|
|
234
|
-
*/
|
|
235
|
-
correspondent: string;
|
|
236
|
-
/**
|
|
237
|
-
* @description The phone number (MSISDN) of the recipient or payer must be specified as the `value` of the `address`.
|
|
238
|
-
*/
|
|
239
41
|
payer: {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
*/
|
|
246
|
-
type: "MSISDN" & string;
|
|
247
|
-
/**
|
|
248
|
-
* @description The phone number (MSISDN) of the payer or recipient.
|
|
249
|
-
*
|
|
250
|
-
* The format is described in {@link https://en.wikipedia.org/wiki/MSISDN | Wikipedia}.
|
|
251
|
-
*
|
|
252
|
-
* MSISDN validation has following rules:
|
|
253
|
-
*
|
|
254
|
-
* - Only digits without whitespaces or any other separators or prefixes like '+'
|
|
255
|
-
* - Should not start with zero.
|
|
256
|
-
* - Country code is mandatory.
|
|
257
|
-
* - Should not exceed or be less than the valid length of specified country.
|
|
258
|
-
* - Valid examples for Malawi: 265999123456
|
|
259
|
-
*
|
|
260
|
-
* Not valid examples for Malawi:
|
|
261
|
-
* +265999123456, +2650999123456, 265 999 123 456, 265-9991-23456, 0265999123456,
|
|
262
|
-
*
|
|
263
|
-
* @example {value: "265 999 123 678"}
|
|
264
|
-
*
|
|
265
|
-
*/
|
|
266
|
-
address: {
|
|
267
|
-
value: string;
|
|
268
|
-
};
|
|
42
|
+
type: string;
|
|
43
|
+
accountDetails: {
|
|
44
|
+
phoneNUmber: string;
|
|
45
|
+
provider: string;
|
|
46
|
+
};
|
|
269
47
|
};
|
|
48
|
+
customerMessage: string;
|
|
49
|
+
clientReferenceId: string;
|
|
50
|
+
created: string;
|
|
51
|
+
metadata: object;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
type DepositStatusInReconciliationReponse = BaseDepositStatusReponse & {
|
|
55
|
+
status: "FOUND";
|
|
56
|
+
data: {
|
|
57
|
+
depositId: string;
|
|
58
|
+
status: "IN_RECONCILIATION";
|
|
59
|
+
amount: string;
|
|
60
|
+
currency: string;
|
|
61
|
+
country: string;
|
|
62
|
+
payer: {
|
|
63
|
+
type: string;
|
|
64
|
+
accountDetails: {
|
|
65
|
+
phoneNUmber: string;
|
|
66
|
+
provider: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
customerMessage: string;
|
|
70
|
+
clientReferenceId: string;
|
|
71
|
+
created: string;
|
|
72
|
+
metadata: object;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
type DepositStatusFailedReponse = BaseDepositStatusReponse & {
|
|
76
|
+
status: "FOUND";
|
|
77
|
+
data: {
|
|
78
|
+
depositId: string;
|
|
79
|
+
status: "FAILED";
|
|
80
|
+
amount: string;
|
|
81
|
+
currency: string;
|
|
82
|
+
country: string;
|
|
83
|
+
payer: {
|
|
84
|
+
type: string;
|
|
85
|
+
accountDetails: {
|
|
86
|
+
phoneNUmber: string;
|
|
87
|
+
provider: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
customerMessage: string;
|
|
91
|
+
clientReferenceId: string;
|
|
92
|
+
created: string;
|
|
93
|
+
failureReason: {
|
|
94
|
+
failureCode: string;
|
|
95
|
+
failureMessage: string;
|
|
96
|
+
};
|
|
97
|
+
metadata: object;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
type DepositStatusResponse_v2 = DepositStatusNotFoundResponse | DepositStatusAcceptedReponse | DepositStatusProcessingReponse | DepositStatusInReconciliationReponse | DepositStatusFailedReponse;
|
|
101
|
+
type DepositCallBack_v2 = {
|
|
102
|
+
/**
|
|
103
|
+
* @description A UUIDv4 based ID specified by you, that uniquely identifies the deposit.
|
|
104
|
+
* Required string length: 36
|
|
105
|
+
* @example depositId: "<INSERT_UUID_FOR_DEPOSIT>"
|
|
106
|
+
*/
|
|
107
|
+
depositId: string;
|
|
108
|
+
/**
|
|
109
|
+
* @description The final status of the payment.
|
|
110
|
+
* COMPLETED - The payment has been successfully processed.
|
|
111
|
+
* PROCESSING - Only sent for providers with authorisation type REDIRECT_AUTH. See auhtorizationUrl.
|
|
112
|
+
* FAILED - The payment request has been proceessed, but failed.
|
|
113
|
+
* Available options: `COMPLETED`, `FAILED`, `PROCESSING`
|
|
114
|
+
*/
|
|
115
|
+
status: "COMPLETED" | "PROCESSING" | "FAILED";
|
|
116
|
+
amount: string;
|
|
117
|
+
/**
|
|
118
|
+
* @description The currency in which the amount is specified.
|
|
119
|
+
*
|
|
120
|
+
* Format must be the ISO 4217 three character currency code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_4217#Active_codes |Wikipedia}.
|
|
121
|
+
*
|
|
122
|
+
* You can find all the supported currencies that the specific correspondent supports {@link https://docs.pawapay.io/using_the_api#correspondents | from here}.
|
|
123
|
+
*
|
|
124
|
+
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account together with the currencies.
|
|
125
|
+
*
|
|
126
|
+
* @example Example: "MWK"
|
|
127
|
+
*/
|
|
128
|
+
currency: string;
|
|
129
|
+
/**
|
|
130
|
+
* The country in which the payment was initiated.
|
|
131
|
+
* Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_4217#Active_codes | Wikipedia}.
|
|
132
|
+
*
|
|
133
|
+
* Required string length: 3
|
|
134
|
+
*
|
|
135
|
+
* @example "MWK"
|
|
136
|
+
*/
|
|
137
|
+
country: string;
|
|
138
|
+
payer: {
|
|
139
|
+
type: "MMO";
|
|
140
|
+
accountDetails: {
|
|
141
|
+
phoneNumber: "260763456789";
|
|
142
|
+
provider: "MTN_MOMO_ZMB";
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
created: "2020-02-21T17:32:29Z";
|
|
146
|
+
customerMessage: "Note of 4 to 22 chars";
|
|
147
|
+
providerTransactionId: "ABC123";
|
|
148
|
+
failureReason: {
|
|
149
|
+
failureCode: "INSUFFICIENT_BALANCE";
|
|
150
|
+
failureMessage: "The customer does not have enough funds to complete this payment.";
|
|
151
|
+
};
|
|
152
|
+
metadata: {
|
|
153
|
+
orderId: "ORD-123456789";
|
|
154
|
+
customerId: "customer@email.com";
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
type DepositConfig_v2 = {
|
|
158
|
+
depositId: string;
|
|
159
|
+
payer: {
|
|
160
|
+
type: "MMO";
|
|
161
|
+
accountDetails: {
|
|
162
|
+
phoneNumber: string;
|
|
163
|
+
provider: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
amount: string;
|
|
167
|
+
currency: string;
|
|
168
|
+
preAuthorisationCode?: string;
|
|
169
|
+
clientReferenceId?: string;
|
|
170
|
+
customerMessage?: string;
|
|
171
|
+
metadata: object[];
|
|
172
|
+
};
|
|
173
|
+
type BaseDepositResponse = {
|
|
174
|
+
depositId: string;
|
|
175
|
+
status: string;
|
|
176
|
+
};
|
|
177
|
+
type AcceptedDepositResponse = BaseDepositResponse & {
|
|
178
|
+
status: "ACCEPTED";
|
|
179
|
+
created: string;
|
|
180
|
+
};
|
|
181
|
+
type DepositIgnoredResponse = BaseDepositResponse & {
|
|
182
|
+
status: "DUPLICATE_IGNORED";
|
|
183
|
+
created: string;
|
|
184
|
+
};
|
|
185
|
+
type ProviderTemporaryUnavailableResponse = BaseDepositResponse & {
|
|
186
|
+
status: "REJECTED";
|
|
187
|
+
failureReason: {
|
|
188
|
+
failureCode: "PROVIDER_TEMPORARILY_UNAVAILABLE";
|
|
189
|
+
failureMessage: string;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
type InvalidPhoneNumberResponse = BaseDepositResponse & {
|
|
193
|
+
status: "REJECTED";
|
|
194
|
+
failureReason: {
|
|
195
|
+
failureCode: "INVALID_PHONE_NUMBER";
|
|
196
|
+
failureMessage: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
type InvalidCurrencyResponse = BaseDepositResponse & {
|
|
200
|
+
status: "REJECTED";
|
|
201
|
+
failureReason: {
|
|
202
|
+
failureCode: "INVALID_CURRENCY";
|
|
203
|
+
failureMessage: string;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
type InvalidAmountResponse = BaseDepositResponse & {
|
|
207
|
+
status: "REJECTED";
|
|
208
|
+
failureReason: {
|
|
209
|
+
failureCode: "INVALID_AMOUNT";
|
|
210
|
+
failureMessage: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
type AmountOutOfBoundsResponse = BaseDepositResponse & {
|
|
214
|
+
status: "REJECTED";
|
|
215
|
+
failureReason: {
|
|
216
|
+
failureCode: "AMOUNT_OUT_OF_BOUNDS";
|
|
217
|
+
failureMessage: string;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
type DepositResponse_v2 = AcceptedDepositResponse | DepositIgnoredResponse | ProviderTemporaryUnavailableResponse | InvalidPhoneNumberResponse | InvalidCurrencyResponse | InvalidAmountResponse | AmountOutOfBoundsResponse;
|
|
221
|
+
type BaseDepositResendCallbackResponse = {
|
|
222
|
+
depositId: string;
|
|
223
|
+
status: string;
|
|
224
|
+
};
|
|
225
|
+
type DepositResendCallbackAcceptedResponse = BaseDepositResendCallbackResponse & {
|
|
226
|
+
status: "ACCEPTED";
|
|
227
|
+
};
|
|
228
|
+
type DepositResendCallbackInvalidStateResponse = BaseDepositResendCallbackResponse & {
|
|
229
|
+
status: "REJECTED";
|
|
230
|
+
failureReason: {
|
|
231
|
+
failureCode: "INVALID_STATE";
|
|
232
|
+
failureMessage: string;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
type DepositResendCallbackNotFoundResponse = BaseDepositResendCallbackResponse & {
|
|
236
|
+
status: "REJECTED";
|
|
237
|
+
failureReason: {
|
|
238
|
+
failureCode: "NOT_FOUND";
|
|
239
|
+
failureMessage: string;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
type ResendDepositCallbackResponse_v2 = DepositResendCallbackAcceptedResponse | DepositResendCallbackInvalidStateResponse | DepositResendCallbackNotFoundResponse;
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region src/types/index.t.d.ts
|
|
245
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: <'can use any'> */
|
|
246
|
+
interface PawaPayResponse<T = any, E = any> {
|
|
247
|
+
success: boolean;
|
|
248
|
+
data?: T;
|
|
249
|
+
status?: number;
|
|
250
|
+
error?: E;
|
|
251
|
+
headers?: any;
|
|
252
|
+
}
|
|
253
|
+
interface RequestOptions {
|
|
254
|
+
timeout?: number;
|
|
255
|
+
headers?: Record<string, string>;
|
|
256
|
+
}
|
|
257
|
+
type DepositConfig = {
|
|
258
|
+
/**
|
|
259
|
+
* @description A UUIDv4 based ID specified by you, that uniquely identifies the deposit.
|
|
260
|
+
* Required string length: 36
|
|
261
|
+
* @example depositId: "<INSERT_UUID_FOR_DEPOSIT>"
|
|
262
|
+
*/
|
|
263
|
+
depositId: string;
|
|
264
|
+
/**
|
|
265
|
+
* @description The amount to be collected (deposit) or disbursed (payout or refund).
|
|
266
|
+
*
|
|
267
|
+
* Amount must follow below requirements or the request will be rejected:
|
|
268
|
+
*
|
|
269
|
+
* Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
|
|
270
|
+
* The minimum and maximum amount depends on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
|
|
271
|
+
* Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
|
|
272
|
+
* Trailing zeroes are permitted.
|
|
273
|
+
*
|
|
274
|
+
* Valid examples:
|
|
275
|
+
*
|
|
276
|
+
* 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5
|
|
277
|
+
*
|
|
278
|
+
* Not valid examples:
|
|
279
|
+
*
|
|
280
|
+
* @ 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32
|
|
281
|
+
*
|
|
282
|
+
* Required string length: 1 - 23
|
|
283
|
+
*
|
|
284
|
+
* @example Example: "15"
|
|
285
|
+
*/
|
|
286
|
+
amount: string;
|
|
287
|
+
/**
|
|
288
|
+
* @description The currency in which the amount is specified.
|
|
289
|
+
*
|
|
290
|
+
* Format must be the ISO 4217 three character currency code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_4217#Active_codes |Wikipedia}.
|
|
291
|
+
*
|
|
292
|
+
* You can find all the supported currencies that the specific correspondent supports {@link https://docs.pawapay.io/using_the_api#correspondents | from here}.
|
|
293
|
+
*
|
|
294
|
+
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account together with the currencies.
|
|
295
|
+
*
|
|
296
|
+
* @example Example: "MWK"
|
|
297
|
+
*/
|
|
298
|
+
currency: string;
|
|
299
|
+
/**
|
|
300
|
+
* @description The country in which the MMO operates.
|
|
301
|
+
*
|
|
302
|
+
* Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements | Wikipedia}.
|
|
303
|
+
*
|
|
304
|
+
* @example Example: "MWI"
|
|
305
|
+
*/
|
|
306
|
+
country?: string;
|
|
307
|
+
/**
|
|
308
|
+
* @description The correspondent code refers to the specific MMO that the specified phone number (MSISDN) has an active mobile money wallet with.
|
|
309
|
+
*
|
|
310
|
+
* You can find all the supported correspondents {@link https://docs.pawapay.io/using_the_api#correspondents | listed here}.
|
|
311
|
+
*
|
|
312
|
+
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account.
|
|
313
|
+
*
|
|
314
|
+
* You can use the {@link https://docs.pawapay.io/v1/api-reference/toolkit/predict-correspondent | predict correspondent} enpoint to predict the correct correspondent to use based on the phone number (MSISDN).
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* Example: "AIRTEL_MWI"
|
|
318
|
+
*/
|
|
319
|
+
correspondent: string;
|
|
320
|
+
/**
|
|
321
|
+
* @description The phone number (MSISDN) of the recipient or payer must be specified as the `value` of the `address`.
|
|
322
|
+
*/
|
|
323
|
+
payer: {
|
|
324
|
+
/** @description The type of financial address. At the moment, only MSISDN is supported as the financial address.
|
|
325
|
+
* @example
|
|
326
|
+
* {
|
|
327
|
+
* type: "MSISDN"
|
|
328
|
+
* }
|
|
329
|
+
*/
|
|
330
|
+
type: "MSISDN" & string;
|
|
270
331
|
/**
|
|
271
|
-
* @description The
|
|
332
|
+
* @description The phone number (MSISDN) of the payer or recipient.
|
|
272
333
|
*
|
|
273
|
-
*
|
|
334
|
+
* The format is described in {@link https://en.wikipedia.org/wiki/MSISDN | Wikipedia}.
|
|
274
335
|
*
|
|
275
|
-
*
|
|
276
|
-
*/
|
|
277
|
-
customerTimestamp: string;
|
|
278
|
-
/**
|
|
279
|
-
* @description Short description for the transaction.
|
|
336
|
+
* MSISDN validation has following rules:
|
|
280
337
|
*
|
|
281
|
-
*
|
|
338
|
+
* - Only digits without whitespaces or any other separators or prefixes like '+'
|
|
339
|
+
* - Should not start with zero.
|
|
340
|
+
* - Country code is mandatory.
|
|
341
|
+
* - Should not exceed or be less than the valid length of specified country.
|
|
342
|
+
* - Valid examples for Malawi: 265999123456
|
|
282
343
|
*
|
|
283
|
-
*
|
|
344
|
+
* Not valid examples for Malawi:
|
|
345
|
+
* +265999123456, +2650999123456, 265 999 123 456, 265-9991-23456, 0265999123456,
|
|
284
346
|
*
|
|
285
|
-
*
|
|
347
|
+
* @example {value: "265 999 123 678"}
|
|
286
348
|
*
|
|
287
|
-
* @example Example: "Note of 4 to 22 chars"
|
|
288
349
|
*/
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
350
|
+
address: {
|
|
351
|
+
value: string;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* @description The timestamp of when the deposit was created in the pawaPay platform.
|
|
356
|
+
*
|
|
357
|
+
* Format defined by 'date-time' in RFC3339 section 5.6 from {@link https://tools.ietf.org/html/rfc3339#section-5.6 | IETF}
|
|
358
|
+
*
|
|
359
|
+
* @example Example:"2020-02-21T17:32:28Z"
|
|
360
|
+
*/
|
|
361
|
+
customerTimestamp: string;
|
|
362
|
+
/**
|
|
363
|
+
* @description Short description for the transaction.
|
|
364
|
+
*
|
|
365
|
+
* Depending on the specific MMO performing the transaction this message may be visible to the customer in the SMS receipt or within their transaction history.
|
|
366
|
+
*
|
|
367
|
+
* Must be between 4 and 22 alphanumeric characters.
|
|
368
|
+
*
|
|
369
|
+
* Required string length: 4 - 22
|
|
370
|
+
*
|
|
371
|
+
* @example Example: "Note of 4 to 22 chars"
|
|
372
|
+
*/
|
|
373
|
+
statementDescription: string;
|
|
374
|
+
/**
|
|
375
|
+
* @description For MMOs (correspondents) that use a preauthorisation code instead of a PIN prompt for authorising the deposit.
|
|
376
|
+
*
|
|
377
|
+
* Required string length: 1 - 36
|
|
378
|
+
*/
|
|
379
|
+
preAuthorisationCode?: string;
|
|
380
|
+
/**
|
|
381
|
+
* @description A list of metadata that you can attach to the payment for providing additional context about the payment.
|
|
382
|
+
*
|
|
383
|
+
* For example, adding orderId to indicate for which order this payment was for or customerId to know which customer this payment pertains to.
|
|
384
|
+
*
|
|
385
|
+
* Metadata will not be visible to the customer that is party to this payment.
|
|
386
|
+
* It will be visible in the pawaPay Dashboard on the payment details page and in your financial statements as a JSON object to support automated reconciliation.\
|
|
387
|
+
* It is also possible to search for recent payments in the pawaPay Dashboard using global search based on the values of metadata.
|
|
388
|
+
*
|
|
389
|
+
* Up to 10 metadata fields can be attached to a payment.
|
|
390
|
+
*
|
|
391
|
+
*
|
|
392
|
+
* @param {string} metadata.fieldName - The name of the metadata that you are attaching to the payment.
|
|
393
|
+
* @example {fieldName: "orderId"}
|
|
394
|
+
*
|
|
395
|
+
*
|
|
396
|
+
* @param {string} metadata.metadata.fieldValue - The value for this metadata field
|
|
397
|
+
* @example {fieldValue: "ORD-123456789"}
|
|
398
|
+
*
|
|
399
|
+
*
|
|
400
|
+
* @param {boolean} metadata.isPII - Indicates whether the field contains personally identifiable information. Used for enabling compliance with GDPR or other relevant data privacy laws.
|
|
401
|
+
* @example {isPII: true}
|
|
402
|
+
*/
|
|
403
|
+
metadata?: Array<{
|
|
404
|
+
fieldName: string;
|
|
405
|
+
fieldValue: string;
|
|
406
|
+
isPII?: boolean;
|
|
407
|
+
}>;
|
|
408
|
+
};
|
|
409
|
+
type DepositCallback = {
|
|
410
|
+
/**
|
|
411
|
+
* @description A UUIDv4 based ID specified by you, that uniquely identifies the deposit.
|
|
412
|
+
* Required string length: 36
|
|
413
|
+
* @example depositId: "<INSERT_UUID_FOR_DEPOSIT>"
|
|
414
|
+
*/
|
|
415
|
+
depositId: string;
|
|
416
|
+
/**
|
|
417
|
+
* @description The final status of the payment.
|
|
418
|
+
* COMPLETED - The payment has been successfully processed.
|
|
419
|
+
* FAILED - The payment request has been proceessed, but failed.
|
|
420
|
+
* Available options: `COMPLETED`, `FAILED`
|
|
421
|
+
*/
|
|
422
|
+
status: string;
|
|
423
|
+
/**
|
|
424
|
+
* @description The amount to be collected or disbursed.
|
|
425
|
+
*
|
|
426
|
+
* Amount must follow below requirements or the request will be rejected:
|
|
427
|
+
*
|
|
428
|
+
* Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
|
|
429
|
+
* The minimum and maximum amount depends on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
|
|
430
|
+
* Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
|
|
431
|
+
* Trailing zeroes are permitted.
|
|
432
|
+
*
|
|
433
|
+
* Valid examples:
|
|
434
|
+
*
|
|
435
|
+
* 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5
|
|
436
|
+
*
|
|
437
|
+
* Not valid examples:
|
|
438
|
+
*
|
|
439
|
+
* @ 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32
|
|
440
|
+
*
|
|
441
|
+
* Required string length: 1 - 23
|
|
442
|
+
*
|
|
443
|
+
* @example Example: "15"
|
|
444
|
+
*/
|
|
445
|
+
requestedAmount: string;
|
|
446
|
+
/**
|
|
447
|
+
* @description The currency in which the amount is specified.
|
|
448
|
+
*
|
|
449
|
+
* Format must be the ISO 4217 three character currency code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_4217#Active_codes |Wikipedia}.
|
|
450
|
+
*
|
|
451
|
+
* You can find all the supported currencies that the specific correspondent supports {@link https://docs.pawapay.io/using_the_api#correspondents | from here}.
|
|
452
|
+
*
|
|
453
|
+
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account together with the currencies.
|
|
454
|
+
*
|
|
455
|
+
* @example Example: "MWK"
|
|
456
|
+
*/
|
|
457
|
+
currency: string;
|
|
458
|
+
/**
|
|
459
|
+
* @description The country in which the MMO operates.
|
|
460
|
+
*
|
|
461
|
+
* Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements | Wikipedia}.
|
|
462
|
+
*
|
|
463
|
+
* @example Example: "MWI"
|
|
464
|
+
*/
|
|
465
|
+
country: string;
|
|
466
|
+
/**
|
|
467
|
+
* @description The correspondent code refers to the specific MMO that the specified phone number (MSISDN) has an active mobile money wallet with.
|
|
468
|
+
*
|
|
469
|
+
* You can find all the supported correspondents {@link https://docs.pawapay.io/using_the_api#correspondents | listed here}.
|
|
470
|
+
*
|
|
471
|
+
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account.
|
|
472
|
+
*
|
|
473
|
+
* You can use the {@link https://docs.pawapay.io/v1/api-reference/toolkit/predict-correspondent | predict correspondent} enpoint to predict the correct correspondent to use based on the phone number (MSISDN).
|
|
474
|
+
*
|
|
475
|
+
* @example
|
|
476
|
+
* Example: "AIRTEL_MWI"
|
|
477
|
+
*/
|
|
478
|
+
correspondent: string;
|
|
479
|
+
/**
|
|
480
|
+
* @description The phone number (MSISDN) of the recipient or payer must be specified as the `value` of the `address`.
|
|
481
|
+
*/
|
|
482
|
+
payer: {
|
|
483
|
+
/** @description The type of financial address. At the moment, only MSISDN is supported as the financial address.
|
|
484
|
+
* @example
|
|
485
|
+
* {
|
|
486
|
+
* type: "MSISDN"
|
|
487
|
+
* }
|
|
293
488
|
*/
|
|
294
|
-
|
|
489
|
+
type: "MSISDN" & string;
|
|
295
490
|
/**
|
|
296
|
-
* @description The
|
|
297
|
-
*
|
|
298
|
-
* Amount must follow below requirements or the request will be rejected:
|
|
299
|
-
*
|
|
300
|
-
* Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
|
|
301
|
-
* The minimum and maximum amount depends on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
|
|
302
|
-
* Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
|
|
303
|
-
* Trailing zeroes are permitted.
|
|
304
|
-
*
|
|
305
|
-
* Valid examples:
|
|
491
|
+
* @description The phone number (MSISDN) of the payer or recipient.
|
|
306
492
|
*
|
|
307
|
-
*
|
|
493
|
+
* The format is described in {@link https://en.wikipedia.org/wiki/MSISDN | Wikipedia}.
|
|
308
494
|
*
|
|
309
|
-
*
|
|
495
|
+
* MSISDN validation has following rules:
|
|
310
496
|
*
|
|
311
|
-
*
|
|
497
|
+
* - Only digits without whitespaces or any other separators or prefixes like '+'
|
|
498
|
+
* - Should not start with zero.
|
|
499
|
+
* - Country code is mandatory.
|
|
500
|
+
* - Should not exceed or be less than the valid length of specified country.
|
|
501
|
+
* - Valid examples for Malawi: 265999123456
|
|
312
502
|
*
|
|
313
|
-
*
|
|
503
|
+
* Not valid examples for Malawi:
|
|
504
|
+
* +265999123456, +2650999123456, 265 999 123 456, 265-9991-23456, 0265999123456,
|
|
314
505
|
*
|
|
315
|
-
* @example
|
|
316
|
-
|
|
317
|
-
*/
|
|
318
|
-
depositedAmount: string;
|
|
319
|
-
/**
|
|
320
|
-
* @description When the MNO responded to this deposit request.
|
|
321
|
-
* Format defined by 'date-time' in RFC3339 section 5.6 (https://tools.ietf.org/html/rfc3339#section-5.6)
|
|
506
|
+
* @example {value: "265 999 123 678"}
|
|
322
507
|
*
|
|
323
|
-
* Example: "2020-02-21T17:32:30Z"
|
|
324
|
-
*/
|
|
325
|
-
respondedByPayer: string;
|
|
326
|
-
/**
|
|
327
|
-
* @description The unqiue ID for this financial transaction assigned by the MNO.
|
|
328
508
|
*/
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
activityTypw: string;
|
|
332
|
-
comment: string;
|
|
333
|
-
}[];
|
|
334
|
-
failureReason: {
|
|
335
|
-
failureCode: string;
|
|
336
|
-
failureMessage: string;
|
|
509
|
+
address: {
|
|
510
|
+
value: string;
|
|
337
511
|
};
|
|
338
|
-
|
|
512
|
+
};
|
|
513
|
+
/**
|
|
514
|
+
* @description The timestamp of when the deposit was created in the pawaPay platform.
|
|
515
|
+
*
|
|
516
|
+
* Format defined by 'date-time' in RFC3339 section 5.6 from {@link https://tools.ietf.org/html/rfc3339#section-5.6 | IETF}
|
|
517
|
+
*
|
|
518
|
+
* @example Example:"2020-02-21T17:32:28Z"
|
|
519
|
+
*/
|
|
520
|
+
customerTimestamp: string;
|
|
521
|
+
/**
|
|
522
|
+
* @description Short description for the transaction.
|
|
523
|
+
*
|
|
524
|
+
* Depending on the specific MMO performing the transaction this message may be visible to the customer in the SMS receipt or within their transaction history.
|
|
525
|
+
*
|
|
526
|
+
* Must be between 4 and 22 alphanumeric characters.
|
|
527
|
+
*
|
|
528
|
+
* Required string length: 4 - 22
|
|
529
|
+
*
|
|
530
|
+
* @example Example: "Note of 4 to 22 chars"
|
|
531
|
+
*/
|
|
532
|
+
statementDescription: string;
|
|
533
|
+
/**
|
|
534
|
+
* ISO Date String
|
|
535
|
+
* @example "2020-10-19T11:17:01Z"
|
|
536
|
+
*/
|
|
537
|
+
created: string;
|
|
538
|
+
/**
|
|
539
|
+
* @description The amount to be collected or disbursed.
|
|
540
|
+
*
|
|
541
|
+
* Amount must follow below requirements or the request will be rejected:
|
|
542
|
+
*
|
|
543
|
+
* Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
|
|
544
|
+
* The minimum and maximum amount depends on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
|
|
545
|
+
* Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
|
|
546
|
+
* Trailing zeroes are permitted.
|
|
547
|
+
*
|
|
548
|
+
* Valid examples:
|
|
549
|
+
*
|
|
550
|
+
* 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5
|
|
551
|
+
*
|
|
552
|
+
* Not valid examples:
|
|
553
|
+
*
|
|
554
|
+
* @ 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32
|
|
555
|
+
*
|
|
556
|
+
* Required string length: 1 - 23
|
|
557
|
+
*
|
|
558
|
+
* @example Example: "15"
|
|
559
|
+
*/
|
|
560
|
+
depositedAmount: string;
|
|
561
|
+
/**
|
|
562
|
+
* @description When the MNO responded to this deposit request.
|
|
563
|
+
* Format defined by 'date-time' in RFC3339 section 5.6 (https://tools.ietf.org/html/rfc3339#section-5.6)
|
|
564
|
+
*
|
|
565
|
+
* Example: "2020-02-21T17:32:30Z"
|
|
566
|
+
*/
|
|
567
|
+
respondedByPayer: string;
|
|
568
|
+
/**
|
|
569
|
+
* @description The unqiue ID for this financial transaction assigned by the MNO.
|
|
570
|
+
*/
|
|
571
|
+
correspondentIds: Record<string, string>;
|
|
572
|
+
suspiciousActivityReport: {
|
|
573
|
+
activityTypw: string;
|
|
574
|
+
comment: string;
|
|
575
|
+
}[];
|
|
576
|
+
failureReason: {
|
|
577
|
+
failureCode: string;
|
|
578
|
+
failureMessage: string;
|
|
579
|
+
};
|
|
580
|
+
metadata: Record<string, unknown>;
|
|
339
581
|
};
|
|
340
582
|
type RequestPayoutConfig = {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
583
|
+
/**
|
|
584
|
+
* @description A UUIDv4 based ID specified by you, that uniquely identifies the payout.
|
|
585
|
+
* Required string length: 36
|
|
586
|
+
* @example payoutId: "<INSERT_UUID_FOR_PAYOUT>"
|
|
587
|
+
*/
|
|
588
|
+
payoutId: string;
|
|
589
|
+
/**
|
|
590
|
+
* @description The amount to be disbursed for the payout.
|
|
591
|
+
*
|
|
592
|
+
* Amount must follow the same requirements as in DepositConfig.
|
|
593
|
+
* Valid examples: 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5
|
|
594
|
+
* Not valid examples: 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32
|
|
595
|
+
* Required string length: 1 - 23
|
|
596
|
+
* @example "15"
|
|
597
|
+
*/
|
|
598
|
+
amount: string;
|
|
599
|
+
/**
|
|
600
|
+
* @description The currency in which the amount is specified.
|
|
601
|
+
* Format must be the ISO 4217 three character currency code in upper case.
|
|
602
|
+
* @example "MWK"
|
|
603
|
+
*/
|
|
604
|
+
currency: string;
|
|
605
|
+
/**
|
|
606
|
+
* @description The correspondent code refers to the specific MMO that the recipient has an active mobile money wallet with.
|
|
607
|
+
* @example "AIRTEL_MWI"
|
|
608
|
+
*/
|
|
609
|
+
correspondent: string;
|
|
610
|
+
/**
|
|
611
|
+
* @description The phone number (MSISDN) of the recipient.
|
|
612
|
+
* Format: Only digits, no whitespaces or separators, no leading zero, must include country code.
|
|
613
|
+
* @example "265999123456"
|
|
614
|
+
*/
|
|
615
|
+
recipient: string;
|
|
616
|
+
/**
|
|
617
|
+
* @description The timestamp of when the payout was created in the pawaPay platform.
|
|
618
|
+
* Format defined by 'date-time' in RFC3339 section 5.6.
|
|
619
|
+
* @example "2020-02-21T17:32:28Z"
|
|
620
|
+
*/
|
|
621
|
+
customerTimestamp: string;
|
|
622
|
+
/**
|
|
623
|
+
* @description Short description for the transaction, visible to the customer in SMS or transaction history.
|
|
624
|
+
* Must be between 4 and 22 alphanumeric characters.
|
|
625
|
+
* @example "Note of 4 to 22 chars"
|
|
626
|
+
*/
|
|
627
|
+
statementDescription: string;
|
|
628
|
+
/**
|
|
629
|
+
* @description The country in which the MMO operates. ISO 3166-1 alpha-3 code in upper case.
|
|
630
|
+
* @example "MWI"
|
|
631
|
+
*/
|
|
632
|
+
country: string;
|
|
633
|
+
/**
|
|
634
|
+
* @description A list of metadata for providing additional context about the payout. Up to 10 fields allowed.
|
|
635
|
+
* @example [{ fieldName: "orderId", fieldValue: "ORD-123456789", isPII: false }]
|
|
636
|
+
*/
|
|
637
|
+
metadata: Array<{
|
|
638
|
+
fieldName: string;
|
|
639
|
+
fieldValue: string;
|
|
640
|
+
isPII?: boolean;
|
|
641
|
+
}>;
|
|
400
642
|
};
|
|
401
643
|
type BaseRequestPayoutResponse = {
|
|
402
|
-
|
|
403
|
-
|
|
644
|
+
payoutId: string;
|
|
645
|
+
status: string;
|
|
404
646
|
};
|
|
405
647
|
type AcceptedRequestPayout = BaseRequestPayoutResponse & {
|
|
406
|
-
|
|
407
|
-
|
|
648
|
+
status: "ACCEPTED";
|
|
649
|
+
created: string;
|
|
408
650
|
};
|
|
409
651
|
type DuplicateIgnoredRequestPayout = BaseRequestPayoutResponse & {
|
|
410
|
-
|
|
411
|
-
|
|
652
|
+
status: "DUPLICATE_IGNORED";
|
|
653
|
+
created: string;
|
|
412
654
|
};
|
|
413
655
|
type RejectedRequestPayout = BaseRequestPayoutResponse & {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
656
|
+
status: "REJECTED";
|
|
657
|
+
rejectionReason: {
|
|
658
|
+
rejectionCode: string;
|
|
659
|
+
rejectionMessage: string;
|
|
660
|
+
};
|
|
419
661
|
};
|
|
420
662
|
type RequestPayoutRespose = AcceptedRequestPayout | DuplicateIgnoredRequestPayout | RejectedRequestPayout;
|
|
421
663
|
type PayoutCallback = {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
};
|
|
433
|
-
};
|
|
434
|
-
customerTimestamp: string;
|
|
435
|
-
statementDescription: string;
|
|
436
|
-
created: string;
|
|
437
|
-
receivedByRecipient: string;
|
|
438
|
-
correspondentIds: {};
|
|
439
|
-
failureReason: {
|
|
440
|
-
failureCode: string;
|
|
441
|
-
failureMessage: string;
|
|
664
|
+
payoutId: string;
|
|
665
|
+
status: string;
|
|
666
|
+
amount: string;
|
|
667
|
+
currency: string;
|
|
668
|
+
country: string;
|
|
669
|
+
correspondent: string;
|
|
670
|
+
recipient: {
|
|
671
|
+
type: string;
|
|
672
|
+
address: {
|
|
673
|
+
value: string;
|
|
442
674
|
};
|
|
443
|
-
|
|
675
|
+
};
|
|
676
|
+
customerTimestamp: string;
|
|
677
|
+
statementDescription: string;
|
|
678
|
+
created: string;
|
|
679
|
+
receivedByRecipient: string;
|
|
680
|
+
correspondentIds: Record<string, string>;
|
|
681
|
+
failureReason: {
|
|
682
|
+
failureCode: string;
|
|
683
|
+
failureMessage: string;
|
|
684
|
+
};
|
|
685
|
+
metadata: Record<string, string>;
|
|
444
686
|
};
|
|
445
687
|
type CheckPayoutStatusBase = {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
};
|
|
688
|
+
payoutId: string;
|
|
689
|
+
status: string;
|
|
690
|
+
amount: string;
|
|
691
|
+
currency: string;
|
|
692
|
+
country: string;
|
|
693
|
+
correspondent: string;
|
|
694
|
+
recipient: {
|
|
695
|
+
type: string;
|
|
696
|
+
address: {
|
|
697
|
+
value: string;
|
|
457
698
|
};
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
699
|
+
};
|
|
700
|
+
customerTimestamp: string;
|
|
701
|
+
statementDescription: string;
|
|
702
|
+
created: string;
|
|
703
|
+
metadata: Record<string, unknown>;
|
|
462
704
|
};
|
|
463
705
|
type CheckPayoutStatusAccepted = CheckPayoutStatusBase & {
|
|
464
|
-
|
|
465
|
-
|
|
706
|
+
status: "ACCEPTED";
|
|
707
|
+
created: string;
|
|
466
708
|
};
|
|
467
709
|
type CheckPayoutStatusCompleted = CheckPayoutStatusBase & {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
710
|
+
status: "COMPLETED";
|
|
711
|
+
receivedByRecipient: string;
|
|
712
|
+
correspondentIds: Record<string, string>;
|
|
471
713
|
};
|
|
472
714
|
type CheckPayoutStatusSubmitted = CheckPayoutStatusBase & {
|
|
473
|
-
|
|
474
|
-
|
|
715
|
+
status: "SUBMITTED";
|
|
716
|
+
created: string;
|
|
475
717
|
};
|
|
476
718
|
type CheckPayoutStatusEnqueued = CheckPayoutStatusBase & {
|
|
477
|
-
|
|
478
|
-
|
|
719
|
+
status: "ENQUEUED";
|
|
720
|
+
created: string;
|
|
479
721
|
};
|
|
480
722
|
type CheckPayoutStatusSFailed = CheckPayoutStatusBase & {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
723
|
+
status: "FAILED";
|
|
724
|
+
failureReason: {
|
|
725
|
+
failureCode: string;
|
|
726
|
+
failureMessage: string;
|
|
727
|
+
};
|
|
728
|
+
created: string;
|
|
487
729
|
};
|
|
488
730
|
type CheckPayoutStatusResponse = CheckPayoutStatusAccepted | CheckPayoutStatusCompleted | CheckPayoutStatusSubmitted | CheckPayoutStatusEnqueued | CheckPayoutStatusSFailed;
|
|
489
731
|
type CancelEnqueuedPayoutBase = {
|
|
490
|
-
|
|
491
|
-
|
|
732
|
+
payoutId: string;
|
|
733
|
+
status: string;
|
|
492
734
|
};
|
|
493
735
|
type CancelEnqueuedPayoutAccepted = CancelEnqueuedPayoutBase & {
|
|
494
|
-
|
|
495
|
-
|
|
736
|
+
status: "ACCEPTED";
|
|
737
|
+
created: string;
|
|
496
738
|
};
|
|
497
739
|
type CancelEnqueuedPayoutRejected = CancelEnqueuedPayoutBase & {
|
|
498
|
-
|
|
499
|
-
|
|
740
|
+
status: "REJECTED";
|
|
741
|
+
failureReason: string;
|
|
500
742
|
};
|
|
501
743
|
type CancelEnqueuedPayoutFailed = CancelEnqueuedPayoutBase & {
|
|
502
|
-
|
|
744
|
+
status: "FAILED";
|
|
503
745
|
};
|
|
504
746
|
type CancelEnqueuedPayoutResponse = CancelEnqueuedPayoutAccepted | CancelEnqueuedPayoutRejected | CancelEnqueuedPayoutFailed;
|
|
505
747
|
type RequestBulkPayoutConfig = {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
};
|
|
748
|
+
payoutId: string;
|
|
749
|
+
amount: string;
|
|
750
|
+
currency: string;
|
|
751
|
+
country: string;
|
|
752
|
+
correspondent: string;
|
|
753
|
+
recipient: {
|
|
754
|
+
type: string;
|
|
755
|
+
address: {
|
|
756
|
+
value: string;
|
|
516
757
|
};
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
758
|
+
};
|
|
759
|
+
customerTimestamp: string;
|
|
760
|
+
statementDescription: string;
|
|
761
|
+
metadata: Array<{
|
|
762
|
+
fieldName: string;
|
|
763
|
+
fieldValue: string;
|
|
764
|
+
isPII: boolean;
|
|
765
|
+
}>;
|
|
524
766
|
};
|
|
525
767
|
type RequestBuildPayoutResponseBase = {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
768
|
+
payoutId: string;
|
|
769
|
+
status: string;
|
|
770
|
+
created: string;
|
|
529
771
|
};
|
|
530
772
|
type RequestBuildPayoutResponseAccepted = RequestBuildPayoutResponseBase & {
|
|
531
|
-
|
|
532
|
-
|
|
773
|
+
status: "ACCEPTED";
|
|
774
|
+
created: string;
|
|
533
775
|
};
|
|
534
776
|
type RequestBuildPayoutResponseDuplicateIgnored = RequestBuildPayoutResponseBase & {
|
|
535
|
-
|
|
777
|
+
status: "DUPLICATE_IGNORED";
|
|
536
778
|
};
|
|
537
779
|
type RequestBuildPayoutResponseRejected = RequestBuildPayoutResponseBase & {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
780
|
+
status: "REJECTED";
|
|
781
|
+
failureReason: {
|
|
782
|
+
rejectionCode: string;
|
|
783
|
+
rejectionMessage: string;
|
|
784
|
+
};
|
|
543
785
|
};
|
|
544
786
|
type RequestBuildPayoutResponse = RequestBuildPayoutResponseAccepted | RequestBuildPayoutResponseDuplicateIgnored | RequestBuildPayoutResponseRejected;
|
|
545
|
-
type ResendPayoutCallbackBase = {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
};
|
|
549
|
-
type ResendPayoutCallbackAccepted = ResendPayoutCallbackBase & {
|
|
550
|
-
|
|
551
|
-
};
|
|
552
|
-
type ResendPayoutCallbackRejected = ResendPayoutCallbackBase & {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
};
|
|
556
|
-
type ResendPayoutCallbackFailed = ResendPayoutCallbackBase & {
|
|
557
|
-
|
|
558
|
-
};
|
|
559
|
-
type ResendPayoutCallbackResponse = ResendPayoutCallbackAccepted | ResendPayoutCallbackRejected | ResendPayoutCallbackFailed;
|
|
560
|
-
type RequestPayPageConfig = {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
};
|
|
683
|
-
type RequestRefundConfig = {
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
};
|
|
751
|
-
type RequestPayPageResponse = {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
};
|
|
765
|
-
type PawaPayError = {
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
};
|
|
787
|
-
type AcceptedDeposit = {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
};
|
|
805
|
-
type DuplicatedIgnoredDeposit = {
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
};
|
|
823
|
-
type RejectedDeposit = {
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
};
|
|
864
|
-
type DepositResponse = AcceptedDeposit | DuplicatedIgnoredDeposit | RejectedDeposit;
|
|
865
|
-
type CheckStatusBaseResponse = {
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
787
|
+
type ResendPayoutCallbackBase = {
|
|
788
|
+
payoutId: string;
|
|
789
|
+
status: string;
|
|
790
|
+
};
|
|
791
|
+
type ResendPayoutCallbackAccepted = ResendPayoutCallbackBase & {
|
|
792
|
+
status: "ACCEPTED";
|
|
793
|
+
};
|
|
794
|
+
type ResendPayoutCallbackRejected = ResendPayoutCallbackBase & {
|
|
795
|
+
status: "REJECTED";
|
|
796
|
+
failureReason: string;
|
|
797
|
+
};
|
|
798
|
+
type ResendPayoutCallbackFailed = ResendPayoutCallbackBase & {
|
|
799
|
+
status: "FAILED";
|
|
800
|
+
};
|
|
801
|
+
type ResendPayoutCallbackResponse = ResendPayoutCallbackAccepted | ResendPayoutCallbackRejected | ResendPayoutCallbackFailed;
|
|
802
|
+
type RequestPayPageConfig = {
|
|
803
|
+
/**
|
|
804
|
+
* A UUIDv4 based ID specified by you, that uniquely identifies the deposit.
|
|
805
|
+
*
|
|
806
|
+
* Required string length: 36
|
|
807
|
+
* @example depositId: "<INSERT_UUID_FOR_DEPOSIT>"
|
|
808
|
+
*/
|
|
809
|
+
depositId: string;
|
|
810
|
+
/**
|
|
811
|
+
* The URL to which the user will be redirected after completion of the operation.
|
|
812
|
+
*
|
|
813
|
+
* @example returnUrl: "https://merchant.com/paymentProcessed"
|
|
814
|
+
*/
|
|
815
|
+
returnUrl: string;
|
|
816
|
+
/**
|
|
817
|
+
* @description Short description for the transaction.
|
|
818
|
+
*
|
|
819
|
+
* Depending on the specific MMO performing the transaction this message may be visible to the customer in the SMS receipt or within their transaction history.
|
|
820
|
+
*
|
|
821
|
+
* Must be between 4 and 22 alphanumeric characters.
|
|
822
|
+
*
|
|
823
|
+
* Required string length: 4 - 22
|
|
824
|
+
*
|
|
825
|
+
* @example Example: "Note of 4 to 22 chars"
|
|
826
|
+
*/
|
|
827
|
+
statementDescription?: string;
|
|
828
|
+
/**
|
|
829
|
+
* If specified, the amount will be displayed to the customer as the payment amount. For example, when paying for specific goods or services.
|
|
830
|
+
*
|
|
831
|
+
* If not specified, the customer will have to specify the amount they wish to pay. For example, when depositing money into their eWallet.
|
|
832
|
+
*
|
|
833
|
+
* Amount must follow below requirements or the request will be rejected:
|
|
834
|
+
*
|
|
835
|
+
* - Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
|
|
836
|
+
*
|
|
837
|
+
* - The minimum and maximum amounts depend on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
|
|
838
|
+
* - Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
|
|
839
|
+
* - Trailing zeroes are permitted.
|
|
840
|
+
*
|
|
841
|
+
* Valid examples:
|
|
842
|
+
* 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5
|
|
843
|
+
*
|
|
844
|
+
* Not valid examples:
|
|
845
|
+
* 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32
|
|
846
|
+
*
|
|
847
|
+
* Required string length: 1 - 23
|
|
848
|
+
*
|
|
849
|
+
* @example amount: "15"
|
|
850
|
+
*/
|
|
851
|
+
amount?: string;
|
|
852
|
+
/**
|
|
853
|
+
* @description The phone number (MSISDN) of the payer or recipient.
|
|
854
|
+
*
|
|
855
|
+
* The format is described in {@link https://en.wikipedia.org/wiki/MSISDN | Wikipedia}.
|
|
856
|
+
*
|
|
857
|
+
* MSISDN validation has following rules:
|
|
858
|
+
*
|
|
859
|
+
* - Only digits without whitespaces or any other separators or prefixes like '+'
|
|
860
|
+
* - Should not start with zero.
|
|
861
|
+
* - Country code is mandatory.
|
|
862
|
+
* - Should not exceed or be less than the valid length of specified country.
|
|
863
|
+
* - Valid examples for Malawi: 265999123456
|
|
864
|
+
*
|
|
865
|
+
* Not valid examples for Malawi:
|
|
866
|
+
* +265999123456, +2650999123456, 265 999 123 456, 265-9991-23456, 0265999123456,
|
|
867
|
+
*
|
|
868
|
+
* @example {value: "265 999 123 678"}
|
|
869
|
+
*
|
|
870
|
+
*/
|
|
871
|
+
msisdn: string;
|
|
872
|
+
/**
|
|
873
|
+
* The language in which the Payment Page will be presented to the customer. If the user has explicitly changed their languages preferences, their selection will override this parameter.
|
|
874
|
+
*
|
|
875
|
+
* Available options: EN, FR
|
|
876
|
+
*
|
|
877
|
+
* @example language: "EN"
|
|
878
|
+
*/
|
|
879
|
+
language?: string;
|
|
880
|
+
/**
|
|
881
|
+
* @description The country in which the MMO operates.
|
|
882
|
+
*
|
|
883
|
+
* Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements | Wikipedia}.
|
|
884
|
+
*
|
|
885
|
+
* @example Example: "MWI"
|
|
886
|
+
*/
|
|
887
|
+
country?: string;
|
|
888
|
+
/**
|
|
889
|
+
* Optional text which will be displayed to the customer on the payment page to specify what they are paying for.
|
|
890
|
+
*
|
|
891
|
+
* Required string length: 1 - 50
|
|
892
|
+
*
|
|
893
|
+
* @example reason: "Ticket to festival"
|
|
894
|
+
*/
|
|
895
|
+
reason?: string;
|
|
896
|
+
/**
|
|
897
|
+
* @description A list of metadata that you can attach to the payment for providing additional context about the payment.
|
|
898
|
+
*
|
|
899
|
+
* For example, adding orderId to indicate for which order this payment was for or customerId to know which customer this payment pertains to.
|
|
900
|
+
*
|
|
901
|
+
* Metadata will not be visible to the customer that is party to this payment.
|
|
902
|
+
* It will be visible in the pawaPay Dashboard on the payment details page and in your financial statements as a JSON object to support automated reconciliation.\
|
|
903
|
+
* It is also possible to search for recent payments in the pawaPay Dashboard using global search based on the values of metadata.
|
|
904
|
+
*
|
|
905
|
+
* Up to 10 metadata fields can be attached to a payment.
|
|
906
|
+
*
|
|
907
|
+
*
|
|
908
|
+
* @param {string} metadata.fieldName - The name of the metadata that you are attaching to the payment.
|
|
909
|
+
* @example {fieldName: "orderId"}
|
|
910
|
+
*
|
|
911
|
+
*
|
|
912
|
+
* @param {string} metadata.metadata.fieldValue - The value for this metadata field
|
|
913
|
+
* @example {fieldValue: "ORD-123456789"}
|
|
914
|
+
*
|
|
915
|
+
*
|
|
916
|
+
* @param {boolean} metadata.isPII - Indicates whether the field contains personally identifiable information. Used for enabling compliance with GDPR or other relevant data privacy laws.
|
|
917
|
+
* @example {isPII: true}
|
|
918
|
+
*/
|
|
919
|
+
metadata?: Array<{
|
|
920
|
+
fieldName: string;
|
|
921
|
+
fieldValue: string;
|
|
922
|
+
isPII?: boolean;
|
|
923
|
+
}>;
|
|
924
|
+
};
|
|
925
|
+
type RequestRefundConfig = {
|
|
926
|
+
/**
|
|
927
|
+
*@description A UUIDv4 based ID specified by you, that uniquely identifies the refund.
|
|
928
|
+
*
|
|
929
|
+
* Required string length: 36
|
|
930
|
+
*
|
|
931
|
+
* @example refundId:"<INSERT_UUID_FOR_REFUND>"
|
|
932
|
+
*/
|
|
933
|
+
refundId: string;
|
|
934
|
+
/**
|
|
935
|
+
* @description The depositId of the deposit to be refunded.
|
|
936
|
+
*
|
|
937
|
+
* Required string length: 36
|
|
938
|
+
*
|
|
939
|
+
* @example depositId:"<INSERT_UUID_OF_DEPOSIT_TO_REFUND>"
|
|
940
|
+
*/
|
|
941
|
+
depositId: string;
|
|
942
|
+
/**
|
|
943
|
+
* @description The amount to be collected (deposit) or disbursed (payout or refund).
|
|
944
|
+
*
|
|
945
|
+
* Amount must follow below requirements or the request will be rejected:
|
|
946
|
+
*
|
|
947
|
+
* - Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
|
|
948
|
+
*
|
|
949
|
+
* - The minimum and maximum amounts depend on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
|
|
950
|
+
* - Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
|
|
951
|
+
* - Trailing zeroes are permitted.
|
|
952
|
+
*
|
|
953
|
+
* Valid examples:
|
|
954
|
+
* 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5
|
|
955
|
+
*
|
|
956
|
+
* Not valid examples:
|
|
957
|
+
* 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32
|
|
958
|
+
*
|
|
959
|
+
* Required string length: 1 - 23
|
|
960
|
+
*
|
|
961
|
+
* @example amount: "15"
|
|
962
|
+
*/
|
|
963
|
+
amount?: string;
|
|
964
|
+
/**
|
|
965
|
+
* @description A list of metadata that you can attach to the payment for providing additional context about the payment.
|
|
966
|
+
*
|
|
967
|
+
* For example, adding orderId to indicate for which order this payment was for or customerId to know which customer this payment pertains to.
|
|
968
|
+
*
|
|
969
|
+
* Metadata will not be visible to the customer that is party to this payment.
|
|
970
|
+
* It will be visible in the pawaPay Dashboard on the payment details page and in your financial statements as a JSON object to support automated reconciliation.\
|
|
971
|
+
* It is also possible to search for recent payments in the pawaPay Dashboard using global search based on the values of metadata.
|
|
972
|
+
*
|
|
973
|
+
* Up to 10 metadata fields can be attached to a payment.
|
|
974
|
+
*
|
|
975
|
+
*
|
|
976
|
+
* @param {string} metadata.fieldName - The name of the metadata that you are attaching to the payment.
|
|
977
|
+
* @example {fieldName: "orderId"}
|
|
978
|
+
*
|
|
979
|
+
*
|
|
980
|
+
* @param {string} metadata.metadata.fieldValue - The value for this metadata field
|
|
981
|
+
* @example {fieldValue: "ORD-123456789"}
|
|
982
|
+
*
|
|
983
|
+
*
|
|
984
|
+
* @param {boolean} metadata.isPII - Indicates whether the field contains personally identifiable information. Used for enabling compliance with GDPR or other relevant data privacy laws.
|
|
985
|
+
* @example {isPII: true}
|
|
986
|
+
*/
|
|
987
|
+
metadata?: Array<{
|
|
988
|
+
fieldName: string;
|
|
989
|
+
fieldValue: string;
|
|
990
|
+
isPII?: boolean;
|
|
991
|
+
}>;
|
|
992
|
+
};
|
|
993
|
+
type RequestPayPageResponse = {
|
|
994
|
+
/**
|
|
995
|
+
* @description The unique URL of the payment page for this specific payment session.
|
|
996
|
+
*
|
|
997
|
+
* Customer has to be forwarded to this URL where they can complete the payment.
|
|
998
|
+
* The session is valid for 15 minutes for the customer to complete the payment.
|
|
999
|
+
*
|
|
1000
|
+
* Please note! The URL is valid for 5 minutes.
|
|
1001
|
+
*
|
|
1002
|
+
* @example
|
|
1003
|
+
* redirectUrl: "https://paywith.pawapay.io/?token=AgV4aA3ZxKfGcdMIo6a6Upf7X2MRptdFUrc6Oi3U53CxC0YAkAADABVhd3MtY3J5cHRv"
|
|
1004
|
+
*/
|
|
1005
|
+
redirectUrl: string;
|
|
1006
|
+
};
|
|
1007
|
+
type PawaPayError = {
|
|
1008
|
+
/**
|
|
1009
|
+
* @description A unique error ID in the pawaPay platform.
|
|
1010
|
+
*
|
|
1011
|
+
* Maximum length: 36
|
|
1012
|
+
*
|
|
1013
|
+
* @example errorId: "63743264-7292-11ea-bc55-0242ac130003"
|
|
1014
|
+
*
|
|
1015
|
+
*/
|
|
1016
|
+
errorId?: string;
|
|
1017
|
+
/**
|
|
1018
|
+
* @description pawaPay internal error code.
|
|
1019
|
+
* @example errorCode: 1
|
|
1020
|
+
*/
|
|
1021
|
+
errorCode?: number;
|
|
1022
|
+
/**
|
|
1023
|
+
* @description Error message.
|
|
1024
|
+
*
|
|
1025
|
+
* @example errorMessage: "Internal error"
|
|
1026
|
+
*/
|
|
1027
|
+
errorMessage?: string;
|
|
1028
|
+
};
|
|
1029
|
+
type AcceptedDeposit = {
|
|
1030
|
+
/**
|
|
1031
|
+
* @description The depositId of the deposit transaction.
|
|
1032
|
+
*
|
|
1033
|
+
* Required string length: 36
|
|
1034
|
+
* @example depositId: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
|
|
1035
|
+
*/
|
|
1036
|
+
depositId: string;
|
|
1037
|
+
/**
|
|
1038
|
+
* @description The deposit request has been accepted by pawaPay for processing.
|
|
1039
|
+
*/
|
|
1040
|
+
status: "ACCEPTED";
|
|
1041
|
+
/**
|
|
1042
|
+
* ISO Date String
|
|
1043
|
+
* @example "2020-10-19T11:17:01Z"
|
|
1044
|
+
*/
|
|
1045
|
+
created: string;
|
|
1046
|
+
};
|
|
1047
|
+
type DuplicatedIgnoredDeposit = {
|
|
1048
|
+
/**
|
|
1049
|
+
* @description The depositId of the deposit transaction.
|
|
1050
|
+
*
|
|
1051
|
+
* Required string length: 36
|
|
1052
|
+
* @example depositId: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
|
|
1053
|
+
*/
|
|
1054
|
+
depositId: string;
|
|
1055
|
+
/**
|
|
1056
|
+
* @description The deposit request has been ignored as a duplicate of an already accepted deposit request. Duplication logic relies upon depositId.
|
|
1057
|
+
*/
|
|
1058
|
+
status: "DUPLICATE_IGNORED";
|
|
1059
|
+
/**
|
|
1060
|
+
* ISO Date String
|
|
1061
|
+
* @example "2020-10-19T11:17:01Z"
|
|
1062
|
+
*/
|
|
1063
|
+
created: string;
|
|
1064
|
+
};
|
|
1065
|
+
type RejectedDeposit = {
|
|
1066
|
+
/**
|
|
1067
|
+
* @description The depositId of the deposit transaction.
|
|
1068
|
+
*
|
|
1069
|
+
* Required string length: 36
|
|
1070
|
+
* @example depositId: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
|
|
1071
|
+
*/
|
|
1072
|
+
depositId: string;
|
|
1073
|
+
/**
|
|
1074
|
+
* @description The deposit request has been rejected. See rejectionReason for details.
|
|
1075
|
+
*/
|
|
1076
|
+
status: "REJECTED";
|
|
1077
|
+
rejectionReason: {
|
|
1078
|
+
/**
|
|
1079
|
+
* @description Possible deposit rejection codes:
|
|
1080
|
+
*
|
|
1081
|
+
* - INVALID_PAYER_FORMAT - The payer address (phone number) is invalid.
|
|
1082
|
+
* - INVALID_CORRESPONDENT - The specified correspondent is not supported.
|
|
1083
|
+
* - INVALID_AMOUNT - The specified amount is not supported.
|
|
1084
|
+
* - AMOUNT_TOO_SMALL - The specified amount is smaller than the minimum allowed by the MMO specified as the correspondent.
|
|
1085
|
+
* - AMOUNT_TOO_LARGE - The specified amount is larger than the maximum allowed by the MMO specified as the correspondent.
|
|
1086
|
+
* - INVALID_CURRENCY - The specified currency is not supported for the MMO specified as the correspondent.
|
|
1087
|
+
* - INVALID_COUNTRY - The specified country is not supported for this MMO specified as the correspondent.
|
|
1088
|
+
* - PARAMETER_INVALID - One or more parameters are invalid.
|
|
1089
|
+
* - INVALID_INPUT - We were unable to parse the payload of the request.
|
|
1090
|
+
* - DEPOSITS_NOT_ALLOWED - Deposits are not allowed for the merchant or the MMO specified as the correspondent.
|
|
1091
|
+
* - CORRESPONDENT_TEMPORARILY_UNAVAILABLE - The MMO specified as the correspondent is currently experiencing an outage and processing of payments has been temporarily halted.
|
|
1092
|
+
*
|
|
1093
|
+
* Please refer to our {@link https://status.pawapay.io/ | Status Page} for live information about MMO availability.
|
|
1094
|
+
*
|
|
1095
|
+
* @example rejectionCode: "INVALID_AMOUNT"
|
|
1096
|
+
*
|
|
1097
|
+
*/
|
|
1098
|
+
rejectionCode: "INVALID_PAYER_FORMAT" | "INVALID_CORRESPONDENT" | "INVALID_AMOUNT" | "AMOUNT_TOO_SMALL" | "AMOUNT_TOO_LARGE" | "INVALID_CURRENCY" | "INVALID_COUNTRY" | "PARAMETER_INVALID" | "INVALID_INPUT" | "DEPOSITS_NOT_ALLOWED" | "CORRESPONDENT_TEMPORARILY_UNAVAILABLE";
|
|
1099
|
+
/**
|
|
1100
|
+
* Additional optional rejection message
|
|
1101
|
+
* @example rejectionMessage: "You don't have access to this correspondent"
|
|
1102
|
+
*/
|
|
1103
|
+
rejectionMessage: string;
|
|
1104
|
+
};
|
|
1105
|
+
};
|
|
1106
|
+
type DepositResponse = AcceptedDeposit | DuplicatedIgnoredDeposit | RejectedDeposit;
|
|
1107
|
+
type CheckStatusBaseResponse = {
|
|
1108
|
+
/**
|
|
1109
|
+
* A UUIDv4 based ID specified by you, that uniquely identifies the deposit.
|
|
1110
|
+
*
|
|
1111
|
+
* Required string length: 36
|
|
1112
|
+
*
|
|
1113
|
+
* @example depositId: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
|
|
1114
|
+
*/
|
|
1115
|
+
depositId: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* The amount to be collected (deposit) or disbursed (payout or refund).
|
|
1118
|
+
*
|
|
1119
|
+
* Amount must follow below requirements or the request will be rejected:
|
|
1120
|
+
* Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
|
|
1121
|
+
* The minimum and maximum amount depends on the limits of the specific MMO. You can find them from the Active Configuration endpoint.\
|
|
1122
|
+
* Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
|
|
1123
|
+
* Trailing zeroes are permitted.
|
|
1124
|
+
*
|
|
1125
|
+
* Valid examples:
|
|
1126
|
+
* 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5
|
|
1127
|
+
*
|
|
1128
|
+
* Not valid examples:
|
|
1129
|
+
* 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32
|
|
1130
|
+
*
|
|
1131
|
+
* Required string length: 1 - 23
|
|
1132
|
+
*
|
|
1133
|
+
* @example requestedAmount: "15"
|
|
1134
|
+
*/
|
|
1135
|
+
requestedAmout: string;
|
|
1136
|
+
/**
|
|
1137
|
+
* @description The currency in which the amount is specified.
|
|
1138
|
+
*
|
|
1139
|
+
* Format must be the ISO 4217 three character currency code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_4217#Active_codes |Wikipedia}.
|
|
1140
|
+
*
|
|
1141
|
+
* You can find all the supported currencies that the specific correspondent supports {@link https://docs.pawapay.io/using_the_api#correspondents | from here}.
|
|
1142
|
+
*
|
|
1143
|
+
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account together with the currencies.
|
|
1144
|
+
*
|
|
1145
|
+
* @example Example: "MWK"
|
|
1146
|
+
*/
|
|
1147
|
+
currency: string;
|
|
1148
|
+
/**
|
|
1149
|
+
* @description The country in which the MMO operates.
|
|
1150
|
+
*
|
|
1151
|
+
* Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements | Wikipedia}.
|
|
1152
|
+
*
|
|
1153
|
+
* @example Example: "MWI"
|
|
1154
|
+
*/
|
|
1155
|
+
country: string;
|
|
1156
|
+
/**
|
|
1157
|
+
* @description The correspondent code refers to the specific MMO that the specified phone number (MSISDN) has an active mobile money wallet with.
|
|
1158
|
+
*
|
|
1159
|
+
* You can find all the supported correspondents {@link https://docs.pawapay.io/using_the_api#correspondents | listed here}.
|
|
1160
|
+
*
|
|
1161
|
+
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account.
|
|
1162
|
+
*
|
|
1163
|
+
* You can use the {@link https://docs.pawapay.io/v1/api-reference/toolkit/predict-correspondent | predict correspondent} enpoint to predict the correct correspondent to use based on the phone number (MSISDN).
|
|
1164
|
+
*
|
|
1165
|
+
* @example
|
|
1166
|
+
* Example: "AIRTEL_MWI"
|
|
1167
|
+
*/
|
|
1168
|
+
correspondent: string;
|
|
1169
|
+
/**
|
|
1170
|
+
* @description The phone number (MSISDN) of the recipient or payer must be specified as the `value` of the `address`.
|
|
1171
|
+
*/
|
|
1172
|
+
payer: {
|
|
1173
|
+
/** @description The type of financial address. At the moment, only MSISDN is supported as the financial address.
|
|
923
1174
|
* @example
|
|
924
|
-
*
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
/**
|
|
928
|
-
* @description The phone number (MSISDN) of the recipient or payer must be specified as the `value` of the `address`.
|
|
1175
|
+
* {
|
|
1176
|
+
* type: "MSISDN"
|
|
1177
|
+
* }
|
|
929
1178
|
*/
|
|
930
|
-
|
|
931
|
-
/** @description The type of financial address. At the moment, only MSISDN is supported as the financial address.
|
|
932
|
-
* @example
|
|
933
|
-
* {
|
|
934
|
-
* type: "MSISDN"
|
|
935
|
-
* }
|
|
936
|
-
*/
|
|
937
|
-
type: "MSISDN" & string;
|
|
938
|
-
/**
|
|
939
|
-
* @description The phone number (MSISDN) of the payer or recipient.
|
|
940
|
-
*
|
|
941
|
-
* The format is described in {@link https://en.wikipedia.org/wiki/MSISDN | Wikipedia}.
|
|
942
|
-
*
|
|
943
|
-
* MSISDN validation has following rules:
|
|
944
|
-
*
|
|
945
|
-
* - Only digits without whitespaces or any other separators or prefixes like '+'
|
|
946
|
-
* - Should not start with zero.
|
|
947
|
-
* - Country code is mandatory.
|
|
948
|
-
* - Should not exceed or be less than the valid length of specified country.
|
|
949
|
-
* - Valid examples for Malawi: 265999123456
|
|
950
|
-
*
|
|
951
|
-
* Not valid examples for Malawi:
|
|
952
|
-
* +265999123456, +2650999123456, 265 999 123 456, 265-9991-23456, 0265999123456,
|
|
953
|
-
*
|
|
954
|
-
* @example {value: "260763456789"}
|
|
955
|
-
*
|
|
956
|
-
*/
|
|
957
|
-
address: {
|
|
958
|
-
value: string;
|
|
959
|
-
};
|
|
960
|
-
};
|
|
1179
|
+
type: "MSISDN" & string;
|
|
961
1180
|
/**
|
|
962
|
-
* @description The
|
|
1181
|
+
* @description The phone number (MSISDN) of the payer or recipient.
|
|
963
1182
|
*
|
|
964
|
-
*
|
|
1183
|
+
* The format is described in {@link https://en.wikipedia.org/wiki/MSISDN | Wikipedia}.
|
|
965
1184
|
*
|
|
966
|
-
*
|
|
967
|
-
*/
|
|
968
|
-
customerTimestamp: string;
|
|
969
|
-
/**
|
|
970
|
-
* @description Short description for the transaction.
|
|
1185
|
+
* MSISDN validation has following rules:
|
|
971
1186
|
*
|
|
972
|
-
*
|
|
1187
|
+
* - Only digits without whitespaces or any other separators or prefixes like '+'
|
|
1188
|
+
* - Should not start with zero.
|
|
1189
|
+
* - Country code is mandatory.
|
|
1190
|
+
* - Should not exceed or be less than the valid length of specified country.
|
|
1191
|
+
* - Valid examples for Malawi: 265999123456
|
|
973
1192
|
*
|
|
974
|
-
*
|
|
1193
|
+
* Not valid examples for Malawi:
|
|
1194
|
+
* +265999123456, +2650999123456, 265 999 123 456, 265-9991-23456, 0265999123456,
|
|
975
1195
|
*
|
|
976
|
-
*
|
|
1196
|
+
* @example {value: "260763456789"}
|
|
977
1197
|
*
|
|
978
|
-
* @example Example: "Note of 4 to 22 chars"
|
|
979
|
-
*/
|
|
980
|
-
statementDescription: string;
|
|
981
|
-
/**
|
|
982
|
-
* ISO Date String
|
|
983
|
-
* @example "2020-10-19T11:17:01Z"
|
|
984
1198
|
*/
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
1199
|
+
address: {
|
|
1200
|
+
value: string;
|
|
1201
|
+
};
|
|
1202
|
+
};
|
|
1203
|
+
/**
|
|
1204
|
+
* @description The timestamp of when the deposit was created in the pawaPay platform.
|
|
1205
|
+
*
|
|
1206
|
+
* Format defined by 'date-time' in RFC3339 section 5.6 from {@link https://tools.ietf.org/html/rfc3339#section-5.6 | IETF}
|
|
1207
|
+
*
|
|
1208
|
+
* @example Example:"2020-02-21T17:32:28Z"
|
|
1209
|
+
*/
|
|
1210
|
+
customerTimestamp: string;
|
|
1211
|
+
/**
|
|
1212
|
+
* @description Short description for the transaction.
|
|
1213
|
+
*
|
|
1214
|
+
* Depending on the specific MMO performing the transaction this message may be visible to the customer in the SMS receipt or within their transaction history.
|
|
1215
|
+
*
|
|
1216
|
+
* Must be between 4 and 22 alphanumeric characters.
|
|
1217
|
+
*
|
|
1218
|
+
* Required string length: 4 - 22
|
|
1219
|
+
*
|
|
1220
|
+
* @example Example: "Note of 4 to 22 chars"
|
|
1221
|
+
*/
|
|
1222
|
+
statementDescription: string;
|
|
1223
|
+
/**
|
|
1224
|
+
* ISO Date String
|
|
1225
|
+
* @example "2020-10-19T11:17:01Z"
|
|
1226
|
+
*/
|
|
1227
|
+
created: string;
|
|
1228
|
+
/**
|
|
1229
|
+
* @description The metadata that was provided in the original initation request in a JSON object format.
|
|
1230
|
+
*/
|
|
1231
|
+
metadata: Record<string, unknown>;
|
|
990
1232
|
};
|
|
991
1233
|
type CompletedStatus = CheckStatusBaseResponse & {
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1234
|
+
/**
|
|
1235
|
+
* @description The payout request has been successfully processed. This is a Final state.
|
|
1236
|
+
*/
|
|
1237
|
+
status: "COMPLETED";
|
|
1238
|
+
/**
|
|
1239
|
+
* @description The amount to be collected (deposit) or disbursed (payout or refund).
|
|
1240
|
+
*
|
|
1241
|
+
* Amount must follow below requirements or the request will be rejected:
|
|
1242
|
+
*
|
|
1243
|
+
* Between zero and two decimal places can be supplied, depending on what the specific MMO supports. Learn about all MMO supported decimal places.
|
|
1244
|
+
* The minimum and maximum amount depends on the limits of the specific MMO. You can find them from the Active Configuration endpoint.
|
|
1245
|
+
* Leading zeroes are not permitted except where the value is less than 1. For any value less than one, one and only one leading zero must be supplied.
|
|
1246
|
+
* Trailing zeroes are permitted.
|
|
1247
|
+
*
|
|
1248
|
+
* Valid examples:
|
|
1249
|
+
* 5, 5.0, 5.00, 5.5, 5.55, 5555555, 0.5
|
|
1250
|
+
*
|
|
1251
|
+
* Not valid examples:
|
|
1252
|
+
*
|
|
1253
|
+
* 5., 5.555, 5555555555555555555, .5, -5.5, 00.5, 00.00, 00001.32
|
|
1254
|
+
*
|
|
1255
|
+
* Required string length: 1 - 23
|
|
1256
|
+
*
|
|
1257
|
+
* @example depositedAmount: "15"
|
|
1258
|
+
*/
|
|
1259
|
+
depositedAmount: string;
|
|
1260
|
+
/**
|
|
1261
|
+
* When the MMO responded to this deposit request. Format defined by 'date-time' in RFC3339 section 5.6 from IETF
|
|
1262
|
+
*
|
|
1263
|
+
* @example
|
|
1264
|
+
* respondedByPayer: "2020-02-21T17:32:30Z"
|
|
1265
|
+
*/
|
|
1266
|
+
respondedByPayer: string;
|
|
1267
|
+
/**
|
|
1268
|
+
* @description The unique ID for this financial transaction assigned by the MMO.
|
|
1269
|
+
* @example
|
|
1270
|
+
* {
|
|
1271
|
+
"MTN_INIT": "ABC123",
|
|
1272
|
+
"MTN_FINAL": "DEF456"
|
|
1273
|
+
}
|
|
1274
|
+
*/
|
|
1275
|
+
correspondentIds: {
|
|
1276
|
+
[key: string]: string;
|
|
1277
|
+
};
|
|
1036
1278
|
};
|
|
1037
1279
|
type AcceptedStatus = CheckStatusBaseResponse & {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1280
|
+
/**
|
|
1281
|
+
* @description The payout request has been accepted by pawaPay for processing.
|
|
1282
|
+
*/
|
|
1283
|
+
status: "ACCEPTED";
|
|
1042
1284
|
};
|
|
1043
1285
|
type EnqueuedStatus = CheckStatusBaseResponse & {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1286
|
+
/**
|
|
1287
|
+
* @description The payout request has been accepted, but has been enqueued for processing later. Read more about {@link https://docs.pawapay.io/payouts#enqueued-payouts | enqueued payouts}.
|
|
1288
|
+
*/
|
|
1289
|
+
status: "ENQUEUED";
|
|
1048
1290
|
};
|
|
1049
1291
|
type SubmittedStatus = CheckStatusBaseResponse & {
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1292
|
+
/**
|
|
1293
|
+
* @description The payout request has been submitted to the MMO and is being processed.
|
|
1294
|
+
*/
|
|
1295
|
+
status: "SUBMITTED";
|
|
1054
1296
|
};
|
|
1055
1297
|
type FailedStatus = CheckStatusBaseResponse & {
|
|
1298
|
+
/**
|
|
1299
|
+
* @description The payout request has been processed, but failed. Final state.
|
|
1300
|
+
*/
|
|
1301
|
+
status: "FAILED";
|
|
1302
|
+
failureReason: {
|
|
1056
1303
|
/**
|
|
1057
|
-
* @description
|
|
1304
|
+
* @description Possible deposit failure codes:
|
|
1305
|
+
*
|
|
1306
|
+
* - PAYER_NOT_FOUND - The phone number specified as the Payer does not belong to the MMO specified as the correspondent.
|
|
1307
|
+
* - PAYMENT_NOT_APPROVED - Payer did not approve the payment.
|
|
1308
|
+
* - PAYER_LIMIT_REACHED - Payer has reached a transaction limit of their mobile money wallet.
|
|
1309
|
+
* - INSUFFICIENT_BALANCE - Payer does not have enough funds.
|
|
1310
|
+
* - TRANSACTION_ALREADY_IN_PROCESS - Payer already has an unfinalized transaction being processed by the MMO.
|
|
1311
|
+
* - OTHER_ERROR - Any other error. Please refer to failureMessage.
|
|
1312
|
+
*
|
|
1313
|
+
* @example failureCode: "OTHER_ERROR"
|
|
1058
1314
|
*/
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
* - PAYER_LIMIT_REACHED - Payer has reached a transaction limit of their mobile money wallet.
|
|
1067
|
-
* - INSUFFICIENT_BALANCE - Payer does not have enough funds.
|
|
1068
|
-
* - TRANSACTION_ALREADY_IN_PROCESS - Payer already has an unfinalized transaction being processed by the MMO.
|
|
1069
|
-
* - OTHER_ERROR - Any other error. Please refer to failureMessage.
|
|
1070
|
-
*
|
|
1071
|
-
* @example failureCode: "OTHER_ERROR"
|
|
1072
|
-
*/
|
|
1073
|
-
failureCode: "PAYER_NOT_FOUND" | "PAYMENT_NOT_APPROVED" | "PAYER_LIMIT_REACHED" | "INSUFFICIENT_BALANCE" | "TRANSACTION_ALREADY_IN_PROCESS" | "OTHER_ERROR";
|
|
1074
|
-
/**
|
|
1075
|
-
* @description Additional optional failure message
|
|
1076
|
-
* @example failureMessage: "Recipient's address is blocked"
|
|
1077
|
-
*/
|
|
1078
|
-
failureMessage: string;
|
|
1079
|
-
};
|
|
1315
|
+
failureCode: "PAYER_NOT_FOUND" | "PAYMENT_NOT_APPROVED" | "PAYER_LIMIT_REACHED" | "INSUFFICIENT_BALANCE" | "TRANSACTION_ALREADY_IN_PROCESS" | "OTHER_ERROR";
|
|
1316
|
+
/**
|
|
1317
|
+
* @description Additional optional failure message
|
|
1318
|
+
* @example failureMessage: "Recipient's address is blocked"
|
|
1319
|
+
*/
|
|
1320
|
+
failureMessage: string;
|
|
1321
|
+
};
|
|
1080
1322
|
};
|
|
1081
1323
|
type DepositStatus = CompletedStatus | AcceptedStatus | EnqueuedStatus | SubmittedStatus | FailedStatus;
|
|
1082
1324
|
type ResendDepositBase = {
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1325
|
+
/**
|
|
1326
|
+
* @description A UUIDv4 based ID specified by you, that uniquely identifies the deposit.
|
|
1327
|
+
*
|
|
1328
|
+
* Required string length: 36
|
|
1329
|
+
*
|
|
1330
|
+
* @example depositId: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
|
|
1331
|
+
*/
|
|
1332
|
+
despositId: string;
|
|
1091
1333
|
};
|
|
1092
1334
|
type ResendDepositAccepted = ResendDepositBase & {
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1335
|
+
/**
|
|
1336
|
+
*@description The manual action request has been accepted by pawaPay for processing. */
|
|
1337
|
+
status: "ACCEPTED";
|
|
1096
1338
|
};
|
|
1097
1339
|
type ResendDepositRejected = ResendDepositBase & {
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1340
|
+
/**
|
|
1341
|
+
*@description The manual action request has been rejected by pawaPay. See rejectionReason for details. */
|
|
1342
|
+
status: "REJECTED";
|
|
1343
|
+
/**
|
|
1344
|
+
* @description Human-readable explanation why request has been rejected
|
|
1345
|
+
* @example rejectionReason:"Deposit with ID \\#f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found"
|
|
1346
|
+
*/
|
|
1347
|
+
rejectionReason: string;
|
|
1106
1348
|
};
|
|
1107
1349
|
type ResendDepositFailed = ResendDepositBase & {
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1350
|
+
/**
|
|
1351
|
+
*@description The manual action request has failed during submitting for processing due to internal reasons. */
|
|
1352
|
+
status: "FAILED";
|
|
1111
1353
|
};
|
|
1112
1354
|
type ResendDepositResponse = ResendDepositAccepted | ResendDepositRejected | ResendDepositFailed;
|
|
1113
1355
|
type AcceptedRefund = {
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1356
|
+
/**
|
|
1357
|
+
* @description The refundId of the deposit transaction.
|
|
1358
|
+
*
|
|
1359
|
+
* Required string length: 36
|
|
1360
|
+
* @example depositId: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
|
|
1361
|
+
*/
|
|
1362
|
+
refundId: string;
|
|
1363
|
+
/**
|
|
1364
|
+
* @description The refund request has been accepted by pawaPay for processing.
|
|
1365
|
+
*/
|
|
1366
|
+
status: "ACCEPTED";
|
|
1367
|
+
/**
|
|
1368
|
+
* ISO Date String
|
|
1369
|
+
* @example "2020-10-19T11:17:01Z"
|
|
1370
|
+
*/
|
|
1371
|
+
created: string;
|
|
1130
1372
|
};
|
|
1131
1373
|
type DuplicatedIgnoredRefund = {
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1374
|
+
/**
|
|
1375
|
+
* @description The refundId of the deposit transaction.
|
|
1376
|
+
*
|
|
1377
|
+
* Required string length: 36
|
|
1378
|
+
* @example depositId: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
|
|
1379
|
+
*/
|
|
1380
|
+
depositId: string;
|
|
1381
|
+
/**
|
|
1382
|
+
* @description The refund request has been ignored as a duplicate of an already accepted refund request. Duplication logic relies upon refundId.
|
|
1383
|
+
*/
|
|
1384
|
+
status: "DUPLICATE_IGNORED";
|
|
1385
|
+
/**
|
|
1386
|
+
* ISO Date String
|
|
1387
|
+
* @example "2020-10-19T11:17:01Z"
|
|
1388
|
+
*/
|
|
1389
|
+
created: string;
|
|
1148
1390
|
};
|
|
1149
1391
|
type RejectedRefund = {
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1392
|
+
/**
|
|
1393
|
+
* @description The refundId of the deposit transaction.
|
|
1394
|
+
*
|
|
1395
|
+
* Required string length: 36
|
|
1396
|
+
* @example depositId: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
|
|
1397
|
+
*/
|
|
1398
|
+
refundId: string;
|
|
1399
|
+
/**
|
|
1400
|
+
* @description The refund request has been rejected by pawaPay. See rejectionReason for details.
|
|
1401
|
+
*/
|
|
1402
|
+
status: "REJECTED";
|
|
1403
|
+
rejectionReason: {
|
|
1404
|
+
/**
|
|
1405
|
+
* @description Possible deposit rejection codes:
|
|
1406
|
+
*
|
|
1407
|
+
* - DEPOSIT_NOT_FOUND- Requested deposit for refund has not been found.
|
|
1408
|
+
* - DEPOSIT_NOT_COMPLETED- Requested deposit was not completed.
|
|
1409
|
+
* - ALREADY_REFUNDED- Requested deposit has been already refunded.
|
|
1410
|
+
* - IN_PROGRESS- Another refund transaction is already in progress.
|
|
1411
|
+
* - INVALID_AMOUNT- The specified amount is not supported.
|
|
1412
|
+
* - AMOUNT_TOO_SMALL - The specified amount is smaller than the minimum allowed by the MMO specified as the correspondent.
|
|
1413
|
+
* - AMOUNT_TOO_LARGE - The specified amount is larger than the maximum allowed by the MMO specified as the correspondent.
|
|
1414
|
+
* - INVALID_CURRENCY - The specified currency is not supported by the MMO specified as the correspondent.
|
|
1415
|
+
* - INVALID_COUNTRY - The specified country is not supported for the MMO specified as the correspondent.
|
|
1416
|
+
* - PARAMETER_INVALID - One or more parameters are invalid.
|
|
1417
|
+
* - INVALID_INPUT - We were unable to parse the payload of the request.
|
|
1418
|
+
* - REFUNDS_NOT_ALLOWED - Refunds are not allowed for this merchant or the MMO specified as the correspondent.
|
|
1419
|
+
* - CORRESPONDENT_TEMPORARILY_UNAVAILABLE - The MMO specified as the correspondent is currently experiencing an outage and processing of payments has been temporarily halted.
|
|
1420
|
+
*
|
|
1421
|
+
* Please refer to our {@link https://status.pawapay.io/ | Status Page} for live information about MMO availability.
|
|
1422
|
+
*
|
|
1423
|
+
* @example rejectionCode: "INVALID_AMOUNT"
|
|
1424
|
+
*
|
|
1425
|
+
*/
|
|
1426
|
+
rejectionCode: "DEPOSIT_NOT_FOUND" | "DEPOSIT_NOT_COMPLETED" | "ALREADY_REFUNDED" | "IN_PROGRESS" | "INVALID_AMOUNT" | "AMOUNT_TOO_SMALL" | "AMOUNT_TOO_LARGE" | "PARAMETER_INVALID" | "INVALID_INPUT" | "REFUNDS_NOT_ALLOWED" | "CORRESPONDENT_TEMPORARILY_UNAVAILABLE";
|
|
1427
|
+
/**
|
|
1428
|
+
* Additional optional rejection message
|
|
1429
|
+
* @example rejectionMessage: "You don't have access to this correspondent"
|
|
1430
|
+
*/
|
|
1431
|
+
rejectionMessage: string;
|
|
1432
|
+
};
|
|
1191
1433
|
};
|
|
1192
1434
|
type RequestRefundResponse = AcceptedRefund | RejectedRefund | DuplicatedIgnoredRefund;
|
|
1193
1435
|
type ResendRefundBase = {
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1436
|
+
/**
|
|
1437
|
+
* @description The refundId of the refund transaction.
|
|
1438
|
+
*
|
|
1439
|
+
* Required string length: 36
|
|
1440
|
+
*
|
|
1441
|
+
* @example refundId: "f4401bd2-1568-4140-bf2d-eb77d2b2b639"
|
|
1442
|
+
*/
|
|
1443
|
+
refundId: string;
|
|
1202
1444
|
};
|
|
1203
1445
|
type ResendRefundAccepted = ResendRefundBase & {
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1446
|
+
/**
|
|
1447
|
+
*@description The manual action request has been accepted by pawaPay for processing. */
|
|
1448
|
+
status: "ACCEPTED";
|
|
1207
1449
|
};
|
|
1208
1450
|
type ResendRefundRejected = ResendRefundBase & {
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1451
|
+
/**
|
|
1452
|
+
*@description The manual action request has been rejected by pawaPay. See rejectionReason for details. */
|
|
1453
|
+
status: "REJECTED";
|
|
1454
|
+
/**
|
|
1455
|
+
* @description Human-readable explanation why request has been rejected
|
|
1456
|
+
* @example rejectionReason:"Refund with ID \\#f4401bd2-1568-4140-bf2d-eb77d2b2b639 not found"
|
|
1457
|
+
*/
|
|
1458
|
+
rejectionReason: string;
|
|
1217
1459
|
};
|
|
1218
1460
|
type ResendRefundFailed = ResendRefundBase & {
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1461
|
+
/**
|
|
1462
|
+
*@description The manual action request has failed during submitting for processing due to internal reasons. */
|
|
1463
|
+
status: "FAILED";
|
|
1222
1464
|
};
|
|
1223
1465
|
type ResendRefundCallbackResponse = ResendRefundAccepted | ResendRefundRejected | ResendRefundFailed;
|
|
1224
1466
|
type CheckRefundStatusBase = {
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
};
|
|
1467
|
+
refundId: string;
|
|
1468
|
+
status: string;
|
|
1469
|
+
amount: string;
|
|
1470
|
+
currency: string;
|
|
1471
|
+
country: string;
|
|
1472
|
+
correspondent: string;
|
|
1473
|
+
recipient: {
|
|
1474
|
+
type: string;
|
|
1475
|
+
address: {
|
|
1476
|
+
value: string;
|
|
1236
1477
|
};
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1478
|
+
};
|
|
1479
|
+
customerTimestamp: string;
|
|
1480
|
+
statementDescription: string;
|
|
1481
|
+
created: string;
|
|
1482
|
+
metadata: Record<string, unknown>;
|
|
1241
1483
|
};
|
|
1242
1484
|
type CheckRefundStatusCompleted = CheckRefundStatusBase & {
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1485
|
+
status: "COMPLETED";
|
|
1486
|
+
receivedByRecipient: string;
|
|
1487
|
+
correspondentIds: Record<string, unknown>;
|
|
1246
1488
|
};
|
|
1247
1489
|
type CheckRefundStatusAccepted = CheckRefundStatusBase & {
|
|
1248
|
-
|
|
1490
|
+
status: "ACCEPTED";
|
|
1249
1491
|
};
|
|
1250
1492
|
type CheckRefundStatusSubmitted = CheckRefundStatusBase & {
|
|
1251
|
-
|
|
1493
|
+
status: "SUBMITTED";
|
|
1252
1494
|
};
|
|
1253
1495
|
type CheckRefundStatusFailed = CheckRefundStatusBase & {
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1496
|
+
status: "FAILED";
|
|
1497
|
+
failureReason: {
|
|
1498
|
+
failureCode: string;
|
|
1499
|
+
failureMessage: string;
|
|
1500
|
+
};
|
|
1259
1501
|
};
|
|
1260
1502
|
type CheckRefundStatusResponse = CheckRefundStatusCompleted | CheckRefundStatusAccepted | CheckRefundStatusSubmitted | CheckRefundStatusFailed;
|
|
1261
1503
|
type RefundCallback = {
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
};
|
|
1504
|
+
refundId: string;
|
|
1505
|
+
status: string;
|
|
1506
|
+
amount: string;
|
|
1507
|
+
currency: string;
|
|
1508
|
+
country: string;
|
|
1509
|
+
correspondent: string;
|
|
1510
|
+
recipient: {
|
|
1511
|
+
type: string;
|
|
1512
|
+
address: {
|
|
1513
|
+
value: string;
|
|
1273
1514
|
};
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1515
|
+
};
|
|
1516
|
+
customerTimestamp: string;
|
|
1517
|
+
statementDescription: string;
|
|
1518
|
+
created: string;
|
|
1519
|
+
receivedByRecipient: string;
|
|
1520
|
+
correspondentIds: Record<string, unknown>;
|
|
1521
|
+
failureReason: {
|
|
1522
|
+
failureCode: string;
|
|
1523
|
+
failureMessage: string;
|
|
1524
|
+
};
|
|
1525
|
+
metadata: Record<string, unknown>;
|
|
1284
1526
|
};
|
|
1285
1527
|
type WalletBalance = {
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1528
|
+
balances: {
|
|
1529
|
+
/**
|
|
1530
|
+
* @description The country in which the MMO operates.
|
|
1531
|
+
*
|
|
1532
|
+
* Format is ISO 3166-1 alpha-3, three character country code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements | Wikipedia}.
|
|
1533
|
+
*
|
|
1534
|
+
* @example Example: "MWI"
|
|
1535
|
+
*/
|
|
1536
|
+
country: string;
|
|
1537
|
+
/**
|
|
1538
|
+
* @description The current balance of the wallet.
|
|
1539
|
+
*
|
|
1540
|
+
* @example balance: "1000.0"
|
|
1541
|
+
*/
|
|
1542
|
+
balance: string;
|
|
1543
|
+
/**
|
|
1544
|
+
* @description The currency in which the amount is specified.
|
|
1545
|
+
*
|
|
1546
|
+
* Format must be the ISO 4217 three character currency code in upper case. Read more from {@link https://en.wikipedia.org/wiki/ISO_4217#Active_codes |Wikipedia}.
|
|
1547
|
+
*
|
|
1548
|
+
* You can find all the supported currencies that the specific correspondent supports {@link https://docs.pawapay.io/using_the_api#correspondents | from here}.
|
|
1549
|
+
*
|
|
1550
|
+
* The {@link https://docs.pawapay.io/v1/api-reference/toolkit/active-configuration | active configuration} endpoint provides the list of correspondents configured for your account together with the currencies.
|
|
1551
|
+
*
|
|
1552
|
+
* @example Example: "MWK"
|
|
1553
|
+
*/
|
|
1554
|
+
currency: string;
|
|
1555
|
+
/**
|
|
1556
|
+
* @example If you are using a wallet that is only used by a single MMO, that MMO-s correspondent code will be shown here.
|
|
1557
|
+
*
|
|
1558
|
+
* @example mno: "AIRTEL_MWI"
|
|
1559
|
+
*/
|
|
1560
|
+
mno: string;
|
|
1561
|
+
}[];
|
|
1320
1562
|
};
|
|
1321
1563
|
type OperationalType = {
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1564
|
+
operationType: string;
|
|
1565
|
+
minTransactionLimit: string;
|
|
1566
|
+
maxTransactionLimit: string;
|
|
1325
1567
|
};
|
|
1326
1568
|
type Correspondent = {
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1569
|
+
correspondent: string;
|
|
1570
|
+
currency: string;
|
|
1571
|
+
ownerName: string;
|
|
1572
|
+
operationTypes: Array<OperationalType>;
|
|
1331
1573
|
};
|
|
1332
1574
|
interface Countries<T> {
|
|
1333
|
-
|
|
1334
|
-
|
|
1575
|
+
country: string;
|
|
1576
|
+
correspondents: Array<T>;
|
|
1335
1577
|
}
|
|
1336
1578
|
type ActiveConfigurationResponse = {
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1579
|
+
merchantId: string;
|
|
1580
|
+
merchantName: string;
|
|
1581
|
+
countries: Array<Countries<Correspondent>>;
|
|
1340
1582
|
};
|
|
1341
1583
|
type CorrespondentOperationalType = {
|
|
1342
|
-
|
|
1343
|
-
|
|
1584
|
+
operationType: "DEPOSIT" | "PAYOUT";
|
|
1585
|
+
status: "OPERATIONAL" | "DELAYED" | "CLOSED";
|
|
1344
1586
|
};
|
|
1345
1587
|
type CorrespondentData = {
|
|
1346
|
-
|
|
1347
|
-
|
|
1588
|
+
correspondent: string;
|
|
1589
|
+
operationalType: Array<CorrespondentOperationalType>;
|
|
1348
1590
|
};
|
|
1349
|
-
interface AvailableCorrespondentResponse extends Countries<CorrespondentData> {
|
|
1350
|
-
}
|
|
1591
|
+
interface AvailableCorrespondentResponse extends Countries<CorrespondentData> {}
|
|
1351
1592
|
interface PredictCorrespondentResponse {
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1593
|
+
country: string;
|
|
1594
|
+
operator: string;
|
|
1595
|
+
correspondent: string;
|
|
1596
|
+
msisdn: string;
|
|
1356
1597
|
}
|
|
1357
1598
|
type PublicKeysResponse = {
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
};
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
}): Promise<PawaPayResponse<RequestBuildPayoutResponse[], PawaPayError>>;
|
|
1400
|
-
requestRefund(refundConfig: RequestRefundConfig, { options }?: {
|
|
1401
|
-
options?: RequestOptions;
|
|
1402
|
-
}): Promise<PawaPayResponse<RequestRefundResponse, PawaPayError>>;
|
|
1403
|
-
checkRefundStatus(refundId: string, { options }?: {
|
|
1404
|
-
options?: RequestOptions;
|
|
1405
|
-
}): Promise<PawaPayResponse<CheckRefundStatusResponse[], PawaPayError>>;
|
|
1406
|
-
resendRefundCallback(refundId: string, { options }?: {
|
|
1407
|
-
options?: RequestOptions;
|
|
1408
|
-
}): Promise<PawaPayResponse<ResendRefundCallbackResponse, PawaPayError>>;
|
|
1409
|
-
requestPaymentPage(payload: RequestPayPageConfig, { options }?: {
|
|
1410
|
-
options?: RequestOptions;
|
|
1411
|
-
}): Promise<PawaPayResponse<RequestPayPageResponse, PawaPayError>>;
|
|
1412
|
-
checkWalletBalances({ options }?: {
|
|
1413
|
-
options?: RequestOptions;
|
|
1414
|
-
}): Promise<PawaPayResponse<WalletBalance, PawaPayError>>;
|
|
1415
|
-
checkWalletBalancesByCountry(country: string, { options }?: {
|
|
1416
|
-
options?: RequestOptions;
|
|
1417
|
-
}): Promise<PawaPayResponse<WalletBalance, PawaPayError>>;
|
|
1418
|
-
getActiveConfiguration({ options }?: {
|
|
1419
|
-
options?: RequestOptions;
|
|
1420
|
-
}): Promise<PawaPayResponse<ActiveConfigurationResponse, PawaPayError>>;
|
|
1421
|
-
getAvailableCorrespondent({ options }?: {
|
|
1422
|
-
options?: RequestOptions;
|
|
1423
|
-
}): Promise<PawaPayResponse<AvailableCorrespondentResponse[], PawaPayError>>;
|
|
1424
|
-
predictCorrespondent(msisdn: string, { options }?: {
|
|
1425
|
-
options?: RequestOptions;
|
|
1426
|
-
}): Promise<PawaPayResponse<PredictCorrespondentResponse, PawaPayError>>;
|
|
1427
|
-
getPublicKey({ options }?: {
|
|
1428
|
-
options?: RequestOptions;
|
|
1429
|
-
}): Promise<PawaPayResponse<PublicKeysResponse[], PawaPayError>>;
|
|
1599
|
+
/**
|
|
1600
|
+
* @description The ID of the public key. */
|
|
1601
|
+
id: string;
|
|
1602
|
+
/**
|
|
1603
|
+
* @description The public key to use when verifying the signature in a callback sent by pawaPay. */
|
|
1604
|
+
key: string;
|
|
1605
|
+
};
|
|
1606
|
+
//#endregion
|
|
1607
|
+
//#region src/types/v2/active-conf.t.d.ts
|
|
1608
|
+
type OperationTypeCode = "DEPOSIT" | "PAYOUT" | "REFUND" | "REMITTANCE" | "USSD_DEPOSIT" | "NAME_LOOKUP";
|
|
1609
|
+
type OperationStatus = "OPERATIONAL" | "DELAYED" | "CLOSED";
|
|
1610
|
+
type DecimalsInAmount = "NONE" | "FIXED" | "VARIABLE";
|
|
1611
|
+
type AuthType = "PROVIDER_AUTH";
|
|
1612
|
+
type PinPromptType = "AUTOMATIC" | "MANUAL";
|
|
1613
|
+
type ChannelType = "USSD";
|
|
1614
|
+
interface ActiveConfiguration {
|
|
1615
|
+
companyName: string;
|
|
1616
|
+
signatureConfiguration: SignatureConfiguration;
|
|
1617
|
+
countries: Country[];
|
|
1618
|
+
}
|
|
1619
|
+
interface SignatureConfiguration {
|
|
1620
|
+
signedRequestsOnly: boolean;
|
|
1621
|
+
signedCallbacks: boolean;
|
|
1622
|
+
}
|
|
1623
|
+
interface DisplayName {
|
|
1624
|
+
en: string;
|
|
1625
|
+
fr: string;
|
|
1626
|
+
}
|
|
1627
|
+
interface Country {
|
|
1628
|
+
country: string;
|
|
1629
|
+
displayName: DisplayName;
|
|
1630
|
+
prefix: string;
|
|
1631
|
+
flag: string;
|
|
1632
|
+
providers: Provider[];
|
|
1633
|
+
}
|
|
1634
|
+
interface Provider {
|
|
1635
|
+
provider: string;
|
|
1636
|
+
displayName: string;
|
|
1637
|
+
logo: string;
|
|
1638
|
+
nameDisplayedToCustomer: string;
|
|
1639
|
+
currencies: Currency[];
|
|
1430
1640
|
}
|
|
1431
|
-
|
|
1432
|
-
|
|
1641
|
+
interface Currency {
|
|
1642
|
+
currency: string;
|
|
1643
|
+
displayName: string;
|
|
1644
|
+
operationTypes: OperationType[];
|
|
1645
|
+
}
|
|
1646
|
+
interface OperationType {
|
|
1647
|
+
operationType: OperationTypeCode;
|
|
1648
|
+
config?: DepositConfig$1;
|
|
1649
|
+
minTransactionLimit?: string;
|
|
1650
|
+
maxTransactionLimit?: string;
|
|
1651
|
+
decimalsInAmount?: DecimalsInAmount;
|
|
1652
|
+
status?: OperationStatus;
|
|
1653
|
+
callbackUrl?: string;
|
|
1654
|
+
}
|
|
1655
|
+
interface PinPromptInstructions {
|
|
1656
|
+
channels: Channel[];
|
|
1657
|
+
}
|
|
1658
|
+
interface Channel {
|
|
1659
|
+
type: ChannelType;
|
|
1660
|
+
displayName: DisplayName;
|
|
1661
|
+
quickLink: string;
|
|
1662
|
+
variables: Variables;
|
|
1663
|
+
instructions: Instructions;
|
|
1664
|
+
}
|
|
1665
|
+
interface Variables {
|
|
1666
|
+
shortCode: string;
|
|
1667
|
+
}
|
|
1668
|
+
interface Instructions {
|
|
1669
|
+
en: Instruction[];
|
|
1670
|
+
fr: Instruction[];
|
|
1671
|
+
}
|
|
1672
|
+
interface Instruction {
|
|
1673
|
+
text: string;
|
|
1674
|
+
template: string;
|
|
1675
|
+
}
|
|
1676
|
+
interface DepositConfig$1 {
|
|
1677
|
+
authType: AuthType;
|
|
1678
|
+
pinPrompt: PinPromptType;
|
|
1679
|
+
pinPromptRevivable: boolean;
|
|
1680
|
+
pinPromptInstructions: PinPromptInstructions;
|
|
1681
|
+
}
|
|
1682
|
+
//#endregion
|
|
1683
|
+
//#region src/types/v2/payouts.t.d.ts
|
|
1684
|
+
type ResendPayoutCallbackResponse_v2 = {
|
|
1685
|
+
remittanceId: string;
|
|
1686
|
+
status: "ACCEPTED";
|
|
1687
|
+
} | {
|
|
1688
|
+
remittanceId: string;
|
|
1689
|
+
status: "REJECTED";
|
|
1690
|
+
failureReason: {
|
|
1691
|
+
failureCode: "NOT_FOUND" | "INVALID_STATE";
|
|
1692
|
+
failureMessage: string;
|
|
1693
|
+
};
|
|
1694
|
+
};
|
|
1695
|
+
type CancelEnqueuedPayoutResponse_v2 = {
|
|
1696
|
+
remittanceId: string;
|
|
1697
|
+
status: "ACCEPTED";
|
|
1698
|
+
} | {
|
|
1699
|
+
remittanceId: string;
|
|
1700
|
+
status: "REJECTED";
|
|
1701
|
+
failureReason: {
|
|
1702
|
+
failureCode: "NOT_FOUND" | "INVALID_STATE";
|
|
1703
|
+
failureMessage: string;
|
|
1704
|
+
};
|
|
1705
|
+
};
|
|
1706
|
+
type RequestPayoutConfig_v2 = {
|
|
1707
|
+
payoutId: string;
|
|
1708
|
+
recipient: {
|
|
1709
|
+
type: "MMO";
|
|
1710
|
+
accountDetails: {
|
|
1711
|
+
phoneNumber: string;
|
|
1712
|
+
provider: string;
|
|
1713
|
+
};
|
|
1714
|
+
};
|
|
1715
|
+
amount: string;
|
|
1716
|
+
currency: string;
|
|
1717
|
+
clientReferenceId: string;
|
|
1718
|
+
customerMessage: string;
|
|
1719
|
+
metadata: Array<Record<string, unknown>>;
|
|
1720
|
+
};
|
|
1721
|
+
type RequestPayoutResponse_v2 = {
|
|
1722
|
+
payoutId: string;
|
|
1723
|
+
status: "ACCEPTED" | "DUPLICATE_IGNORED";
|
|
1724
|
+
created: string;
|
|
1725
|
+
} | {
|
|
1726
|
+
payoutId: string;
|
|
1727
|
+
status: "REJECTED";
|
|
1728
|
+
failureReason: {
|
|
1729
|
+
failureCode: "PROVIDER_TEMPORARILY_UNAVAILABLE" | "INVALID_PHONE_NUMBER" | "INVALID_CURRENCY" | "INVALID_AMOUNT" | "AMOUNT_OUT_OF_BOUNDS";
|
|
1730
|
+
failureMessage: string;
|
|
1731
|
+
};
|
|
1732
|
+
};
|
|
1733
|
+
type CheckPayoutData_v2 = {
|
|
1734
|
+
payoutId: string;
|
|
1735
|
+
amount: string;
|
|
1736
|
+
currency: string;
|
|
1737
|
+
country: string;
|
|
1738
|
+
recipient: {
|
|
1739
|
+
type: "MMO";
|
|
1740
|
+
accountDetails: {
|
|
1741
|
+
phoneNumber: string;
|
|
1742
|
+
provider: string;
|
|
1743
|
+
};
|
|
1744
|
+
};
|
|
1745
|
+
clientReferenceId: string;
|
|
1746
|
+
customerMessage: string;
|
|
1747
|
+
created: string;
|
|
1748
|
+
metadata: object;
|
|
1749
|
+
} & ({
|
|
1750
|
+
status: "COMPLETED";
|
|
1751
|
+
providerTransactionId: string;
|
|
1752
|
+
} | {
|
|
1753
|
+
status: "FAILED";
|
|
1754
|
+
failureReason: {
|
|
1755
|
+
failureCode: "RECIPIENT_NOT_FOUND";
|
|
1756
|
+
failureMessage: string;
|
|
1757
|
+
};
|
|
1758
|
+
} | {
|
|
1759
|
+
status: "ACCEPTED" | "PROCESSING" | "IN_RECONCILIATION";
|
|
1760
|
+
});
|
|
1761
|
+
type CheckPayoutStatus_v2 = {
|
|
1762
|
+
status: "FOUND";
|
|
1763
|
+
data: CheckPayoutData_v2;
|
|
1764
|
+
} | {
|
|
1765
|
+
status: "NOT_FOUND";
|
|
1766
|
+
};
|
|
1767
|
+
type BulkPayoutResponse_v2 = ({
|
|
1768
|
+
payoutId: string;
|
|
1769
|
+
status: "ACCEPTED" | "DUPLICATE_IGNORED";
|
|
1770
|
+
created: string;
|
|
1771
|
+
} | {
|
|
1772
|
+
payoutId: string;
|
|
1773
|
+
status: "REJECTED";
|
|
1774
|
+
failureReason: {
|
|
1775
|
+
failureCode: string;
|
|
1776
|
+
failureMessage: string;
|
|
1777
|
+
};
|
|
1778
|
+
})[];
|
|
1779
|
+
//#endregion
|
|
1780
|
+
//#region src/types/v2/paypage.t.d.ts
|
|
1781
|
+
type RequestPayPageConfig_v2 = {
|
|
1782
|
+
depositId: string;
|
|
1783
|
+
returnUrl: string;
|
|
1784
|
+
customerMessage: string;
|
|
1785
|
+
amountDetails: {
|
|
1786
|
+
amount: string;
|
|
1787
|
+
currency: string;
|
|
1788
|
+
};
|
|
1789
|
+
phoneNumber: string;
|
|
1790
|
+
language: string;
|
|
1791
|
+
country: string;
|
|
1792
|
+
reason: string;
|
|
1793
|
+
metadata: Array<Record<string, unknown>>;
|
|
1794
|
+
};
|
|
1795
|
+
//#endregion
|
|
1796
|
+
//#region src/types/v2/refunds.t.d.ts
|
|
1797
|
+
type RequestRefundConfig_v2 = {
|
|
1798
|
+
refundId: string;
|
|
1799
|
+
depositId: string;
|
|
1800
|
+
amount: string;
|
|
1801
|
+
currency: string;
|
|
1802
|
+
clientReferenceId: string;
|
|
1803
|
+
metadata: Array<Record<string, unknown>>;
|
|
1804
|
+
};
|
|
1805
|
+
type RequestRefundResponse_v2 = {
|
|
1806
|
+
refundId: string;
|
|
1807
|
+
status: "ACCEPTED";
|
|
1808
|
+
created: string;
|
|
1809
|
+
} | {
|
|
1810
|
+
refundId: string;
|
|
1811
|
+
status: "DUPLICATE_IGNORED";
|
|
1812
|
+
created: string;
|
|
1813
|
+
} | {
|
|
1814
|
+
refundId: string;
|
|
1815
|
+
status: "REJECTED";
|
|
1816
|
+
failureReason: {
|
|
1817
|
+
failureCode: "PROVIDER_TEMPORARILY_UNAVAILABLE" | "INVALID_PHONE_NUMBER" | "INVALID_CURRENCY" | "INVALID_AMOUNT" | "AMOUNT_OUT_OF_BOUNDS";
|
|
1818
|
+
failureMessage: string;
|
|
1819
|
+
};
|
|
1820
|
+
};
|
|
1821
|
+
type RefundStatusResponse_v2 = {
|
|
1822
|
+
status: "FOUND";
|
|
1823
|
+
data: {
|
|
1824
|
+
refundId: string;
|
|
1825
|
+
status: "COMPLETED" | "ACCEPTED";
|
|
1826
|
+
amount: string;
|
|
1827
|
+
currency: string;
|
|
1828
|
+
country: string;
|
|
1829
|
+
recipient: {
|
|
1830
|
+
type: "MMO";
|
|
1831
|
+
accountDetails: {
|
|
1832
|
+
phoneNumber: string;
|
|
1833
|
+
provider: string;
|
|
1834
|
+
};
|
|
1835
|
+
};
|
|
1836
|
+
clientReferenceId: string;
|
|
1837
|
+
customerMessage: string;
|
|
1838
|
+
created: string;
|
|
1839
|
+
providerTransactionId?: string;
|
|
1840
|
+
metadata: {
|
|
1841
|
+
orderId: string;
|
|
1842
|
+
customerId: string;
|
|
1843
|
+
};
|
|
1844
|
+
};
|
|
1845
|
+
} | {
|
|
1846
|
+
status: "NOT_FOUND";
|
|
1847
|
+
};
|
|
1848
|
+
type ResendRefundCallbackResponse_v2 = {
|
|
1849
|
+
remittanceId: string;
|
|
1850
|
+
status: "ACCEPTED";
|
|
1851
|
+
} | {
|
|
1852
|
+
remittanceId: string;
|
|
1853
|
+
status: "REJECTED";
|
|
1854
|
+
failureReason: {
|
|
1855
|
+
failureCode: "NOT_FOUND" | "INVALID_STATE";
|
|
1856
|
+
failureMessage: string;
|
|
1857
|
+
};
|
|
1858
|
+
};
|
|
1859
|
+
//#endregion
|
|
1860
|
+
//#region src/types/v2/remittence.t.d.ts
|
|
1861
|
+
type InitiateRemittanceConfig = {
|
|
1862
|
+
remittanceId: string;
|
|
1863
|
+
recipient: {
|
|
1864
|
+
type: string;
|
|
1865
|
+
accountDetails: {
|
|
1866
|
+
phoneNumber: string;
|
|
1867
|
+
provider: string;
|
|
1868
|
+
};
|
|
1869
|
+
recipientDetails: {
|
|
1870
|
+
firstName: string;
|
|
1871
|
+
lastName: string;
|
|
1872
|
+
};
|
|
1873
|
+
};
|
|
1874
|
+
sender: {
|
|
1875
|
+
transactionDetails: {
|
|
1876
|
+
transactionReference: string;
|
|
1877
|
+
originalAmount: string;
|
|
1878
|
+
originalCurrency: string;
|
|
1879
|
+
buyFxRate: string;
|
|
1880
|
+
senderFees: string;
|
|
1881
|
+
purposeOfFunds: string;
|
|
1882
|
+
sourceOfFunds: string;
|
|
1883
|
+
};
|
|
1884
|
+
senderDetails: {
|
|
1885
|
+
firstName: string;
|
|
1886
|
+
lastName: string;
|
|
1887
|
+
nationality: string;
|
|
1888
|
+
phoneNumber: string;
|
|
1889
|
+
address: {
|
|
1890
|
+
addressLine: string;
|
|
1891
|
+
postalCode: string;
|
|
1892
|
+
city: string;
|
|
1893
|
+
country: string;
|
|
1894
|
+
};
|
|
1895
|
+
identification: {
|
|
1896
|
+
type: string;
|
|
1897
|
+
number: string;
|
|
1898
|
+
};
|
|
1899
|
+
gender: string;
|
|
1900
|
+
dateOfBirth: string;
|
|
1901
|
+
placeOfBirth: string;
|
|
1902
|
+
occupation: string;
|
|
1903
|
+
relationshipRecipient: string;
|
|
1904
|
+
};
|
|
1905
|
+
};
|
|
1906
|
+
amount: string;
|
|
1907
|
+
currency: string;
|
|
1908
|
+
customerMessage: string;
|
|
1909
|
+
metadata: Array<Record<string, unknown>>;
|
|
1910
|
+
};
|
|
1911
|
+
type InitiateRemittanceResponse = {
|
|
1912
|
+
remittanceId: string;
|
|
1913
|
+
status: "ACCEPTED" | "DUPLICATE_IGNORED";
|
|
1914
|
+
created: string;
|
|
1915
|
+
} | {
|
|
1916
|
+
remittanceId: string | null;
|
|
1917
|
+
status: "REJECTED";
|
|
1918
|
+
failureReason: {
|
|
1919
|
+
failureCode: string;
|
|
1920
|
+
failureMessage: string;
|
|
1921
|
+
};
|
|
1922
|
+
};
|
|
1923
|
+
type RemittanceCallback = {
|
|
1924
|
+
remittanceId: string;
|
|
1925
|
+
status: string;
|
|
1926
|
+
amount: string;
|
|
1927
|
+
currency: string;
|
|
1928
|
+
country: string;
|
|
1929
|
+
recipient: {
|
|
1930
|
+
type: string;
|
|
1931
|
+
accountDetails: {
|
|
1932
|
+
phoneNumber: string;
|
|
1933
|
+
provider: string;
|
|
1934
|
+
};
|
|
1935
|
+
recipientDetails: {
|
|
1936
|
+
firstName: string;
|
|
1937
|
+
lastName: string;
|
|
1938
|
+
};
|
|
1939
|
+
};
|
|
1940
|
+
sender: {
|
|
1941
|
+
transactionDetails: {
|
|
1942
|
+
transactionReference: string;
|
|
1943
|
+
originalAmount: string;
|
|
1944
|
+
originalCurrency: string;
|
|
1945
|
+
buyFxRate: string;
|
|
1946
|
+
senderFees: string;
|
|
1947
|
+
purposeOfFunds: string;
|
|
1948
|
+
sourceOfFunds: string;
|
|
1949
|
+
};
|
|
1950
|
+
senderDetails: {
|
|
1951
|
+
firstName: string;
|
|
1952
|
+
lastName: string;
|
|
1953
|
+
nationality: string;
|
|
1954
|
+
phoneNumber: string;
|
|
1955
|
+
address: {
|
|
1956
|
+
addressLine: string;
|
|
1957
|
+
postalCode: string;
|
|
1958
|
+
city: string;
|
|
1959
|
+
country: string;
|
|
1960
|
+
};
|
|
1961
|
+
identification: {
|
|
1962
|
+
type: string;
|
|
1963
|
+
number: string;
|
|
1964
|
+
};
|
|
1965
|
+
gender: string;
|
|
1966
|
+
dateOfBirth: string;
|
|
1967
|
+
placeOfBirth: string;
|
|
1968
|
+
occupation: string;
|
|
1969
|
+
relationshipRecipient: string;
|
|
1970
|
+
};
|
|
1971
|
+
};
|
|
1972
|
+
created: string;
|
|
1973
|
+
customerMessage: string;
|
|
1974
|
+
providerTransactionId: string;
|
|
1975
|
+
failureReason: {
|
|
1976
|
+
failureCode: string;
|
|
1977
|
+
failureMessage: string;
|
|
1978
|
+
};
|
|
1979
|
+
metadata: {
|
|
1980
|
+
orderId: string;
|
|
1981
|
+
customerId: string;
|
|
1982
|
+
};
|
|
1983
|
+
};
|
|
1984
|
+
type CancelEnqueuedRemittanceResponse = {
|
|
1985
|
+
remittanceId: string;
|
|
1986
|
+
status: "ACCEPTED";
|
|
1987
|
+
} | {
|
|
1988
|
+
remittanceId: string;
|
|
1989
|
+
status: "REJECTED";
|
|
1990
|
+
failureReason: {
|
|
1991
|
+
failureCode: "NOT_FOUND" | "INVALID_STATE";
|
|
1992
|
+
failureMessage: string;
|
|
1993
|
+
};
|
|
1994
|
+
};
|
|
1995
|
+
type CheckRemittanceStatusResponse = {
|
|
1996
|
+
status: "FOUND";
|
|
1997
|
+
data: {
|
|
1998
|
+
remittanceId: string;
|
|
1999
|
+
status: "COMPLETED";
|
|
2000
|
+
amount: string;
|
|
2001
|
+
currency: string;
|
|
2002
|
+
country: string;
|
|
2003
|
+
recipient: {
|
|
2004
|
+
type: string;
|
|
2005
|
+
accountDetails: {
|
|
2006
|
+
phoneNumber: string;
|
|
2007
|
+
provider: string;
|
|
2008
|
+
};
|
|
2009
|
+
};
|
|
2010
|
+
customerMessage: string;
|
|
2011
|
+
created: string;
|
|
2012
|
+
providerTransactionId: string;
|
|
2013
|
+
metadata: {
|
|
2014
|
+
orderId: string;
|
|
2015
|
+
customerId: string;
|
|
2016
|
+
};
|
|
2017
|
+
} | {
|
|
2018
|
+
remittanceId: string;
|
|
2019
|
+
status: "ACCEPTED" | "PROCESSING" | "IN_RECONCILIATION";
|
|
2020
|
+
amount: string;
|
|
2021
|
+
currency: string;
|
|
2022
|
+
country: string;
|
|
2023
|
+
recipient: {
|
|
2024
|
+
type: string;
|
|
2025
|
+
accountDetails: {
|
|
2026
|
+
phoneNumber: string;
|
|
2027
|
+
provider: string;
|
|
2028
|
+
};
|
|
2029
|
+
};
|
|
2030
|
+
customerMessage: string;
|
|
2031
|
+
created: string;
|
|
2032
|
+
metadata: {
|
|
2033
|
+
orderId: string;
|
|
2034
|
+
customerId: string;
|
|
2035
|
+
};
|
|
2036
|
+
} | {
|
|
2037
|
+
remittanceId: string;
|
|
2038
|
+
status: "FAILED";
|
|
2039
|
+
amount: string;
|
|
2040
|
+
currency: string;
|
|
2041
|
+
country: string;
|
|
2042
|
+
recipient: {
|
|
2043
|
+
type: string;
|
|
2044
|
+
accountDetails: {
|
|
2045
|
+
phoneNumber: string;
|
|
2046
|
+
provider: string;
|
|
2047
|
+
};
|
|
2048
|
+
};
|
|
2049
|
+
customerMessage: string;
|
|
2050
|
+
created: string;
|
|
2051
|
+
failureReason: {
|
|
2052
|
+
failureCode: string;
|
|
2053
|
+
failureMessage: string;
|
|
2054
|
+
};
|
|
2055
|
+
metadata: {
|
|
2056
|
+
orderId: string;
|
|
2057
|
+
customerId: string;
|
|
2058
|
+
};
|
|
2059
|
+
};
|
|
2060
|
+
} | {
|
|
2061
|
+
status: "NOT_FOUND";
|
|
2062
|
+
};
|
|
2063
|
+
type ResendRemittanceCallbackResponse = {
|
|
2064
|
+
remittanceId: string;
|
|
2065
|
+
status: "ACCEPTED";
|
|
2066
|
+
} | {
|
|
2067
|
+
remittanceId: string;
|
|
2068
|
+
status: "REJECTED";
|
|
2069
|
+
failureReason: {
|
|
2070
|
+
failureCode: "NOT_FOUND" | "INVALID_STATE";
|
|
2071
|
+
failureMessage: string;
|
|
2072
|
+
};
|
|
2073
|
+
};
|
|
2074
|
+
//#endregion
|
|
2075
|
+
//#region src/types/v2/statements.t.d.ts
|
|
2076
|
+
type RequestStatementConfig = {
|
|
2077
|
+
wallet: {
|
|
2078
|
+
country: string;
|
|
2079
|
+
currency: string;
|
|
2080
|
+
provider: string;
|
|
2081
|
+
};
|
|
2082
|
+
callbackUrl: string;
|
|
2083
|
+
startDate: string;
|
|
2084
|
+
endDate: string;
|
|
2085
|
+
compressed: boolean;
|
|
2086
|
+
};
|
|
2087
|
+
type RequestStatementResponse_v2 = {
|
|
2088
|
+
status: "ACCEPTED";
|
|
2089
|
+
statementId: string;
|
|
2090
|
+
created: string;
|
|
2091
|
+
} | {
|
|
2092
|
+
status: "REJECTED";
|
|
2093
|
+
failureReason: {
|
|
2094
|
+
failureCode: "INVALID_CALLBACK_URL" | "INVALID_DATE_RANGE" | "WALLET_NOT_FOUND";
|
|
2095
|
+
failureMessage: string;
|
|
2096
|
+
};
|
|
2097
|
+
};
|
|
2098
|
+
type StatementWallet = {
|
|
2099
|
+
currency: string;
|
|
2100
|
+
country: string;
|
|
2101
|
+
provider: string;
|
|
2102
|
+
};
|
|
2103
|
+
type StatementData = {
|
|
2104
|
+
statementId: string;
|
|
2105
|
+
status: "COMPLETED";
|
|
2106
|
+
wallet: StatementWallet;
|
|
2107
|
+
created: string;
|
|
2108
|
+
startDate: string;
|
|
2109
|
+
endDate: string;
|
|
2110
|
+
fileSIze: number;
|
|
2111
|
+
downloadUrl: string;
|
|
2112
|
+
downloadUrlExpiresAt: string;
|
|
2113
|
+
completedAt: string;
|
|
2114
|
+
} | {
|
|
2115
|
+
statementId: string;
|
|
2116
|
+
status: "PROCESSING";
|
|
2117
|
+
wallet: StatementWallet;
|
|
2118
|
+
created: string;
|
|
2119
|
+
startDate: string;
|
|
2120
|
+
endDate: string;
|
|
2121
|
+
} | {
|
|
2122
|
+
statementId: string;
|
|
2123
|
+
status: "FAILED";
|
|
2124
|
+
wallet: StatementWallet;
|
|
2125
|
+
created: string;
|
|
2126
|
+
startDate: string;
|
|
2127
|
+
endDate: string;
|
|
2128
|
+
failedAt: string;
|
|
2129
|
+
};
|
|
2130
|
+
type CheckStatementStaus_v2 = {
|
|
2131
|
+
status: "FOUND";
|
|
2132
|
+
data: StatementData;
|
|
2133
|
+
} | {
|
|
2134
|
+
status: "NOT_FOUND";
|
|
2135
|
+
};
|
|
2136
|
+
type StatementCallback_v2 = {
|
|
2137
|
+
statementId: string;
|
|
2138
|
+
status: "PROCESSING" | "COMPLETED" | "FAILED";
|
|
2139
|
+
wallet: {
|
|
2140
|
+
country: string;
|
|
2141
|
+
currency: string;
|
|
2142
|
+
provider: string;
|
|
2143
|
+
};
|
|
2144
|
+
created: string;
|
|
2145
|
+
startDate: string;
|
|
2146
|
+
endDate: string;
|
|
2147
|
+
fileSize: number;
|
|
2148
|
+
downloadUrl: string;
|
|
2149
|
+
downloadUrlExpiresAt: string;
|
|
2150
|
+
completedAt: string;
|
|
2151
|
+
failedAt: string;
|
|
2152
|
+
failureReason: {
|
|
2153
|
+
failureCode: string;
|
|
2154
|
+
failureMessage: string;
|
|
2155
|
+
};
|
|
2156
|
+
};
|
|
2157
|
+
//#endregion
|
|
2158
|
+
//#region src/types/v2/toolkit.t.d.ts
|
|
2159
|
+
type ProviderAvailability_v2 = Array<{
|
|
2160
|
+
country: string;
|
|
2161
|
+
providers: Array<{
|
|
2162
|
+
provider: string;
|
|
2163
|
+
operationTypes: Array<{
|
|
2164
|
+
operationType: "DEPOSIT" | "PAYOUT" | "REMITTANCE" | "REFUND" | "USSD_DEPOSIT" | "NAME_LOOKUP";
|
|
2165
|
+
status: "OPERATIONAL" | "DELAYED" | "CLOSED";
|
|
2166
|
+
}>;
|
|
2167
|
+
}>;
|
|
2168
|
+
}>;
|
|
2169
|
+
type ProviderPrediction_v2 = {
|
|
2170
|
+
country: string;
|
|
2171
|
+
provider: string;
|
|
2172
|
+
phoneNumber: string;
|
|
2173
|
+
};
|
|
2174
|
+
type WalletBalance_v2 = {
|
|
2175
|
+
balances: Array<{
|
|
2176
|
+
country: string;
|
|
2177
|
+
balance: string;
|
|
2178
|
+
currency: string;
|
|
2179
|
+
provider: string;
|
|
2180
|
+
}>;
|
|
2181
|
+
};
|
|
2182
|
+
//#endregion
|
|
2183
|
+
//#region src/types/methods.t.d.ts
|
|
2184
|
+
type V1Methods = {
|
|
2185
|
+
requestDeposit(data: DepositConfig, args?: {
|
|
2186
|
+
options?: RequestOptions;
|
|
2187
|
+
}): Promise<PawaPayResponse<DepositResponse, PawaPayError>>;
|
|
2188
|
+
checkDepositStatus(depositId: string, args?: {
|
|
2189
|
+
options?: RequestOptions;
|
|
2190
|
+
}): Promise<PawaPayResponse<DepositStatus[], PawaPayError>>;
|
|
2191
|
+
resendDepositCallback(depositId: string, args?: {
|
|
2192
|
+
options?: RequestOptions;
|
|
2193
|
+
}): Promise<PawaPayResponse<ResendDepositResponse, PawaPayError>>;
|
|
2194
|
+
requestPayout(data: RequestPayoutConfig, args?: {
|
|
2195
|
+
options?: RequestOptions;
|
|
2196
|
+
}): Promise<PawaPayResponse<RequestPayoutRespose, PawaPayError>>;
|
|
2197
|
+
checkPayoutStatus(payoutId: string, args?: {
|
|
2198
|
+
options?: RequestOptions;
|
|
2199
|
+
}): Promise<PawaPayResponse<CheckPayoutStatusResponse[], PawaPayError>>;
|
|
2200
|
+
resendPayoutCallback(payoutId: string, args?: {
|
|
2201
|
+
options?: RequestOptions;
|
|
2202
|
+
}): Promise<PawaPayResponse<ResendPayoutCallbackResponse, PawaPayError>>;
|
|
2203
|
+
cancelEnqueuedPayout(payoutId: string, args?: {
|
|
2204
|
+
options?: RequestOptions;
|
|
2205
|
+
}): Promise<PawaPayResponse<CancelEnqueuedPayoutResponse, PawaPayError>>;
|
|
2206
|
+
initiateBulkPayout(data: RequestBulkPayoutConfig[], args?: {
|
|
2207
|
+
options?: RequestOptions;
|
|
2208
|
+
}): Promise<PawaPayResponse<RequestBuildPayoutResponse[], PawaPayError>>;
|
|
2209
|
+
initiateRefund(refundConfig: RequestRefundConfig, args?: {
|
|
2210
|
+
options?: RequestOptions;
|
|
2211
|
+
}): Promise<PawaPayResponse<RequestRefundResponse, PawaPayError>>;
|
|
2212
|
+
checkRefundStatus(refundId: string, args?: {
|
|
2213
|
+
options?: RequestOptions;
|
|
2214
|
+
}): Promise<PawaPayResponse<CheckRefundStatusResponse[], PawaPayError>>;
|
|
2215
|
+
resendRefundCallback(refundId: string, args?: {
|
|
2216
|
+
options?: RequestOptions;
|
|
2217
|
+
}): Promise<PawaPayResponse<ResendRefundCallbackResponse, PawaPayError>>;
|
|
2218
|
+
requestPayPage(payload: RequestPayPageConfig, args?: {
|
|
2219
|
+
options?: RequestOptions;
|
|
2220
|
+
}): Promise<PawaPayResponse<RequestPayPageResponse, PawaPayError>>;
|
|
2221
|
+
getWalletBalances(args?: {
|
|
2222
|
+
options?: RequestOptions;
|
|
2223
|
+
}): Promise<PawaPayResponse<WalletBalance, PawaPayError>>;
|
|
2224
|
+
getWalletBalancesByCountry(country: string, args?: {
|
|
2225
|
+
options?: RequestOptions;
|
|
2226
|
+
}): Promise<PawaPayResponse<WalletBalance, PawaPayError>>;
|
|
2227
|
+
getActiveConfiguration(args?: {
|
|
2228
|
+
options?: RequestOptions;
|
|
2229
|
+
}): Promise<PawaPayResponse<ActiveConfigurationResponse, PawaPayError>>;
|
|
2230
|
+
getProviderAvailability(args?: {
|
|
2231
|
+
options?: RequestOptions;
|
|
2232
|
+
}): Promise<PawaPayResponse<AvailableCorrespondentResponse[], PawaPayError>>;
|
|
2233
|
+
getProviderPrediction(msisdn: string, args?: {
|
|
2234
|
+
options?: RequestOptions;
|
|
2235
|
+
}): Promise<PawaPayResponse<PredictCorrespondentResponse, PawaPayError>>;
|
|
2236
|
+
getPublicKeys(args?: {
|
|
2237
|
+
options?: RequestOptions;
|
|
2238
|
+
}): Promise<PawaPayResponse<PublicKeysResponse[], PawaPayError>>;
|
|
2239
|
+
};
|
|
2240
|
+
type V2Methods = {
|
|
2241
|
+
requestDeposit(data: DepositConfig_v2, args?: {
|
|
2242
|
+
options?: RequestOptions;
|
|
2243
|
+
}): Promise<PawaPayResponse<DepositResponse_v2, PawaPayError>>;
|
|
2244
|
+
checkDepositStatus(depositId: string, args?: {
|
|
2245
|
+
options?: RequestOptions;
|
|
2246
|
+
}): Promise<PawaPayResponse<DepositStatusResponse_v2, PawaPayError>>;
|
|
2247
|
+
resendDepositCallback(depositId: string, args?: {
|
|
2248
|
+
options?: RequestOptions;
|
|
2249
|
+
}): Promise<PawaPayResponse<ResendDepositCallbackResponse_v2, PawaPayError>>;
|
|
2250
|
+
checkPayoutStatus(payoutId: string, args?: {
|
|
2251
|
+
options?: RequestOptions;
|
|
2252
|
+
}): Promise<PawaPayResponse<CheckPayoutStatus_v2, PawaPayError>>;
|
|
2253
|
+
requestPayout(data: RequestPayoutConfig_v2, args?: {
|
|
2254
|
+
options?: RequestOptions;
|
|
2255
|
+
}): Promise<PawaPayResponse<RequestPayoutResponse_v2, PawaPayError>>;
|
|
2256
|
+
cancelEnqueuedPayout(payoutId: string, args?: {
|
|
2257
|
+
options?: RequestOptions;
|
|
2258
|
+
}): Promise<PawaPayResponse<CancelEnqueuedPayoutResponse_v2, PawaPayError>>;
|
|
2259
|
+
resendPayoutCallback(payoutId: string, args?: {
|
|
2260
|
+
options?: RequestOptions;
|
|
2261
|
+
}): Promise<PawaPayResponse<ResendPayoutCallbackResponse_v2, PawaPayError>>;
|
|
2262
|
+
initiateBulkPayout(data: Array<RequestPayoutConfig_v2>, args?: {
|
|
2263
|
+
options?: RequestOptions;
|
|
2264
|
+
}): Promise<PawaPayResponse<BulkPayoutResponse_v2, PawaPayError>>;
|
|
2265
|
+
initiateRefund(data: RequestRefundConfig_v2, args?: {
|
|
2266
|
+
options?: RequestOptions;
|
|
2267
|
+
}): Promise<PawaPayResponse<RequestRefundResponse_v2, PawaPayError>>;
|
|
2268
|
+
checkRefundStatus(refundId: string, args?: {
|
|
2269
|
+
options?: RequestOptions;
|
|
2270
|
+
}): Promise<PawaPayResponse<RefundStatusResponse_v2, PawaPayError>>;
|
|
2271
|
+
resendRefundCallback(refundId: string, args?: {
|
|
2272
|
+
options?: RequestOptions;
|
|
2273
|
+
}): Promise<PawaPayResponse<ResendRefundCallbackResponse_v2, PawaPayError>>;
|
|
2274
|
+
initiateRemittance(data: InitiateRemittanceConfig, args?: {
|
|
2275
|
+
options?: RequestOptions;
|
|
2276
|
+
}): Promise<PawaPayResponse<InitiateRemittanceResponse, PawaPayError>>;
|
|
2277
|
+
resendRemittanceCallback(remittanceId: string, args?: {
|
|
2278
|
+
options?: RequestOptions;
|
|
2279
|
+
}): Promise<PawaPayResponse<ResendRemittanceCallbackResponse, PawaPayError>>;
|
|
2280
|
+
checkRemittanceStatus(remittanceId: string, args?: {
|
|
2281
|
+
options?: RequestOptions;
|
|
2282
|
+
}): Promise<PawaPayResponse<CheckRemittanceStatusResponse, PawaPayError>>;
|
|
2283
|
+
cancelEnqueuedRemittance(remittanceId: string, args?: {
|
|
2284
|
+
options?: RequestOptions;
|
|
2285
|
+
}): Promise<PawaPayResponse<CancelEnqueuedRemittanceResponse, PawaPayError>>;
|
|
2286
|
+
requestPayPage(data: RequestPayPageConfig_v2, args?: {
|
|
2287
|
+
options?: RequestOptions;
|
|
2288
|
+
}): Promise<PawaPayResponse<RequestPayPageResponse, PawaPayError>>;
|
|
2289
|
+
getWalletBalances(args?: {
|
|
2290
|
+
options?: RequestOptions;
|
|
2291
|
+
}): Promise<PawaPayResponse<WalletBalance_v2, PawaPayError>>;
|
|
2292
|
+
requestStatement(data: RequestStatementConfig, args?: {
|
|
2293
|
+
options?: RequestOptions;
|
|
2294
|
+
}): Promise<PawaPayResponse<RequestStatementResponse_v2, PawaPayError>>;
|
|
2295
|
+
getStatementStatus(statementId: string, args?: {
|
|
2296
|
+
options?: RequestOptions;
|
|
2297
|
+
}): Promise<PawaPayResponse<CheckStatementStaus_v2, PawaPayError>>;
|
|
2298
|
+
getActiveConfiguration(args?: {
|
|
2299
|
+
options?: RequestOptions;
|
|
2300
|
+
}): Promise<PawaPayResponse<ActiveConfiguration, PawaPayError>>;
|
|
2301
|
+
getProviderAvailability(args?: {
|
|
2302
|
+
options?: RequestOptions;
|
|
2303
|
+
}): Promise<PawaPayResponse<ProviderAvailability_v2, PawaPayError>>;
|
|
2304
|
+
getProviderPrediction(phoneNumber: string, args?: {
|
|
2305
|
+
options?: RequestOptions;
|
|
2306
|
+
}): Promise<PawaPayResponse<ProviderPrediction_v2, PawaPayError>>;
|
|
2307
|
+
getPublicKeys(args?: {
|
|
2308
|
+
options?: RequestOptions;
|
|
2309
|
+
}): Promise<PawaPayResponse<PublicKeysResponse, PawaPayError>>;
|
|
2310
|
+
};
|
|
2311
|
+
//#endregion
|
|
2312
|
+
//#region src/client.d.ts
|
|
2313
|
+
type ApiVersion = "v1" | "v2";
|
|
2314
|
+
type ClientConfig<T extends ApiVersion> = {
|
|
2315
|
+
apiVersion?: T;
|
|
2316
|
+
environment?: "live" | "sandbox";
|
|
2317
|
+
};
|
|
2318
|
+
//#endregion
|
|
2319
|
+
//#region src/types/factory.d.ts
|
|
2320
|
+
type PawaPayClientV1 = V1Methods;
|
|
2321
|
+
type PawaPayClientV2 = V2Methods;
|
|
2322
|
+
declare function createPawaPayClient(apiKey: string, config?: ClientConfig<"v1"> & {
|
|
2323
|
+
apiVersion?: "v1";
|
|
2324
|
+
}): PawaPayClientV1;
|
|
2325
|
+
declare function createPawaPayClient(apiKey: string, config?: ClientConfig<"v2"> & {
|
|
2326
|
+
apiVersion?: "v2";
|
|
2327
|
+
}): PawaPayClientV2;
|
|
2328
|
+
//#endregion
|
|
2329
|
+
export { ActiveConfiguration, type ActiveConfigurationResponse, AuthType, type AvailableCorrespondentResponse, BulkPayoutResponse_v2, type CancelEnqueuedPayoutResponse, CancelEnqueuedPayoutResponse_v2, CancelEnqueuedRemittanceResponse, Channel, ChannelType, type CheckPayoutStatusResponse, CheckPayoutStatus_v2, type CheckRefundStatusResponse, CheckRemittanceStatusResponse, CheckStatementStaus_v2, Country, Currency, DecimalsInAmount, DepositCallBack_v2, type DepositCallback, type DepositConfig, DepositConfig_v2, type DepositResponse, DepositResponse_v2, type DepositStatus, DepositStatusResponse_v2, DisplayName, InitiateRemittanceConfig, InitiateRemittanceResponse, Instruction, Instructions, OperationStatus, OperationType, OperationTypeCode, type PawaPayError, type PawaPayResponse, type PayoutCallback, PinPromptInstructions, PinPromptType, type PredictCorrespondentResponse, Provider, ProviderAvailability_v2, ProviderPrediction_v2, type PublicKeysResponse, type RefundCallback, RefundStatusResponse_v2, RemittanceCallback, type RequestBuildPayoutResponse, type RequestBulkPayoutConfig, type RequestOptions, type RequestPayPageConfig, RequestPayPageConfig_v2, type RequestPayPageResponse, type RequestPayoutConfig, RequestPayoutConfig_v2, RequestPayoutResponse_v2, type RequestPayoutRespose, type RequestRefundConfig, RequestRefundConfig_v2, type RequestRefundResponse, RequestRefundResponse_v2, RequestStatementConfig, RequestStatementResponse_v2, ResendDepositCallbackResponse_v2, type ResendDepositResponse, type ResendPayoutCallbackResponse, ResendPayoutCallbackResponse_v2, type ResendRefundCallbackResponse, ResendRefundCallbackResponse_v2, ResendRemittanceCallbackResponse, SignatureConfiguration, StatementCallback_v2, Variables, type WalletBalance, WalletBalance_v2, createPawaPayClient };
|
|
2330
|
+
//# sourceMappingURL=index.d.cts.map
|