@delopay/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +254 -0
- package/dist/index.cjs +2694 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3609 -0
- package/dist/index.d.ts +3609 -0
- package/dist/index.js +2643 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,3609 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript type definitions for the Delopay API.
|
|
3
|
+
* Field names match the JSON wire format (snake_case).
|
|
4
|
+
*/
|
|
5
|
+
type Currency = 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' | string;
|
|
6
|
+
type IntentStatus = 'succeeded' | 'failed' | 'cancelled' | 'cancelled_post_capture' | 'processing' | 'requires_customer_action' | 'requires_merchant_action' | 'requires_payment_method' | 'requires_confirmation' | 'requires_capture' | 'partially_captured' | 'partially_captured_and_capturable' | 'partially_authorized_and_requires_capture' | 'partially_captured_and_processing' | 'conflicted' | 'expired';
|
|
7
|
+
type CaptureMethod = 'automatic' | 'manual' | 'manual_multiple' | 'scheduled' | 'sequential_automatic';
|
|
8
|
+
type AuthenticationType = 'three_ds' | 'no_three_ds';
|
|
9
|
+
type RefundStatus = 'succeeded' | 'failed' | 'pending' | 'review';
|
|
10
|
+
type RefundType = 'scheduled' | 'instant';
|
|
11
|
+
type PaymentMethod = 'card' | 'card_redirect' | 'pay_later' | 'wallet' | 'bank_redirect' | 'bank_transfer' | 'crypto' | 'bank_debit' | 'reward' | 'real_time_payment' | 'upi' | 'voucher' | 'gift_card' | 'open_banking' | 'mobile_payment' | 'network_token' | string;
|
|
12
|
+
type PaymentMethodType = string;
|
|
13
|
+
type ConnectorType = 'payment_processor' | 'payment_vas' | 'fin_operations' | 'fiz_operations' | 'networks' | 'banking_entities' | 'non_banking_finance' | 'payout_processor' | 'payment_method_auth' | 'authentication_processor' | 'tax_processor' | 'billing_processor' | 'vault_processor';
|
|
14
|
+
type DisputeStage = 'pre_dispute' | 'dispute' | 'pre_arbitration' | 'arbitration' | 'dispute_reversal';
|
|
15
|
+
type DisputeStatus = 'dispute_opened' | 'dispute_expired' | 'dispute_accepted' | 'dispute_cancelled' | 'dispute_challenged' | 'dispute_won' | 'dispute_lost';
|
|
16
|
+
type MandateStatus = 'active' | 'inactive' | 'pending' | 'revoked';
|
|
17
|
+
type PayoutStatus = 'success' | 'failed' | 'cancelled' | 'initiated' | 'expired' | 'reversed' | 'pending' | 'ineligible' | 'requires_creation' | 'requires_confirmation' | 'requires_payout_method_data' | 'requires_fulfillment' | 'requires_vendor_account_creation';
|
|
18
|
+
type PayoutType = 'card' | 'bank' | 'wallet' | 'bank_redirect';
|
|
19
|
+
type FeeType = 'percentage' | 'flat' | 'combined';
|
|
20
|
+
type FeeOwner = 'platform' | 'merchant';
|
|
21
|
+
type ApiKeyExpiration = 'never' | string;
|
|
22
|
+
type AuthenticationStatus = 'started' | 'pending' | 'success' | 'failed';
|
|
23
|
+
type MandateType = 'single_use' | 'multi_use';
|
|
24
|
+
type MerchantAccountType = 'standard' | 'platform' | 'connected';
|
|
25
|
+
type EventType = 'payment_succeeded' | 'payment_failed' | 'payment_processing' | 'payment_cancelled' | 'payment_cancelled_post_capture' | 'payment_authorized' | 'payment_partially_authorized' | 'payment_captured' | 'payment_expired' | 'action_required' | 'refund_succeeded' | 'refund_failed' | 'dispute_opened' | 'dispute_expired' | 'dispute_accepted' | 'dispute_cancelled' | 'dispute_challenged' | 'dispute_won' | 'dispute_lost' | 'mandate_active' | 'mandate_revoked' | 'payout_success' | 'payout_failed' | 'payout_initiated' | 'payout_processing' | 'payout_cancelled' | 'payout_expired' | 'payout_reversed' | 'invoice_paid';
|
|
26
|
+
type EventClass = 'payments' | 'refunds' | 'disputes' | 'mandates' | 'payouts' | 'subscriptions';
|
|
27
|
+
type WebhookDeliveryAttempt = 'initial_attempt' | 'automatic_retry' | 'manual_retry';
|
|
28
|
+
type BlocklistDataKind = 'payment_method' | 'card_bin' | 'extended_card_bin';
|
|
29
|
+
type GsmDecision = 'retry' | 'do_default';
|
|
30
|
+
type RelayType = 'refund' | 'capture' | 'incremental_authorization' | 'void';
|
|
31
|
+
type RelayStatus = 'created' | 'pending' | 'success' | 'failure';
|
|
32
|
+
type ThreeDSDecision = 'no_three_ds' | 'challenge_requested' | 'challenge_preferred' | 'three_ds_exemption_requested_tra' | 'three_ds_exemption_requested_low_value' | 'issuer_three_ds_exemption_requested';
|
|
33
|
+
type PollStatus = 'pending' | 'completed' | 'not_found';
|
|
34
|
+
type TransactionType = string;
|
|
35
|
+
interface AddressDetails {
|
|
36
|
+
city?: string | null;
|
|
37
|
+
country?: string | null;
|
|
38
|
+
line1?: string | null;
|
|
39
|
+
line2?: string | null;
|
|
40
|
+
line3?: string | null;
|
|
41
|
+
zip?: string | null;
|
|
42
|
+
state?: string | null;
|
|
43
|
+
first_name?: string | null;
|
|
44
|
+
last_name?: string | null;
|
|
45
|
+
}
|
|
46
|
+
interface PhoneDetails {
|
|
47
|
+
number?: string | null;
|
|
48
|
+
country_code?: string | null;
|
|
49
|
+
}
|
|
50
|
+
interface Address {
|
|
51
|
+
address?: AddressDetails | null;
|
|
52
|
+
phone?: PhoneDetails | null;
|
|
53
|
+
email?: string | null;
|
|
54
|
+
}
|
|
55
|
+
interface AutoRechargeConfig {
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
threshold_amount: number;
|
|
58
|
+
recharge_amount: number;
|
|
59
|
+
}
|
|
60
|
+
interface CardDetail {
|
|
61
|
+
card_number: string;
|
|
62
|
+
card_exp_month: string;
|
|
63
|
+
card_exp_year: string;
|
|
64
|
+
card_holder_name?: string | null;
|
|
65
|
+
card_cvc?: string | null;
|
|
66
|
+
card_issuing_country?: string | null;
|
|
67
|
+
card_network?: string | null;
|
|
68
|
+
card_issuer?: string | null;
|
|
69
|
+
nick_name?: string | null;
|
|
70
|
+
}
|
|
71
|
+
interface CardDetailFromLocker {
|
|
72
|
+
scheme?: string | null;
|
|
73
|
+
issuer_country?: string | null;
|
|
74
|
+
last4_digits?: string | null;
|
|
75
|
+
expiry_month?: string | null;
|
|
76
|
+
expiry_year?: string | null;
|
|
77
|
+
card_holder_name?: string | null;
|
|
78
|
+
card_fingerprint?: string | null;
|
|
79
|
+
nick_name?: string | null;
|
|
80
|
+
card_network?: string | null;
|
|
81
|
+
card_isin?: string | null;
|
|
82
|
+
card_extended_bin?: string | null;
|
|
83
|
+
card_exp_month?: string | null;
|
|
84
|
+
card_exp_year?: string | null;
|
|
85
|
+
payment_checks?: Record<string, unknown> | null;
|
|
86
|
+
authentication_data?: Record<string, unknown> | null;
|
|
87
|
+
saved_to_locker: boolean;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Parameters for creating a new payment intent.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```typescript
|
|
94
|
+
* const payment = await delopay.payments.create({
|
|
95
|
+
* amount: 5000,
|
|
96
|
+
* currency: 'EUR',
|
|
97
|
+
* customer_id: 'cus_123',
|
|
98
|
+
* confirm: true,
|
|
99
|
+
* payment_token: 'tok_...',
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
interface PaymentCreateRequest {
|
|
104
|
+
/** Amount in minor units (e.g. `5000` for €50.00). */
|
|
105
|
+
amount: number;
|
|
106
|
+
/** Three-letter ISO 4217 currency code (e.g. `'EUR'`, `'USD'`). */
|
|
107
|
+
currency: Currency;
|
|
108
|
+
/** Idempotency key — provide your own payment ID to avoid duplicate creation. */
|
|
109
|
+
payment_id?: string | null;
|
|
110
|
+
/** Tax amount included in the order total, in minor units. */
|
|
111
|
+
order_tax_amount?: number | null;
|
|
112
|
+
/** Amount to capture when using manual capture, in minor units. */
|
|
113
|
+
amount_to_capture?: number | null;
|
|
114
|
+
/** Shipping cost included in the order total, in minor units. */
|
|
115
|
+
shipping_cost?: number | null;
|
|
116
|
+
/** Override routing algorithm for this specific payment. */
|
|
117
|
+
routing?: Record<string, unknown> | null;
|
|
118
|
+
/** Restrict which connectors may be used for this payment. */
|
|
119
|
+
connector?: string[] | null;
|
|
120
|
+
/** How and when funds are captured (`'automatic'` or `'manual'`). */
|
|
121
|
+
capture_method?: CaptureMethod | null;
|
|
122
|
+
/** Whether to request 3-D Secure authentication (`'three_ds'` or `'no_three_ds'`). */
|
|
123
|
+
authentication_type?: AuthenticationType | null;
|
|
124
|
+
/** Billing address for the payment. */
|
|
125
|
+
billing?: Address | null;
|
|
126
|
+
/** Set to `true` to confirm the payment immediately upon creation. */
|
|
127
|
+
confirm?: boolean | null;
|
|
128
|
+
/** ID of an existing customer to associate with this payment. */
|
|
129
|
+
customer_id?: string | null;
|
|
130
|
+
/** Inline customer details (used when creating a customer on-the-fly). */
|
|
131
|
+
customer?: {
|
|
132
|
+
id?: string | null;
|
|
133
|
+
name?: string | null;
|
|
134
|
+
email?: string | null;
|
|
135
|
+
phone?: string | null;
|
|
136
|
+
phone_country_code?: string | null;
|
|
137
|
+
} | null;
|
|
138
|
+
/** Human-readable description shown on receipts and in the dashboard. */
|
|
139
|
+
description?: string | null;
|
|
140
|
+
/** URL to redirect the customer to after payment (required for redirect-based methods). */
|
|
141
|
+
return_url?: string | null;
|
|
142
|
+
/** Descriptor shown on the customer's bank statement (name portion). */
|
|
143
|
+
statement_descriptor_name?: string | null;
|
|
144
|
+
/** Descriptor shown on the customer's bank statement (suffix portion). */
|
|
145
|
+
statement_descriptor_suffix?: string | null;
|
|
146
|
+
/** Arbitrary key-value metadata stored alongside the payment. */
|
|
147
|
+
metadata?: Record<string, unknown> | null;
|
|
148
|
+
/** Shipping address for the order. */
|
|
149
|
+
shipping?: Address | null;
|
|
150
|
+
/** Payment method type (e.g. `'card'`, `'wallet'`, `'bank_redirect'`). */
|
|
151
|
+
payment_method?: PaymentMethod | null;
|
|
152
|
+
/** Payment method sub-type (e.g. `'credit'`, `'apple_pay'`). */
|
|
153
|
+
payment_method_type?: PaymentMethodType | null;
|
|
154
|
+
/** Payment method data payload (card details, wallet token, etc.). */
|
|
155
|
+
payment_method_data?: Record<string, unknown> | null;
|
|
156
|
+
/** A previously generated payment token representing a saved payment method. */
|
|
157
|
+
payment_token?: string | null;
|
|
158
|
+
/** Whether to save the payment method for future use (`'off_session'` or `'on_session'`). */
|
|
159
|
+
setup_future_usage?: 'off_session' | 'on_session' | null;
|
|
160
|
+
/** ID of an existing mandate to use for this payment. */
|
|
161
|
+
mandate_id?: string | null;
|
|
162
|
+
/** Set to `true` when charging a customer without their active involvement (recurring). */
|
|
163
|
+
off_session?: boolean | null;
|
|
164
|
+
/** Shop (business profile) ID to process the payment under. */
|
|
165
|
+
profile_id?: string | null;
|
|
166
|
+
/** Customer email address. */
|
|
167
|
+
email?: string | null;
|
|
168
|
+
/** Customer name. */
|
|
169
|
+
name?: string | null;
|
|
170
|
+
/** Customer phone number. */
|
|
171
|
+
phone?: string | null;
|
|
172
|
+
/** Customer phone country code (e.g. `'+1'`). */
|
|
173
|
+
phone_country_code?: string | null;
|
|
174
|
+
/** Restrict which payment method types the customer may choose. */
|
|
175
|
+
allowed_payment_method_types?: PaymentMethodType[] | null;
|
|
176
|
+
/** Browser metadata for 3-D Secure fingerprinting. */
|
|
177
|
+
browser_info?: Record<string, unknown> | null;
|
|
178
|
+
}
|
|
179
|
+
interface PaymentUpdateRequest {
|
|
180
|
+
amount?: number | null;
|
|
181
|
+
currency?: Currency | null;
|
|
182
|
+
order_tax_amount?: number | null;
|
|
183
|
+
amount_to_capture?: number | null;
|
|
184
|
+
shipping_cost?: number | null;
|
|
185
|
+
routing?: Record<string, unknown> | null;
|
|
186
|
+
connector?: string[] | null;
|
|
187
|
+
capture_method?: CaptureMethod | null;
|
|
188
|
+
authentication_type?: AuthenticationType | null;
|
|
189
|
+
billing?: Address | null;
|
|
190
|
+
confirm?: boolean | null;
|
|
191
|
+
customer_id?: string | null;
|
|
192
|
+
description?: string | null;
|
|
193
|
+
return_url?: string | null;
|
|
194
|
+
statement_descriptor_name?: string | null;
|
|
195
|
+
statement_descriptor_suffix?: string | null;
|
|
196
|
+
metadata?: Record<string, unknown> | null;
|
|
197
|
+
shipping?: Address | null;
|
|
198
|
+
payment_method?: PaymentMethod | null;
|
|
199
|
+
payment_method_type?: PaymentMethodType | null;
|
|
200
|
+
payment_method_data?: Record<string, unknown> | null;
|
|
201
|
+
payment_token?: string | null;
|
|
202
|
+
setup_future_usage?: 'off_session' | 'on_session' | null;
|
|
203
|
+
profile_id?: string | null;
|
|
204
|
+
email?: string | null;
|
|
205
|
+
name?: string | null;
|
|
206
|
+
phone?: string | null;
|
|
207
|
+
phone_country_code?: string | null;
|
|
208
|
+
}
|
|
209
|
+
interface PaymentConfirmRequest {
|
|
210
|
+
payment_method?: PaymentMethod | null;
|
|
211
|
+
payment_method_type?: PaymentMethodType | null;
|
|
212
|
+
payment_method_data?: Record<string, unknown> | null;
|
|
213
|
+
payment_token?: string | null;
|
|
214
|
+
return_url?: string | null;
|
|
215
|
+
billing?: Address | null;
|
|
216
|
+
shipping?: Address | null;
|
|
217
|
+
mandate_id?: string | null;
|
|
218
|
+
off_session?: boolean | null;
|
|
219
|
+
customer_id?: string | null;
|
|
220
|
+
email?: string | null;
|
|
221
|
+
name?: string | null;
|
|
222
|
+
phone?: string | null;
|
|
223
|
+
phone_country_code?: string | null;
|
|
224
|
+
browser_info?: Record<string, unknown> | null;
|
|
225
|
+
capture_method?: CaptureMethod | null;
|
|
226
|
+
metadata?: Record<string, unknown> | null;
|
|
227
|
+
}
|
|
228
|
+
interface PaymentCaptureRequest {
|
|
229
|
+
merchant_id?: string | null;
|
|
230
|
+
amount_to_capture?: number | null;
|
|
231
|
+
refund_uncaptured_amount?: boolean | null;
|
|
232
|
+
statement_descriptor_suffix?: string | null;
|
|
233
|
+
statement_descriptor_prefix?: string | null;
|
|
234
|
+
}
|
|
235
|
+
interface PaymentCancelRequest {
|
|
236
|
+
cancellation_reason?: string | null;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* A Delopay payment intent returned by the API.
|
|
240
|
+
*
|
|
241
|
+
* Check `status` to determine the payment outcome. When `status` is
|
|
242
|
+
* `'requires_customer_action'`, use `next_action` to redirect or render
|
|
243
|
+
* additional authentication steps.
|
|
244
|
+
*/
|
|
245
|
+
interface PaymentResponse {
|
|
246
|
+
/** Unique payment intent ID. */
|
|
247
|
+
payment_id: string;
|
|
248
|
+
/** Merchant account ID that owns this payment. */
|
|
249
|
+
merchant_id: string;
|
|
250
|
+
/** Current lifecycle status of the payment intent. */
|
|
251
|
+
status: IntentStatus;
|
|
252
|
+
/** Authorised amount in minor units. */
|
|
253
|
+
amount: number;
|
|
254
|
+
/** Net amount after discounts and tax, in minor units. */
|
|
255
|
+
net_amount: number;
|
|
256
|
+
/** Amount still available to capture, in minor units. */
|
|
257
|
+
amount_capturable: number;
|
|
258
|
+
/** Connector-assigned merchant identifier. */
|
|
259
|
+
processor_merchant_id: string;
|
|
260
|
+
/** Three-letter ISO 4217 currency code. */
|
|
261
|
+
currency: Currency;
|
|
262
|
+
/** Payment method type used for this payment. */
|
|
263
|
+
payment_method: PaymentMethod;
|
|
264
|
+
/** Number of authorisation attempts made. */
|
|
265
|
+
attempt_count: number;
|
|
266
|
+
/** Tax amount included in the total, in minor units. */
|
|
267
|
+
order_tax_amount?: number | null;
|
|
268
|
+
/** Shipping cost included in the total, in minor units. */
|
|
269
|
+
shipping_cost?: number | null;
|
|
270
|
+
/** Actual captured amount, in minor units. Present after capture. */
|
|
271
|
+
amount_received?: number | null;
|
|
272
|
+
/** Capture method used. */
|
|
273
|
+
capture_method?: CaptureMethod | null;
|
|
274
|
+
/** Authentication type used (3DS or none). */
|
|
275
|
+
authentication_type?: AuthenticationType | null;
|
|
276
|
+
/** Associated customer ID. */
|
|
277
|
+
customer_id?: string | null;
|
|
278
|
+
/** Payment description. */
|
|
279
|
+
description?: string | null;
|
|
280
|
+
/** Redirect URL used after payment completion. */
|
|
281
|
+
return_url?: string | null;
|
|
282
|
+
/** Billing address. */
|
|
283
|
+
billing?: Address | null;
|
|
284
|
+
/** Shipping address. */
|
|
285
|
+
shipping?: Address | null;
|
|
286
|
+
/** Arbitrary key-value metadata. */
|
|
287
|
+
metadata?: Record<string, unknown> | null;
|
|
288
|
+
/** Payment method sub-type. */
|
|
289
|
+
payment_method_type?: PaymentMethodType | null;
|
|
290
|
+
/** Connector used to process this payment. */
|
|
291
|
+
connector?: string | null;
|
|
292
|
+
/** Gateway error code, if the payment failed. */
|
|
293
|
+
error_code?: string | null;
|
|
294
|
+
/** Human-readable error message, if the payment failed. */
|
|
295
|
+
error_message?: string | null;
|
|
296
|
+
/** Token representing the saved payment method. */
|
|
297
|
+
payment_token?: string | null;
|
|
298
|
+
/** Client secret for client-side confirmation (do not log or share). */
|
|
299
|
+
client_secret?: string | null;
|
|
300
|
+
/** ISO 8601 timestamp when the payment was created. */
|
|
301
|
+
created?: string | null;
|
|
302
|
+
/** ISO 8601 timestamp of the last status update. */
|
|
303
|
+
last_updated?: string | null;
|
|
304
|
+
/** Whether the payment method is saved for future use. */
|
|
305
|
+
setup_future_usage?: string | null;
|
|
306
|
+
/** Mandate ID associated with this payment. */
|
|
307
|
+
mandate_id?: string | null;
|
|
308
|
+
/** Shop (business profile) ID the payment was processed under. */
|
|
309
|
+
profile_id?: string | null;
|
|
310
|
+
/** Refunds issued against this payment. */
|
|
311
|
+
refunds?: RefundResponse[] | null;
|
|
312
|
+
/** Disputes raised against this payment. */
|
|
313
|
+
disputes?: DisputeResponse[] | null;
|
|
314
|
+
/** Instructions for completing additional customer actions (3DS redirect, etc.). */
|
|
315
|
+
next_action?: Record<string, unknown> | null;
|
|
316
|
+
/** Reason provided when the payment was cancelled. */
|
|
317
|
+
cancellation_reason?: string | null;
|
|
318
|
+
/** Bank statement descriptor (name portion). */
|
|
319
|
+
statement_descriptor_name?: string | null;
|
|
320
|
+
/** Bank statement descriptor (suffix portion). */
|
|
321
|
+
statement_descriptor_suffix?: string | null;
|
|
322
|
+
[key: string]: unknown;
|
|
323
|
+
}
|
|
324
|
+
interface PaymentListParams {
|
|
325
|
+
customer_id?: string | null;
|
|
326
|
+
starting_after?: string | null;
|
|
327
|
+
ending_before?: string | null;
|
|
328
|
+
limit?: number;
|
|
329
|
+
created?: string | null;
|
|
330
|
+
'created.lt'?: string | null;
|
|
331
|
+
'created.gt'?: string | null;
|
|
332
|
+
'created.lte'?: string | null;
|
|
333
|
+
'created.gte'?: string | null;
|
|
334
|
+
}
|
|
335
|
+
interface PaymentListResponse {
|
|
336
|
+
size: number;
|
|
337
|
+
data: PaymentResponse[];
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Parameters for creating a refund.
|
|
341
|
+
*
|
|
342
|
+
* Omit `amount` to issue a full refund. Provide a value less than the
|
|
343
|
+
* original payment amount for a partial refund.
|
|
344
|
+
*/
|
|
345
|
+
interface RefundCreateRequest {
|
|
346
|
+
/** ID of the payment to refund. */
|
|
347
|
+
payment_id: string;
|
|
348
|
+
/** Idempotency key — provide your own refund ID to avoid duplicate creation. */
|
|
349
|
+
refund_id?: string | null;
|
|
350
|
+
/** Merchant account ID (inferred from API key if omitted). */
|
|
351
|
+
merchant_id?: string | null;
|
|
352
|
+
/** Amount to refund in minor units. Defaults to the full payment amount. */
|
|
353
|
+
amount?: number | null;
|
|
354
|
+
/** Reason for the refund (stored for reporting purposes). */
|
|
355
|
+
reason?: string | null;
|
|
356
|
+
/** Refund processing type (`'instant'` or `'scheduled'`). */
|
|
357
|
+
refund_type?: RefundType | null;
|
|
358
|
+
/** Arbitrary key-value metadata stored alongside the refund. */
|
|
359
|
+
metadata?: Record<string, unknown> | null;
|
|
360
|
+
}
|
|
361
|
+
interface RefundUpdateRequest {
|
|
362
|
+
reason?: string | null;
|
|
363
|
+
metadata?: Record<string, unknown> | null;
|
|
364
|
+
}
|
|
365
|
+
/** A Delopay refund returned by the API. */
|
|
366
|
+
interface RefundResponse {
|
|
367
|
+
/** Unique refund ID. */
|
|
368
|
+
refund_id: string;
|
|
369
|
+
/** ID of the payment this refund belongs to. */
|
|
370
|
+
payment_id: string;
|
|
371
|
+
/** Refunded amount in minor units. */
|
|
372
|
+
amount: number;
|
|
373
|
+
/** Three-letter ISO 4217 currency code. */
|
|
374
|
+
currency: string;
|
|
375
|
+
/** Current status of the refund. */
|
|
376
|
+
status: RefundStatus;
|
|
377
|
+
/** Reason provided at creation. */
|
|
378
|
+
reason?: string | null;
|
|
379
|
+
/** Arbitrary key-value metadata. */
|
|
380
|
+
metadata?: Record<string, unknown> | null;
|
|
381
|
+
/** Human-readable error message if the refund failed. */
|
|
382
|
+
error_message?: string | null;
|
|
383
|
+
/** Gateway error code if the refund failed. */
|
|
384
|
+
error_code?: string | null;
|
|
385
|
+
/** Normalised cross-connector error code. */
|
|
386
|
+
unified_code?: string | null;
|
|
387
|
+
/** Normalised cross-connector error message. */
|
|
388
|
+
unified_message?: string | null;
|
|
389
|
+
/** ISO 8601 timestamp when the refund was created. */
|
|
390
|
+
created_at?: string | null;
|
|
391
|
+
/** ISO 8601 timestamp of the last status update. */
|
|
392
|
+
updated_at?: string | null;
|
|
393
|
+
/** Connector that processed the refund. */
|
|
394
|
+
connector?: string | null;
|
|
395
|
+
/** Shop (business profile) ID the refund was processed under. */
|
|
396
|
+
profile_id?: string | null;
|
|
397
|
+
/** Connector account ID used. */
|
|
398
|
+
merchant_connector_id?: string | null;
|
|
399
|
+
}
|
|
400
|
+
interface RefundListParams {
|
|
401
|
+
payment_id?: string | null;
|
|
402
|
+
refund_id?: string | null;
|
|
403
|
+
profile_id?: string | null;
|
|
404
|
+
limit?: number | null;
|
|
405
|
+
offset?: number | null;
|
|
406
|
+
start_time?: string | null;
|
|
407
|
+
end_time?: string | null;
|
|
408
|
+
connector?: string[] | null;
|
|
409
|
+
currency?: Currency[] | null;
|
|
410
|
+
refund_status?: RefundStatus[] | null;
|
|
411
|
+
}
|
|
412
|
+
interface RefundListResponse {
|
|
413
|
+
count: number;
|
|
414
|
+
data: RefundResponse[];
|
|
415
|
+
total_count?: number | null;
|
|
416
|
+
}
|
|
417
|
+
/** Parameters for creating a new customer. */
|
|
418
|
+
interface CustomerCreateRequest {
|
|
419
|
+
/** Idempotency key — provide your own customer ID to avoid duplicate creation. */
|
|
420
|
+
customer_id?: string | null;
|
|
421
|
+
/** Customer's full name. */
|
|
422
|
+
name?: string | null;
|
|
423
|
+
/** Customer's email address. */
|
|
424
|
+
email?: string | null;
|
|
425
|
+
/** Customer's phone number (digits only, without country code). */
|
|
426
|
+
phone?: string | null;
|
|
427
|
+
/** Internal notes about the customer. */
|
|
428
|
+
description?: string | null;
|
|
429
|
+
/** Customer's phone country code (e.g. `'+44'`). */
|
|
430
|
+
phone_country_code?: string | null;
|
|
431
|
+
/** Customer's default billing/shipping address. */
|
|
432
|
+
address?: AddressDetails | null;
|
|
433
|
+
/** Arbitrary key-value metadata stored alongside the customer. */
|
|
434
|
+
metadata?: Record<string, unknown> | null;
|
|
435
|
+
/** VAT or tax registration number for B2B invoicing. */
|
|
436
|
+
tax_registration_id?: string | null;
|
|
437
|
+
}
|
|
438
|
+
interface CustomerUpdateRequest {
|
|
439
|
+
name?: string | null;
|
|
440
|
+
email?: string | null;
|
|
441
|
+
phone?: string | null;
|
|
442
|
+
description?: string | null;
|
|
443
|
+
phone_country_code?: string | null;
|
|
444
|
+
address?: AddressDetails | null;
|
|
445
|
+
metadata?: Record<string, unknown> | null;
|
|
446
|
+
tax_registration_id?: string | null;
|
|
447
|
+
}
|
|
448
|
+
/** A Delopay customer returned by the API. */
|
|
449
|
+
interface CustomerResponse {
|
|
450
|
+
/** Unique customer ID. */
|
|
451
|
+
customer_id: string;
|
|
452
|
+
/** ISO 8601 timestamp when the customer was created. */
|
|
453
|
+
created_at: string;
|
|
454
|
+
/** Customer's full name. */
|
|
455
|
+
name?: string | null;
|
|
456
|
+
/** Customer's email address. */
|
|
457
|
+
email?: string | null;
|
|
458
|
+
/** Customer's phone number. */
|
|
459
|
+
phone?: string | null;
|
|
460
|
+
/** Customer's phone country code. */
|
|
461
|
+
phone_country_code?: string | null;
|
|
462
|
+
/** Internal notes. */
|
|
463
|
+
description?: string | null;
|
|
464
|
+
/** Customer's default address. */
|
|
465
|
+
address?: AddressDetails | null;
|
|
466
|
+
/** Arbitrary key-value metadata. */
|
|
467
|
+
metadata?: Record<string, unknown> | null;
|
|
468
|
+
/** ID of the customer's default saved payment method, if any. */
|
|
469
|
+
default_payment_method_id?: string | null;
|
|
470
|
+
}
|
|
471
|
+
interface CustomerListParams {
|
|
472
|
+
limit?: number | null;
|
|
473
|
+
offset?: number | null;
|
|
474
|
+
email?: string | null;
|
|
475
|
+
}
|
|
476
|
+
interface PaymentMethodCreateRequest {
|
|
477
|
+
payment_method: PaymentMethod;
|
|
478
|
+
payment_method_type?: PaymentMethodType | null;
|
|
479
|
+
payment_method_issuer?: string | null;
|
|
480
|
+
card?: CardDetail | null;
|
|
481
|
+
metadata?: Record<string, unknown> | null;
|
|
482
|
+
customer_id?: string | null;
|
|
483
|
+
card_network?: string | null;
|
|
484
|
+
bank_transfer?: Record<string, unknown> | null;
|
|
485
|
+
wallet?: Record<string, unknown> | null;
|
|
486
|
+
client_secret?: string | null;
|
|
487
|
+
billing?: Address | null;
|
|
488
|
+
}
|
|
489
|
+
interface PaymentMethodUpdateRequest {
|
|
490
|
+
card?: {
|
|
491
|
+
card_exp_month?: string | null;
|
|
492
|
+
card_exp_year?: string | null;
|
|
493
|
+
card_holder_name?: string | null;
|
|
494
|
+
} | null;
|
|
495
|
+
wallet?: Record<string, unknown> | null;
|
|
496
|
+
client_secret?: string | null;
|
|
497
|
+
}
|
|
498
|
+
interface PaymentMethodResponse {
|
|
499
|
+
merchant_id: string;
|
|
500
|
+
payment_method_id: string;
|
|
501
|
+
payment_method: PaymentMethod;
|
|
502
|
+
customer_id?: string | null;
|
|
503
|
+
payment_method_type?: PaymentMethodType | null;
|
|
504
|
+
card?: CardDetailFromLocker | null;
|
|
505
|
+
recurring_enabled?: boolean | null;
|
|
506
|
+
installment_payment_enabled?: boolean | null;
|
|
507
|
+
payment_experience?: string[] | null;
|
|
508
|
+
metadata?: Record<string, unknown> | null;
|
|
509
|
+
created?: string | null;
|
|
510
|
+
last_used_at?: string | null;
|
|
511
|
+
client_secret?: string | null;
|
|
512
|
+
status?: string | null;
|
|
513
|
+
billing?: Address | null;
|
|
514
|
+
}
|
|
515
|
+
interface PaymentMethodListParams {
|
|
516
|
+
client_secret?: string | null;
|
|
517
|
+
}
|
|
518
|
+
interface CustomerPaymentMethodsListResponse {
|
|
519
|
+
customer_payment_methods: PaymentMethodResponse[];
|
|
520
|
+
is_guest_customer?: boolean | null;
|
|
521
|
+
}
|
|
522
|
+
interface PaymentMethodDeleteResponse {
|
|
523
|
+
payment_method_id: string;
|
|
524
|
+
deleted: boolean;
|
|
525
|
+
}
|
|
526
|
+
interface DisputeResponse {
|
|
527
|
+
dispute_id: string;
|
|
528
|
+
payment_id: string;
|
|
529
|
+
attempt_id: string;
|
|
530
|
+
amount: string;
|
|
531
|
+
currency: Currency;
|
|
532
|
+
dispute_stage: DisputeStage;
|
|
533
|
+
dispute_status: DisputeStatus;
|
|
534
|
+
connector: string;
|
|
535
|
+
connector_status: string;
|
|
536
|
+
connector_dispute_id: string;
|
|
537
|
+
is_already_refunded: boolean;
|
|
538
|
+
connector_reason?: string | null;
|
|
539
|
+
connector_reason_code?: string | null;
|
|
540
|
+
challenge_required_by?: string | null;
|
|
541
|
+
connector_created_at?: string | null;
|
|
542
|
+
connector_updated_at?: string | null;
|
|
543
|
+
created_at?: string | null;
|
|
544
|
+
updated_at?: string | null;
|
|
545
|
+
profile_id?: string | null;
|
|
546
|
+
merchant_connector_id?: string | null;
|
|
547
|
+
}
|
|
548
|
+
interface DisputeListParams {
|
|
549
|
+
limit?: number | null;
|
|
550
|
+
dispute_status?: DisputeStatus | null;
|
|
551
|
+
dispute_stage?: DisputeStage | null;
|
|
552
|
+
reason?: string | null;
|
|
553
|
+
connector?: string | null;
|
|
554
|
+
received_time?: string | null;
|
|
555
|
+
'received_time.lt'?: string | null;
|
|
556
|
+
'received_time.gt'?: string | null;
|
|
557
|
+
'received_time.lte'?: string | null;
|
|
558
|
+
'received_time.gte'?: string | null;
|
|
559
|
+
}
|
|
560
|
+
interface DisputeEvidenceRequest {
|
|
561
|
+
cancel_dispute?: boolean | null;
|
|
562
|
+
customer_email_body?: string | null;
|
|
563
|
+
customer_email_address?: string | null;
|
|
564
|
+
customer_name?: string | null;
|
|
565
|
+
customer_signature?: string | null;
|
|
566
|
+
product_description?: string | null;
|
|
567
|
+
receipt?: string | null;
|
|
568
|
+
refund_policy?: string | null;
|
|
569
|
+
refund_policy_disclosure?: string | null;
|
|
570
|
+
refund_refusal_explanation?: string | null;
|
|
571
|
+
service_date?: string | null;
|
|
572
|
+
service_documentation?: string | null;
|
|
573
|
+
shipping_address?: string | null;
|
|
574
|
+
shipping_carrier?: string | null;
|
|
575
|
+
shipping_date?: string | null;
|
|
576
|
+
shipping_documentation?: string | null;
|
|
577
|
+
shipping_tracking_number?: string | null;
|
|
578
|
+
uncategorized_file?: string | null;
|
|
579
|
+
uncategorized_text?: string | null;
|
|
580
|
+
access_activity_log?: string | null;
|
|
581
|
+
billing_address?: string | null;
|
|
582
|
+
cancellation_policy?: string | null;
|
|
583
|
+
cancellation_policy_disclosure?: string | null;
|
|
584
|
+
cancellation_rebuttal?: string | null;
|
|
585
|
+
customer_communication?: string | null;
|
|
586
|
+
customer_purchase_ip?: string | null;
|
|
587
|
+
duplicate_charge_documentation?: string | null;
|
|
588
|
+
duplicate_charge_explanation?: string | null;
|
|
589
|
+
duplicate_charge_id?: string | null;
|
|
590
|
+
}
|
|
591
|
+
interface MandateResponse {
|
|
592
|
+
mandate_id: string;
|
|
593
|
+
status: MandateStatus;
|
|
594
|
+
payment_method_id: string;
|
|
595
|
+
payment_method: string;
|
|
596
|
+
payment_method_type?: string | null;
|
|
597
|
+
card?: {
|
|
598
|
+
last4_digits?: string | null;
|
|
599
|
+
card_exp_month?: string | null;
|
|
600
|
+
card_exp_year?: string | null;
|
|
601
|
+
card_holder_name?: string | null;
|
|
602
|
+
card_network?: string | null;
|
|
603
|
+
card_isin?: string | null;
|
|
604
|
+
} | null;
|
|
605
|
+
customer_acceptance?: {
|
|
606
|
+
acceptance_type?: string | null;
|
|
607
|
+
accepted_at?: string | null;
|
|
608
|
+
online?: Record<string, unknown> | null;
|
|
609
|
+
} | null;
|
|
610
|
+
}
|
|
611
|
+
interface MandateListParams {
|
|
612
|
+
mandate_status?: MandateStatus | null;
|
|
613
|
+
}
|
|
614
|
+
interface MandateRevokedResponse {
|
|
615
|
+
mandate_id: string;
|
|
616
|
+
status: MandateStatus;
|
|
617
|
+
error_code?: string | null;
|
|
618
|
+
error_message?: string | null;
|
|
619
|
+
}
|
|
620
|
+
interface ShopCreateRequest {
|
|
621
|
+
shop_name: string;
|
|
622
|
+
return_url?: string | null;
|
|
623
|
+
webhook_url?: string | null;
|
|
624
|
+
project_id?: string | null;
|
|
625
|
+
}
|
|
626
|
+
interface ShopUpdateRequest {
|
|
627
|
+
shop_name?: string | null;
|
|
628
|
+
return_url?: string | null;
|
|
629
|
+
webhook_url?: string | null;
|
|
630
|
+
is_active?: boolean | null;
|
|
631
|
+
}
|
|
632
|
+
interface ShopResponse {
|
|
633
|
+
shop_id: string;
|
|
634
|
+
shop_name: string;
|
|
635
|
+
is_active: boolean;
|
|
636
|
+
created_at: string;
|
|
637
|
+
modified_at: string;
|
|
638
|
+
return_url?: string | null;
|
|
639
|
+
webhook_url?: string | null;
|
|
640
|
+
project_id?: string | null;
|
|
641
|
+
}
|
|
642
|
+
interface ShopStats {
|
|
643
|
+
shop_id: string;
|
|
644
|
+
shop_name: string;
|
|
645
|
+
orders: number;
|
|
646
|
+
revenue: number;
|
|
647
|
+
}
|
|
648
|
+
interface GatewayConnectRequest {
|
|
649
|
+
connector_type: ConnectorType;
|
|
650
|
+
connector_name: string;
|
|
651
|
+
connector_label?: string | null;
|
|
652
|
+
profile_id?: string | null;
|
|
653
|
+
connector_account_details?: Record<string, unknown> | null;
|
|
654
|
+
payment_methods_enabled?: Record<string, unknown>[] | null;
|
|
655
|
+
metadata?: Record<string, unknown> | null;
|
|
656
|
+
test_mode?: boolean | null;
|
|
657
|
+
disabled?: boolean | null;
|
|
658
|
+
connector_webhook_details?: Record<string, unknown> | null;
|
|
659
|
+
additional_merchant_data?: Record<string, unknown> | null;
|
|
660
|
+
}
|
|
661
|
+
interface GatewayResponse {
|
|
662
|
+
connector_type: ConnectorType;
|
|
663
|
+
connector_name: string;
|
|
664
|
+
merchant_connector_id: string;
|
|
665
|
+
profile_id: string;
|
|
666
|
+
status: string;
|
|
667
|
+
connector_label?: string | null;
|
|
668
|
+
connector_account_details?: Record<string, unknown> | null;
|
|
669
|
+
payment_methods_enabled?: Record<string, unknown>[] | null;
|
|
670
|
+
metadata?: Record<string, unknown> | null;
|
|
671
|
+
test_mode?: boolean | null;
|
|
672
|
+
disabled?: boolean | null;
|
|
673
|
+
created_at?: string | null;
|
|
674
|
+
}
|
|
675
|
+
interface BillingProfileResponse {
|
|
676
|
+
id: string;
|
|
677
|
+
merchant_id: string;
|
|
678
|
+
has_payment_method: boolean;
|
|
679
|
+
balance_amount: number;
|
|
680
|
+
balance_currency: string;
|
|
681
|
+
billing_status: string;
|
|
682
|
+
auto_recharge: AutoRechargeConfig;
|
|
683
|
+
hard_floor_amount: number;
|
|
684
|
+
consecutive_recharge_failures: number;
|
|
685
|
+
stripe_customer_id?: string | null;
|
|
686
|
+
suspended_at?: string | null;
|
|
687
|
+
created_at: string;
|
|
688
|
+
modified_at: string;
|
|
689
|
+
}
|
|
690
|
+
interface BillingSetupRequest {
|
|
691
|
+
balance_currency?: string | null;
|
|
692
|
+
}
|
|
693
|
+
interface BillingSetupResponse {
|
|
694
|
+
billing_profile_id: string;
|
|
695
|
+
merchant_id: string;
|
|
696
|
+
stripe_customer_id: string;
|
|
697
|
+
setup_intent_id: string;
|
|
698
|
+
setup_intent_client_secret: string;
|
|
699
|
+
billing_status: string;
|
|
700
|
+
}
|
|
701
|
+
interface BillingCompleteSetupRequest {
|
|
702
|
+
setup_intent_id: string;
|
|
703
|
+
}
|
|
704
|
+
interface TopupRequest {
|
|
705
|
+
amount: number;
|
|
706
|
+
}
|
|
707
|
+
interface TopupResponse {
|
|
708
|
+
payment_intent_id: string;
|
|
709
|
+
status: string;
|
|
710
|
+
amount: number;
|
|
711
|
+
currency: string;
|
|
712
|
+
}
|
|
713
|
+
interface LedgerEntry {
|
|
714
|
+
id: string;
|
|
715
|
+
entry_type: string;
|
|
716
|
+
amount: number;
|
|
717
|
+
currency: string;
|
|
718
|
+
reference_kind: string;
|
|
719
|
+
reference_id: string;
|
|
720
|
+
balance_after: number;
|
|
721
|
+
created_at: string;
|
|
722
|
+
original_amount?: number | null;
|
|
723
|
+
original_currency?: string | null;
|
|
724
|
+
description?: string | null;
|
|
725
|
+
profile_id?: string | null;
|
|
726
|
+
}
|
|
727
|
+
interface LedgerResponse {
|
|
728
|
+
entries: LedgerEntry[];
|
|
729
|
+
total_count?: number | null;
|
|
730
|
+
}
|
|
731
|
+
interface LedgerListParams {
|
|
732
|
+
limit?: number | null;
|
|
733
|
+
offset?: number | null;
|
|
734
|
+
profile_id?: string | null;
|
|
735
|
+
}
|
|
736
|
+
interface AutoRechargeUpdateRequest {
|
|
737
|
+
enabled?: boolean | null;
|
|
738
|
+
threshold_amount?: number | null;
|
|
739
|
+
recharge_amount?: number | null;
|
|
740
|
+
}
|
|
741
|
+
interface AdminAdjustmentRequest {
|
|
742
|
+
amount: number;
|
|
743
|
+
description: string;
|
|
744
|
+
}
|
|
745
|
+
interface AdminAdjustmentResponse {
|
|
746
|
+
ledger_entry_id: string;
|
|
747
|
+
new_balance: number;
|
|
748
|
+
}
|
|
749
|
+
interface AllocationTransferRequest {
|
|
750
|
+
profile_id: string;
|
|
751
|
+
amount: number;
|
|
752
|
+
}
|
|
753
|
+
interface AllocationTransferResponse {
|
|
754
|
+
allocation_id: string;
|
|
755
|
+
profile_id: string;
|
|
756
|
+
allocation_balance: number;
|
|
757
|
+
host_balance: number;
|
|
758
|
+
ledger_entry_id: string;
|
|
759
|
+
}
|
|
760
|
+
interface AllocationResponse {
|
|
761
|
+
id: string;
|
|
762
|
+
merchant_id: string;
|
|
763
|
+
profile_id: string;
|
|
764
|
+
balance_amount: number;
|
|
765
|
+
balance_currency: string;
|
|
766
|
+
allocation_status: string;
|
|
767
|
+
created_at: string;
|
|
768
|
+
modified_at: string;
|
|
769
|
+
}
|
|
770
|
+
interface AllocationListResponse {
|
|
771
|
+
allocations: AllocationResponse[];
|
|
772
|
+
}
|
|
773
|
+
interface FeeScheduleCreateRequest {
|
|
774
|
+
fee_type: FeeType;
|
|
775
|
+
shop_id?: string | null;
|
|
776
|
+
percentage_fee?: number | null;
|
|
777
|
+
flat_fee_amount?: number | null;
|
|
778
|
+
flat_fee_currency?: string | null;
|
|
779
|
+
min_fee_amount?: number | null;
|
|
780
|
+
max_fee_amount?: number | null;
|
|
781
|
+
description?: string | null;
|
|
782
|
+
}
|
|
783
|
+
interface FeeScheduleUpdateRequest {
|
|
784
|
+
fee_type?: FeeType | null;
|
|
785
|
+
percentage_fee?: number | null;
|
|
786
|
+
flat_fee_amount?: number | null;
|
|
787
|
+
flat_fee_currency?: string | null;
|
|
788
|
+
min_fee_amount?: number | null;
|
|
789
|
+
max_fee_amount?: number | null;
|
|
790
|
+
description?: string | null;
|
|
791
|
+
is_active?: boolean | null;
|
|
792
|
+
}
|
|
793
|
+
interface FeeScheduleResponse {
|
|
794
|
+
id: string;
|
|
795
|
+
merchant_id: string;
|
|
796
|
+
fee_type: FeeType;
|
|
797
|
+
is_active: boolean;
|
|
798
|
+
fee_owner: FeeOwner;
|
|
799
|
+
shop_id?: string | null;
|
|
800
|
+
percentage_fee?: number | null;
|
|
801
|
+
flat_fee_amount?: number | null;
|
|
802
|
+
flat_fee_currency?: string | null;
|
|
803
|
+
min_fee_amount?: number | null;
|
|
804
|
+
max_fee_amount?: number | null;
|
|
805
|
+
description?: string | null;
|
|
806
|
+
}
|
|
807
|
+
interface ProjectCreateRequest {
|
|
808
|
+
project_name: string;
|
|
809
|
+
description?: string | null;
|
|
810
|
+
}
|
|
811
|
+
interface ProjectUpdateRequest {
|
|
812
|
+
project_name?: string | null;
|
|
813
|
+
description?: string | null;
|
|
814
|
+
is_active?: boolean | null;
|
|
815
|
+
}
|
|
816
|
+
interface ProjectResponse {
|
|
817
|
+
id: string;
|
|
818
|
+
merchant_id: string;
|
|
819
|
+
project_name: string;
|
|
820
|
+
is_active: boolean;
|
|
821
|
+
created_at: string;
|
|
822
|
+
modified_at: string;
|
|
823
|
+
description?: string | null;
|
|
824
|
+
}
|
|
825
|
+
interface ProjectStats {
|
|
826
|
+
project_id: string;
|
|
827
|
+
project_name: string;
|
|
828
|
+
orders: number;
|
|
829
|
+
revenue: number;
|
|
830
|
+
shops: ShopStats[];
|
|
831
|
+
}
|
|
832
|
+
interface ProjectStatsResponse {
|
|
833
|
+
projects: ProjectStats[];
|
|
834
|
+
total_orders: number;
|
|
835
|
+
total_revenue: number;
|
|
836
|
+
period_days: number;
|
|
837
|
+
}
|
|
838
|
+
interface MerchantOverviewStat {
|
|
839
|
+
label: string;
|
|
840
|
+
value: number;
|
|
841
|
+
change_percent: number;
|
|
842
|
+
}
|
|
843
|
+
interface MerchantOverviewResponse {
|
|
844
|
+
total_shops: MerchantOverviewStat;
|
|
845
|
+
active_shops: MerchantOverviewStat;
|
|
846
|
+
total_revenue: MerchantOverviewStat;
|
|
847
|
+
total_orders: MerchantOverviewStat;
|
|
848
|
+
}
|
|
849
|
+
interface ApiKeyCreateRequest {
|
|
850
|
+
name: string;
|
|
851
|
+
expiration: ApiKeyExpiration;
|
|
852
|
+
description?: string | null;
|
|
853
|
+
}
|
|
854
|
+
interface ApiKeyUpdateRequest {
|
|
855
|
+
name?: string | null;
|
|
856
|
+
description?: string | null;
|
|
857
|
+
expiration?: ApiKeyExpiration | null;
|
|
858
|
+
}
|
|
859
|
+
/** Returned only on creation — includes the plaintext api_key */
|
|
860
|
+
interface ApiKeyCreateResponse {
|
|
861
|
+
key_id: string;
|
|
862
|
+
merchant_id: string;
|
|
863
|
+
name: string;
|
|
864
|
+
api_key: string;
|
|
865
|
+
created: string;
|
|
866
|
+
expiration: ApiKeyExpiration;
|
|
867
|
+
description?: string | null;
|
|
868
|
+
}
|
|
869
|
+
/** Returned on retrieve/list — no plaintext key, only prefix */
|
|
870
|
+
interface ApiKeyResponse {
|
|
871
|
+
key_id: string;
|
|
872
|
+
merchant_id: string;
|
|
873
|
+
name: string;
|
|
874
|
+
prefix: string;
|
|
875
|
+
created: string;
|
|
876
|
+
expiration: ApiKeyExpiration;
|
|
877
|
+
description?: string | null;
|
|
878
|
+
}
|
|
879
|
+
interface ApiKeyRevokeResponse {
|
|
880
|
+
merchant_id: string;
|
|
881
|
+
key_id: string;
|
|
882
|
+
revoked: boolean;
|
|
883
|
+
}
|
|
884
|
+
interface EphemeralKeyCreateRequest {
|
|
885
|
+
customer_id: string;
|
|
886
|
+
}
|
|
887
|
+
interface EphemeralKeyCreateResponse {
|
|
888
|
+
customer_id: string;
|
|
889
|
+
created_at: number;
|
|
890
|
+
expires: number;
|
|
891
|
+
secret: string;
|
|
892
|
+
}
|
|
893
|
+
interface PaymentLinkResponse {
|
|
894
|
+
link: string;
|
|
895
|
+
payment_link_id: string;
|
|
896
|
+
secure_link?: string | null;
|
|
897
|
+
}
|
|
898
|
+
interface PaymentLinkListParams {
|
|
899
|
+
limit?: number | null;
|
|
900
|
+
created?: string | null;
|
|
901
|
+
'created.lt'?: string | null;
|
|
902
|
+
'created.gt'?: string | null;
|
|
903
|
+
'created.lte'?: string | null;
|
|
904
|
+
'created.gte'?: string | null;
|
|
905
|
+
}
|
|
906
|
+
interface PaymentLinkListResponse {
|
|
907
|
+
size: number;
|
|
908
|
+
data: PaymentLinkResponse[];
|
|
909
|
+
}
|
|
910
|
+
interface RoutingConfigCreateRequest {
|
|
911
|
+
name?: string | null;
|
|
912
|
+
description?: string | null;
|
|
913
|
+
algorithm?: Record<string, unknown> | null;
|
|
914
|
+
profile_id?: string | null;
|
|
915
|
+
transaction_type?: TransactionType | null;
|
|
916
|
+
}
|
|
917
|
+
interface RoutingConfigResponse {
|
|
918
|
+
id?: string | null;
|
|
919
|
+
name?: string | null;
|
|
920
|
+
description?: string | null;
|
|
921
|
+
algorithm?: Record<string, unknown> | null;
|
|
922
|
+
profile_id?: string | null;
|
|
923
|
+
created_at?: string | null;
|
|
924
|
+
modified_at?: string | null;
|
|
925
|
+
[key: string]: unknown;
|
|
926
|
+
}
|
|
927
|
+
interface PayoutCreateRequest {
|
|
928
|
+
amount: number;
|
|
929
|
+
currency: Currency;
|
|
930
|
+
merchant_order_reference_id?: string | null;
|
|
931
|
+
routing?: Record<string, unknown> | null;
|
|
932
|
+
connector?: string[] | null;
|
|
933
|
+
confirm?: boolean | null;
|
|
934
|
+
payout_type?: PayoutType | null;
|
|
935
|
+
payout_method_data?: Record<string, unknown> | null;
|
|
936
|
+
billing?: Address | null;
|
|
937
|
+
customer_id?: string | null;
|
|
938
|
+
customer?: Record<string, unknown> | null;
|
|
939
|
+
description?: string | null;
|
|
940
|
+
return_url?: string | null;
|
|
941
|
+
entity_type?: string | null;
|
|
942
|
+
metadata?: Record<string, unknown> | null;
|
|
943
|
+
profile_id?: string | null;
|
|
944
|
+
session_expiry?: number | null;
|
|
945
|
+
payout_link?: boolean | null;
|
|
946
|
+
auto_fulfill?: boolean | null;
|
|
947
|
+
}
|
|
948
|
+
interface PayoutUpdateRequest {
|
|
949
|
+
merchant_order_reference_id?: string | null;
|
|
950
|
+
amount?: number | null;
|
|
951
|
+
currency?: Currency | null;
|
|
952
|
+
routing?: Record<string, unknown> | null;
|
|
953
|
+
connector?: string[] | null;
|
|
954
|
+
confirm?: boolean | null;
|
|
955
|
+
payout_type?: PayoutType | null;
|
|
956
|
+
payout_method_data?: Record<string, unknown> | null;
|
|
957
|
+
billing?: Address | null;
|
|
958
|
+
customer_id?: string | null;
|
|
959
|
+
description?: string | null;
|
|
960
|
+
return_url?: string | null;
|
|
961
|
+
entity_type?: string | null;
|
|
962
|
+
metadata?: Record<string, unknown> | null;
|
|
963
|
+
}
|
|
964
|
+
interface PayoutResponse {
|
|
965
|
+
payout_id: string;
|
|
966
|
+
merchant_id: string;
|
|
967
|
+
amount: number;
|
|
968
|
+
currency: Currency;
|
|
969
|
+
auto_fulfill: boolean;
|
|
970
|
+
customer_id: string;
|
|
971
|
+
client_secret: string;
|
|
972
|
+
return_url: string;
|
|
973
|
+
business_country: string;
|
|
974
|
+
entity_type: string;
|
|
975
|
+
recurring: boolean;
|
|
976
|
+
status: PayoutStatus;
|
|
977
|
+
profile_id: string;
|
|
978
|
+
merchant_order_reference_id?: string | null;
|
|
979
|
+
connector?: string | null;
|
|
980
|
+
payout_type?: PayoutType | null;
|
|
981
|
+
payout_method_data?: Record<string, unknown> | null;
|
|
982
|
+
billing?: Address | null;
|
|
983
|
+
description?: string | null;
|
|
984
|
+
metadata?: Record<string, unknown> | null;
|
|
985
|
+
error_code?: string | null;
|
|
986
|
+
error_message?: string | null;
|
|
987
|
+
created?: string | null;
|
|
988
|
+
[key: string]: unknown;
|
|
989
|
+
}
|
|
990
|
+
interface PayoutListParams {
|
|
991
|
+
customer_id?: string | null;
|
|
992
|
+
starting_after?: string | null;
|
|
993
|
+
ending_before?: string | null;
|
|
994
|
+
limit?: number;
|
|
995
|
+
created?: string | null;
|
|
996
|
+
start_time?: string | null;
|
|
997
|
+
end_time?: string | null;
|
|
998
|
+
}
|
|
999
|
+
interface PayoutListResponse {
|
|
1000
|
+
size: number;
|
|
1001
|
+
data: PayoutResponse[];
|
|
1002
|
+
total_count?: number | null;
|
|
1003
|
+
}
|
|
1004
|
+
interface SignUpRequest {
|
|
1005
|
+
email: string;
|
|
1006
|
+
password: string;
|
|
1007
|
+
}
|
|
1008
|
+
/** Full signup with merchant details */
|
|
1009
|
+
interface SignUpWithMerchantRequest {
|
|
1010
|
+
name: string;
|
|
1011
|
+
email: string;
|
|
1012
|
+
password: string;
|
|
1013
|
+
company_name: string;
|
|
1014
|
+
organization_type?: string | null;
|
|
1015
|
+
}
|
|
1016
|
+
interface SignInRequest {
|
|
1017
|
+
email: string;
|
|
1018
|
+
password: string;
|
|
1019
|
+
}
|
|
1020
|
+
interface AuthResponse {
|
|
1021
|
+
token: string;
|
|
1022
|
+
token_type?: string | null;
|
|
1023
|
+
expires?: number | null;
|
|
1024
|
+
[key: string]: unknown;
|
|
1025
|
+
}
|
|
1026
|
+
interface UserResponse {
|
|
1027
|
+
merchant_id: string;
|
|
1028
|
+
name: string;
|
|
1029
|
+
email: string;
|
|
1030
|
+
role_id: string;
|
|
1031
|
+
is_two_factor_auth_setup: boolean;
|
|
1032
|
+
profile_id: string;
|
|
1033
|
+
entity_type: string;
|
|
1034
|
+
version: string;
|
|
1035
|
+
verification_days_left?: number | null;
|
|
1036
|
+
recovery_codes_left?: number | null;
|
|
1037
|
+
theme_id?: string | null;
|
|
1038
|
+
}
|
|
1039
|
+
interface ChangePasswordRequest {
|
|
1040
|
+
old_password: string;
|
|
1041
|
+
new_password: string;
|
|
1042
|
+
}
|
|
1043
|
+
interface ForgotPasswordRequest {
|
|
1044
|
+
email: string;
|
|
1045
|
+
}
|
|
1046
|
+
interface ResetPasswordRequest {
|
|
1047
|
+
token: string;
|
|
1048
|
+
password: string;
|
|
1049
|
+
}
|
|
1050
|
+
interface SwitchMerchantRequest {
|
|
1051
|
+
merchant_id: string;
|
|
1052
|
+
}
|
|
1053
|
+
interface SwitchProfileRequest {
|
|
1054
|
+
profile_id: string;
|
|
1055
|
+
}
|
|
1056
|
+
interface InviteUsersRequest {
|
|
1057
|
+
email: string;
|
|
1058
|
+
role_id: string;
|
|
1059
|
+
}
|
|
1060
|
+
interface InviteUsersResponse {
|
|
1061
|
+
email: string;
|
|
1062
|
+
is_email_sent: boolean;
|
|
1063
|
+
password?: string | null;
|
|
1064
|
+
error?: string | null;
|
|
1065
|
+
}
|
|
1066
|
+
interface TotpResponse {
|
|
1067
|
+
secret?: {
|
|
1068
|
+
secret: string;
|
|
1069
|
+
totp_url: string;
|
|
1070
|
+
} | null;
|
|
1071
|
+
}
|
|
1072
|
+
interface RecoveryCodesResponse {
|
|
1073
|
+
recovery_codes: string[];
|
|
1074
|
+
}
|
|
1075
|
+
interface PhoneOtpRequest {
|
|
1076
|
+
phone_number: string;
|
|
1077
|
+
}
|
|
1078
|
+
interface PhoneOtpResponse {
|
|
1079
|
+
message: string;
|
|
1080
|
+
}
|
|
1081
|
+
interface PhoneOtpVerifyRequest {
|
|
1082
|
+
phone_number: string;
|
|
1083
|
+
code: string;
|
|
1084
|
+
}
|
|
1085
|
+
interface PhoneOtpVerifyResponse {
|
|
1086
|
+
verified: boolean;
|
|
1087
|
+
}
|
|
1088
|
+
type DashboardMetadataResponse = Record<string, unknown>;
|
|
1089
|
+
interface UpdateUserDetailsRequest {
|
|
1090
|
+
name?: string | null;
|
|
1091
|
+
}
|
|
1092
|
+
interface AdminSignInRequest {
|
|
1093
|
+
email: string;
|
|
1094
|
+
password: string;
|
|
1095
|
+
}
|
|
1096
|
+
interface AdminCustomerListParams {
|
|
1097
|
+
search?: string | null;
|
|
1098
|
+
is_active?: boolean | null;
|
|
1099
|
+
offset?: number | null;
|
|
1100
|
+
limit?: number | null;
|
|
1101
|
+
}
|
|
1102
|
+
interface CustomerSummary {
|
|
1103
|
+
customer_id: string;
|
|
1104
|
+
organization_id: string;
|
|
1105
|
+
shop_count: number;
|
|
1106
|
+
is_active: boolean;
|
|
1107
|
+
created_at: string;
|
|
1108
|
+
customer_name?: string | null;
|
|
1109
|
+
email?: string | null;
|
|
1110
|
+
}
|
|
1111
|
+
interface AdminCustomerListResponse {
|
|
1112
|
+
customers: CustomerSummary[];
|
|
1113
|
+
total_count: number;
|
|
1114
|
+
offset: number;
|
|
1115
|
+
limit: number;
|
|
1116
|
+
}
|
|
1117
|
+
interface CustomerUser {
|
|
1118
|
+
user_id: string;
|
|
1119
|
+
email?: string | null;
|
|
1120
|
+
name?: string | null;
|
|
1121
|
+
role_id?: string | null;
|
|
1122
|
+
is_active: boolean;
|
|
1123
|
+
created_at: string;
|
|
1124
|
+
}
|
|
1125
|
+
interface AdminCustomerDetail {
|
|
1126
|
+
customer_id: string;
|
|
1127
|
+
organization_id: string;
|
|
1128
|
+
employee_count: number;
|
|
1129
|
+
total_transactions: number;
|
|
1130
|
+
total_volume: number;
|
|
1131
|
+
created_at: string;
|
|
1132
|
+
customer_name?: string | null;
|
|
1133
|
+
projects: ProjectResponse[];
|
|
1134
|
+
shops: ShopResponse[];
|
|
1135
|
+
users: CustomerUser[];
|
|
1136
|
+
}
|
|
1137
|
+
interface AdminTransactionListParams {
|
|
1138
|
+
merchant_id?: string | null;
|
|
1139
|
+
shop_id?: string | null;
|
|
1140
|
+
status?: string | null;
|
|
1141
|
+
start_date?: string | null;
|
|
1142
|
+
end_date?: string | null;
|
|
1143
|
+
offset?: number | null;
|
|
1144
|
+
limit?: number | null;
|
|
1145
|
+
}
|
|
1146
|
+
interface AdminTransactionListResponse {
|
|
1147
|
+
data: PaymentResponse[];
|
|
1148
|
+
total_count?: number | null;
|
|
1149
|
+
}
|
|
1150
|
+
interface AdminAnalyticsRequest {
|
|
1151
|
+
start_date?: string | null;
|
|
1152
|
+
end_date?: string | null;
|
|
1153
|
+
}
|
|
1154
|
+
interface OverviewStat {
|
|
1155
|
+
label: string;
|
|
1156
|
+
value: number;
|
|
1157
|
+
change_percent: number;
|
|
1158
|
+
}
|
|
1159
|
+
interface OverviewStatsResponse {
|
|
1160
|
+
total_accounts: OverviewStat;
|
|
1161
|
+
total_admins: OverviewStat;
|
|
1162
|
+
audit_events: OverviewStat;
|
|
1163
|
+
}
|
|
1164
|
+
interface PlatformAnalyticsResponse {
|
|
1165
|
+
total_customers: number;
|
|
1166
|
+
total_shops: number;
|
|
1167
|
+
total_transactions: number;
|
|
1168
|
+
total_volume: number;
|
|
1169
|
+
total_fees_collected: number;
|
|
1170
|
+
period_start: string;
|
|
1171
|
+
period_end: string;
|
|
1172
|
+
}
|
|
1173
|
+
interface PaymentAnalyticsRequest {
|
|
1174
|
+
period?: number | null;
|
|
1175
|
+
currency?: string | null;
|
|
1176
|
+
}
|
|
1177
|
+
interface PaymentStat {
|
|
1178
|
+
label: string;
|
|
1179
|
+
value: number;
|
|
1180
|
+
change_percent: number;
|
|
1181
|
+
}
|
|
1182
|
+
interface PaymentAnalyticsResponse {
|
|
1183
|
+
total_volume: PaymentStat;
|
|
1184
|
+
success_rate: PaymentStat;
|
|
1185
|
+
transactions: PaymentStat;
|
|
1186
|
+
avg_transaction: PaymentStat;
|
|
1187
|
+
currency: string;
|
|
1188
|
+
period_days: number;
|
|
1189
|
+
}
|
|
1190
|
+
interface AuditLogListParams {
|
|
1191
|
+
user_id?: string | null;
|
|
1192
|
+
merchant_id?: string | null;
|
|
1193
|
+
profile_id?: string | null;
|
|
1194
|
+
action?: string | null;
|
|
1195
|
+
entity_type?: string | null;
|
|
1196
|
+
start_date?: string | null;
|
|
1197
|
+
end_date?: string | null;
|
|
1198
|
+
offset?: number | null;
|
|
1199
|
+
limit?: number | null;
|
|
1200
|
+
}
|
|
1201
|
+
interface AuditLogResponse {
|
|
1202
|
+
id: string;
|
|
1203
|
+
user_id: string;
|
|
1204
|
+
action: string;
|
|
1205
|
+
entity_type: string;
|
|
1206
|
+
created_at: string;
|
|
1207
|
+
merchant_id?: string | null;
|
|
1208
|
+
profile_id?: string | null;
|
|
1209
|
+
entity_id?: string | null;
|
|
1210
|
+
details?: unknown | null;
|
|
1211
|
+
ip_address?: string | null;
|
|
1212
|
+
}
|
|
1213
|
+
interface AuditLogListResponse {
|
|
1214
|
+
entries: AuditLogResponse[];
|
|
1215
|
+
total_count: number;
|
|
1216
|
+
offset: number;
|
|
1217
|
+
limit: number;
|
|
1218
|
+
}
|
|
1219
|
+
interface MerchantAccountCreateRequest {
|
|
1220
|
+
merchant_id: string;
|
|
1221
|
+
merchant_name?: string | null;
|
|
1222
|
+
return_url?: string | null;
|
|
1223
|
+
webhook_details?: Record<string, unknown> | null;
|
|
1224
|
+
sub_merchants_enabled?: boolean | null;
|
|
1225
|
+
parent_merchant_id?: string | null;
|
|
1226
|
+
metadata?: Record<string, unknown> | null;
|
|
1227
|
+
publishable_key?: string | null;
|
|
1228
|
+
}
|
|
1229
|
+
interface MerchantAccountUpdateRequest {
|
|
1230
|
+
merchant_id: string;
|
|
1231
|
+
merchant_name?: string | null;
|
|
1232
|
+
return_url?: string | null;
|
|
1233
|
+
webhook_details?: Record<string, unknown> | null;
|
|
1234
|
+
sub_merchants_enabled?: boolean | null;
|
|
1235
|
+
metadata?: Record<string, unknown> | null;
|
|
1236
|
+
}
|
|
1237
|
+
interface MerchantAccountResponse {
|
|
1238
|
+
merchant_id: string;
|
|
1239
|
+
enable_payment_response_hash: boolean;
|
|
1240
|
+
redirect_to_merchant_with_http_post: boolean;
|
|
1241
|
+
primary_business_details: Record<string, unknown>[];
|
|
1242
|
+
organization_id: string;
|
|
1243
|
+
is_recon_enabled: boolean;
|
|
1244
|
+
recon_status: string;
|
|
1245
|
+
merchant_account_type: MerchantAccountType;
|
|
1246
|
+
merchant_name?: string | null;
|
|
1247
|
+
return_url?: string | null;
|
|
1248
|
+
payment_response_hash_key?: string | null;
|
|
1249
|
+
webhook_details?: Record<string, unknown> | null;
|
|
1250
|
+
sub_merchants_enabled?: boolean | null;
|
|
1251
|
+
parent_merchant_id?: string | null;
|
|
1252
|
+
publishable_key?: string | null;
|
|
1253
|
+
metadata?: Record<string, unknown> | null;
|
|
1254
|
+
created_at?: string | null;
|
|
1255
|
+
modified_at?: string | null;
|
|
1256
|
+
[key: string]: unknown;
|
|
1257
|
+
}
|
|
1258
|
+
interface ConnectorCreateRequest {
|
|
1259
|
+
connector_type: ConnectorType;
|
|
1260
|
+
connector_name: string;
|
|
1261
|
+
connector_label?: string | null;
|
|
1262
|
+
profile_id?: string | null;
|
|
1263
|
+
connector_account_details?: Record<string, unknown> | null;
|
|
1264
|
+
payment_methods_enabled?: Record<string, unknown>[] | null;
|
|
1265
|
+
metadata?: Record<string, unknown> | null;
|
|
1266
|
+
test_mode?: boolean | null;
|
|
1267
|
+
disabled?: boolean | null;
|
|
1268
|
+
connector_webhook_details?: Record<string, unknown> | null;
|
|
1269
|
+
additional_merchant_data?: Record<string, unknown> | null;
|
|
1270
|
+
status?: string | null;
|
|
1271
|
+
}
|
|
1272
|
+
interface ConnectorUpdateRequest {
|
|
1273
|
+
connector_type: ConnectorType;
|
|
1274
|
+
status: string;
|
|
1275
|
+
connector_label?: string | null;
|
|
1276
|
+
connector_account_details?: Record<string, unknown> | null;
|
|
1277
|
+
payment_methods_enabled?: Record<string, unknown>[] | null;
|
|
1278
|
+
metadata?: Record<string, unknown> | null;
|
|
1279
|
+
test_mode?: boolean | null;
|
|
1280
|
+
disabled?: boolean | null;
|
|
1281
|
+
connector_webhook_details?: Record<string, unknown> | null;
|
|
1282
|
+
additional_merchant_data?: Record<string, unknown> | null;
|
|
1283
|
+
}
|
|
1284
|
+
interface ConnectorResponse {
|
|
1285
|
+
connector_type: ConnectorType;
|
|
1286
|
+
connector_name: string;
|
|
1287
|
+
merchant_connector_id: string;
|
|
1288
|
+
profile_id: string;
|
|
1289
|
+
status: string;
|
|
1290
|
+
connector_label?: string | null;
|
|
1291
|
+
connector_account_details?: Record<string, unknown> | null;
|
|
1292
|
+
payment_methods_enabled?: Record<string, unknown>[] | null;
|
|
1293
|
+
metadata?: Record<string, unknown> | null;
|
|
1294
|
+
test_mode?: boolean | null;
|
|
1295
|
+
disabled?: boolean | null;
|
|
1296
|
+
connector_webhook_details?: Record<string, unknown> | null;
|
|
1297
|
+
created_at?: string | null;
|
|
1298
|
+
}
|
|
1299
|
+
interface ConnectorListResponse {
|
|
1300
|
+
payload: ConnectorResponse[];
|
|
1301
|
+
}
|
|
1302
|
+
interface ProfileCreateRequest {
|
|
1303
|
+
profile_name?: string | null;
|
|
1304
|
+
return_url?: string | null;
|
|
1305
|
+
enable_payment_response_hash?: boolean | null;
|
|
1306
|
+
payment_response_hash_key?: string | null;
|
|
1307
|
+
redirect_to_merchant_with_http_post?: boolean | null;
|
|
1308
|
+
webhook_details?: Record<string, unknown> | null;
|
|
1309
|
+
metadata?: Record<string, unknown> | null;
|
|
1310
|
+
}
|
|
1311
|
+
interface ProfileUpdateRequest {
|
|
1312
|
+
profile_name?: string | null;
|
|
1313
|
+
return_url?: string | null;
|
|
1314
|
+
enable_payment_response_hash?: boolean | null;
|
|
1315
|
+
payment_response_hash_key?: string | null;
|
|
1316
|
+
redirect_to_merchant_with_http_post?: boolean | null;
|
|
1317
|
+
webhook_details?: Record<string, unknown> | null;
|
|
1318
|
+
metadata?: Record<string, unknown> | null;
|
|
1319
|
+
}
|
|
1320
|
+
interface ProfileResponse {
|
|
1321
|
+
merchant_id: string;
|
|
1322
|
+
profile_id: string;
|
|
1323
|
+
profile_name: string;
|
|
1324
|
+
enable_payment_response_hash: boolean;
|
|
1325
|
+
redirect_to_merchant_with_http_post: boolean;
|
|
1326
|
+
is_tax_connector_enabled: boolean;
|
|
1327
|
+
is_network_tokenization_enabled: boolean;
|
|
1328
|
+
is_auto_retries_enabled: boolean;
|
|
1329
|
+
is_click_to_pay_enabled: boolean;
|
|
1330
|
+
is_clear_pan_retries_enabled: boolean;
|
|
1331
|
+
force_3ds_challenge: boolean;
|
|
1332
|
+
is_pre_network_tokenization_enabled: boolean;
|
|
1333
|
+
return_url?: string | null;
|
|
1334
|
+
payment_response_hash_key?: string | null;
|
|
1335
|
+
webhook_details?: Record<string, unknown> | null;
|
|
1336
|
+
metadata?: Record<string, unknown> | null;
|
|
1337
|
+
[key: string]: unknown;
|
|
1338
|
+
}
|
|
1339
|
+
type BlocklistAddRequest = {
|
|
1340
|
+
type: 'card_bin';
|
|
1341
|
+
data: string;
|
|
1342
|
+
} | {
|
|
1343
|
+
type: 'fingerprint';
|
|
1344
|
+
data: string;
|
|
1345
|
+
} | {
|
|
1346
|
+
type: 'extended_card_bin';
|
|
1347
|
+
data: string;
|
|
1348
|
+
};
|
|
1349
|
+
interface BlocklistResponse {
|
|
1350
|
+
fingerprint_id: string;
|
|
1351
|
+
data_kind: BlocklistDataKind;
|
|
1352
|
+
created_at: string;
|
|
1353
|
+
}
|
|
1354
|
+
interface AuthenticationCreateRequest {
|
|
1355
|
+
amount: number;
|
|
1356
|
+
currency: Currency;
|
|
1357
|
+
authentication_id?: string | null;
|
|
1358
|
+
profile_id?: string | null;
|
|
1359
|
+
customer?: Record<string, unknown> | null;
|
|
1360
|
+
authentication_connector?: string | null;
|
|
1361
|
+
return_url?: string | null;
|
|
1362
|
+
force_3ds_challenge?: boolean | null;
|
|
1363
|
+
psd2_sca_exemption_type?: string | null;
|
|
1364
|
+
profile_acquirer_id?: string | null;
|
|
1365
|
+
payment_method_data?: Record<string, unknown> | null;
|
|
1366
|
+
}
|
|
1367
|
+
interface AuthenticationResponse {
|
|
1368
|
+
authentication_id: string;
|
|
1369
|
+
merchant_id: string;
|
|
1370
|
+
status: AuthenticationStatus;
|
|
1371
|
+
amount: number;
|
|
1372
|
+
currency: Currency;
|
|
1373
|
+
client_secret?: string | null;
|
|
1374
|
+
authentication_connector?: string | null;
|
|
1375
|
+
force_3ds_challenge?: boolean | null;
|
|
1376
|
+
return_url?: string | null;
|
|
1377
|
+
[key: string]: unknown;
|
|
1378
|
+
}
|
|
1379
|
+
interface CardIssuerCreateRequest {
|
|
1380
|
+
issuer_name: string;
|
|
1381
|
+
}
|
|
1382
|
+
interface CardIssuerUpdateRequest {
|
|
1383
|
+
issuer_name: string;
|
|
1384
|
+
}
|
|
1385
|
+
interface CardIssuerResponse {
|
|
1386
|
+
id: string;
|
|
1387
|
+
issuer_name: string;
|
|
1388
|
+
}
|
|
1389
|
+
interface CardIssuerListResponse {
|
|
1390
|
+
issuers: CardIssuerResponse[];
|
|
1391
|
+
}
|
|
1392
|
+
interface StripeConnectAccountRequest {
|
|
1393
|
+
merchant_id: string;
|
|
1394
|
+
profile_id: string;
|
|
1395
|
+
country: string;
|
|
1396
|
+
business_type: string;
|
|
1397
|
+
email?: string | null;
|
|
1398
|
+
}
|
|
1399
|
+
interface StripeConnectAccountResponse {
|
|
1400
|
+
account_id: string;
|
|
1401
|
+
profile_id: string;
|
|
1402
|
+
}
|
|
1403
|
+
interface StripeConnectLinkRequest {
|
|
1404
|
+
merchant_id: string;
|
|
1405
|
+
profile_id: string;
|
|
1406
|
+
return_url: string;
|
|
1407
|
+
refresh_url: string;
|
|
1408
|
+
}
|
|
1409
|
+
interface StripeConnectLinkResponse {
|
|
1410
|
+
url: string;
|
|
1411
|
+
expires_at: number;
|
|
1412
|
+
}
|
|
1413
|
+
interface ApplePayVerificationRequest {
|
|
1414
|
+
domain_names: string[];
|
|
1415
|
+
merchant_connector_account_id: string;
|
|
1416
|
+
}
|
|
1417
|
+
interface ApplePayVerificationResponse {
|
|
1418
|
+
status_message: string;
|
|
1419
|
+
}
|
|
1420
|
+
interface ApplePayVerifiedDomainsResponse {
|
|
1421
|
+
verified_domains: string[];
|
|
1422
|
+
}
|
|
1423
|
+
interface EventListParams {
|
|
1424
|
+
created_after?: string | null;
|
|
1425
|
+
created_before?: string | null;
|
|
1426
|
+
limit?: number | null;
|
|
1427
|
+
offset?: number | null;
|
|
1428
|
+
object_id?: string | null;
|
|
1429
|
+
event_id?: string | null;
|
|
1430
|
+
profile_id?: string | null;
|
|
1431
|
+
event_classes?: EventClass[] | null;
|
|
1432
|
+
}
|
|
1433
|
+
interface EventResponse {
|
|
1434
|
+
event_id: string;
|
|
1435
|
+
merchant_id: string;
|
|
1436
|
+
profile_id: string;
|
|
1437
|
+
object_id: string;
|
|
1438
|
+
event_type: EventType;
|
|
1439
|
+
event_class: EventClass;
|
|
1440
|
+
initial_attempt_id: string;
|
|
1441
|
+
created: string;
|
|
1442
|
+
is_delivery_successful?: boolean | null;
|
|
1443
|
+
latest_attempt_id?: string | null;
|
|
1444
|
+
}
|
|
1445
|
+
interface EventDetailResponse extends EventResponse {
|
|
1446
|
+
request: Record<string, unknown>;
|
|
1447
|
+
response: Record<string, unknown>;
|
|
1448
|
+
delivery_attempt?: WebhookDeliveryAttempt | null;
|
|
1449
|
+
}
|
|
1450
|
+
interface EventListResponse {
|
|
1451
|
+
data: EventResponse[];
|
|
1452
|
+
total_count?: number | null;
|
|
1453
|
+
}
|
|
1454
|
+
interface EventDeliveryAttemptResponse {
|
|
1455
|
+
attempt_id: string;
|
|
1456
|
+
status: string;
|
|
1457
|
+
created_at: string;
|
|
1458
|
+
response_status_code?: number | null;
|
|
1459
|
+
response_headers?: Record<string, unknown> | null;
|
|
1460
|
+
response_body?: string | null;
|
|
1461
|
+
error_message?: string | null;
|
|
1462
|
+
}
|
|
1463
|
+
interface GsmRuleCreateRequest {
|
|
1464
|
+
connector: string;
|
|
1465
|
+
flow: string;
|
|
1466
|
+
sub_flow: string;
|
|
1467
|
+
code: string;
|
|
1468
|
+
message: string;
|
|
1469
|
+
status: string;
|
|
1470
|
+
decision: GsmDecision;
|
|
1471
|
+
step_up_possible: boolean;
|
|
1472
|
+
clear_pan_possible: boolean;
|
|
1473
|
+
router_error?: string | null;
|
|
1474
|
+
unified_code?: string | null;
|
|
1475
|
+
unified_message?: string | null;
|
|
1476
|
+
}
|
|
1477
|
+
interface GsmRuleUpdateRequest {
|
|
1478
|
+
connector: string;
|
|
1479
|
+
flow: string;
|
|
1480
|
+
sub_flow: string;
|
|
1481
|
+
code: string;
|
|
1482
|
+
message: string;
|
|
1483
|
+
status?: string | null;
|
|
1484
|
+
router_error?: string | null;
|
|
1485
|
+
decision?: GsmDecision | null;
|
|
1486
|
+
step_up_possible?: boolean | null;
|
|
1487
|
+
unified_code?: string | null;
|
|
1488
|
+
unified_message?: string | null;
|
|
1489
|
+
}
|
|
1490
|
+
interface GsmRuleResponse {
|
|
1491
|
+
connector: string;
|
|
1492
|
+
flow: string;
|
|
1493
|
+
sub_flow: string;
|
|
1494
|
+
code: string;
|
|
1495
|
+
message: string;
|
|
1496
|
+
status: string;
|
|
1497
|
+
decision: GsmDecision;
|
|
1498
|
+
step_up_possible: boolean;
|
|
1499
|
+
clear_pan_possible: boolean;
|
|
1500
|
+
feature: string;
|
|
1501
|
+
feature_data: unknown;
|
|
1502
|
+
router_error?: string | null;
|
|
1503
|
+
unified_code?: string | null;
|
|
1504
|
+
unified_message?: string | null;
|
|
1505
|
+
}
|
|
1506
|
+
interface PollStatusResponse {
|
|
1507
|
+
poll_id: string;
|
|
1508
|
+
status: PollStatus;
|
|
1509
|
+
}
|
|
1510
|
+
interface ProfileAcquirerCreateRequest {
|
|
1511
|
+
acquirer_assigned_merchant_id: string;
|
|
1512
|
+
merchant_name: string;
|
|
1513
|
+
network: string;
|
|
1514
|
+
acquirer_bin: string;
|
|
1515
|
+
acquirer_fraud_rate: number;
|
|
1516
|
+
profile_id: string;
|
|
1517
|
+
acquirer_ica?: string | null;
|
|
1518
|
+
}
|
|
1519
|
+
interface ProfileAcquirerUpdateRequest {
|
|
1520
|
+
acquirer_assigned_merchant_id?: string | null;
|
|
1521
|
+
merchant_name?: string | null;
|
|
1522
|
+
network?: string | null;
|
|
1523
|
+
acquirer_bin?: string | null;
|
|
1524
|
+
acquirer_ica?: string | null;
|
|
1525
|
+
acquirer_fraud_rate?: number | null;
|
|
1526
|
+
}
|
|
1527
|
+
interface ProfileAcquirerResponse {
|
|
1528
|
+
profile_acquirer_id: string;
|
|
1529
|
+
acquirer_assigned_merchant_id: string;
|
|
1530
|
+
merchant_name: string;
|
|
1531
|
+
network: string;
|
|
1532
|
+
acquirer_bin: string;
|
|
1533
|
+
acquirer_fraud_rate: number;
|
|
1534
|
+
profile_id: string;
|
|
1535
|
+
acquirer_ica?: string | null;
|
|
1536
|
+
}
|
|
1537
|
+
interface RelayRequest {
|
|
1538
|
+
connector_resource_id: string;
|
|
1539
|
+
connector_id: string;
|
|
1540
|
+
type: RelayType;
|
|
1541
|
+
data?: {
|
|
1542
|
+
refund?: {
|
|
1543
|
+
amount?: number | null;
|
|
1544
|
+
currency?: Currency | null;
|
|
1545
|
+
reason?: string | null;
|
|
1546
|
+
} | null;
|
|
1547
|
+
capture?: {
|
|
1548
|
+
amount?: number | null;
|
|
1549
|
+
} | null;
|
|
1550
|
+
incremental_authorization?: {
|
|
1551
|
+
amount?: number | null;
|
|
1552
|
+
reason?: string | null;
|
|
1553
|
+
} | null;
|
|
1554
|
+
void?: {
|
|
1555
|
+
cancellation_reason?: string | null;
|
|
1556
|
+
} | null;
|
|
1557
|
+
} | null;
|
|
1558
|
+
}
|
|
1559
|
+
interface RelayResponse {
|
|
1560
|
+
id: string;
|
|
1561
|
+
status: RelayStatus;
|
|
1562
|
+
connector_resource_id: string;
|
|
1563
|
+
connector_id: string;
|
|
1564
|
+
profile_id: string;
|
|
1565
|
+
type: RelayType;
|
|
1566
|
+
connector_reference_id?: string | null;
|
|
1567
|
+
error?: {
|
|
1568
|
+
code: string;
|
|
1569
|
+
message: string;
|
|
1570
|
+
} | null;
|
|
1571
|
+
}
|
|
1572
|
+
interface ThreeDsRuleExecuteRequest {
|
|
1573
|
+
routing_id: string;
|
|
1574
|
+
payment: Record<string, unknown>;
|
|
1575
|
+
payment_method?: Record<string, unknown> | null;
|
|
1576
|
+
customer_device?: Record<string, unknown> | null;
|
|
1577
|
+
issuer?: Record<string, unknown> | null;
|
|
1578
|
+
acquirer?: Record<string, unknown> | null;
|
|
1579
|
+
}
|
|
1580
|
+
interface ThreeDsRuleResponse {
|
|
1581
|
+
decision: ThreeDSDecision;
|
|
1582
|
+
}
|
|
1583
|
+
interface SubscriptionCreateRequest {
|
|
1584
|
+
customer_id?: string;
|
|
1585
|
+
payment_method_id?: string;
|
|
1586
|
+
amount: number;
|
|
1587
|
+
currency: Currency;
|
|
1588
|
+
recurring_details?: Record<string, unknown>;
|
|
1589
|
+
metadata?: Record<string, unknown>;
|
|
1590
|
+
[key: string]: unknown;
|
|
1591
|
+
}
|
|
1592
|
+
interface SubscriptionUpdateRequest {
|
|
1593
|
+
amount?: number;
|
|
1594
|
+
currency?: Currency;
|
|
1595
|
+
metadata?: Record<string, unknown>;
|
|
1596
|
+
[key: string]: unknown;
|
|
1597
|
+
}
|
|
1598
|
+
interface SubscriptionResponse {
|
|
1599
|
+
subscription_id: string;
|
|
1600
|
+
customer_id?: string;
|
|
1601
|
+
status: string;
|
|
1602
|
+
amount: number;
|
|
1603
|
+
currency: Currency;
|
|
1604
|
+
created_at: string;
|
|
1605
|
+
metadata?: Record<string, unknown>;
|
|
1606
|
+
[key: string]: unknown;
|
|
1607
|
+
}
|
|
1608
|
+
interface SubscriptionListParams {
|
|
1609
|
+
limit?: number;
|
|
1610
|
+
offset?: number;
|
|
1611
|
+
customer_id?: string;
|
|
1612
|
+
status?: string;
|
|
1613
|
+
}
|
|
1614
|
+
interface SubscriptionListResponse {
|
|
1615
|
+
count: number;
|
|
1616
|
+
data: SubscriptionResponse[];
|
|
1617
|
+
}
|
|
1618
|
+
interface RegionCreateRequest {
|
|
1619
|
+
region_name: string;
|
|
1620
|
+
[key: string]: unknown;
|
|
1621
|
+
}
|
|
1622
|
+
interface RegionUpdateRequest {
|
|
1623
|
+
region_name?: string;
|
|
1624
|
+
[key: string]: unknown;
|
|
1625
|
+
}
|
|
1626
|
+
interface RegionResponse {
|
|
1627
|
+
region_id: string;
|
|
1628
|
+
region_name: string;
|
|
1629
|
+
[key: string]: unknown;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
type RequestFn$I = <T>(method: string, path: string, options?: {
|
|
1633
|
+
body?: unknown;
|
|
1634
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1635
|
+
headers?: Record<string, string>;
|
|
1636
|
+
}) => Promise<T>;
|
|
1637
|
+
declare class Admin {
|
|
1638
|
+
private readonly request;
|
|
1639
|
+
constructor(request: RequestFn$I);
|
|
1640
|
+
signIn(params: AdminSignInRequest): Promise<AuthResponse>;
|
|
1641
|
+
createInternalUser(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
1642
|
+
createTenant(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
1643
|
+
/** Set signup settings. `POST /admin/signup_settings` */
|
|
1644
|
+
setSignupSettings(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
1645
|
+
/** Get signup settings. `GET /admin/signup_settings` */
|
|
1646
|
+
getSignupSettings(): Promise<Record<string, unknown>>;
|
|
1647
|
+
/** Onboard a merchant. `POST /admin/onboard_merchant` */
|
|
1648
|
+
onboardMerchant(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
type RequestFn$H = <T>(method: string, path: string, options?: {
|
|
1652
|
+
body?: unknown;
|
|
1653
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1654
|
+
headers?: Record<string, string>;
|
|
1655
|
+
}) => Promise<T>;
|
|
1656
|
+
declare class AdminPortal {
|
|
1657
|
+
private readonly request;
|
|
1658
|
+
constructor(request: RequestFn$H);
|
|
1659
|
+
listCustomers(params?: AdminCustomerListParams): Promise<AdminCustomerListResponse>;
|
|
1660
|
+
getCustomer(customerId: string): Promise<AdminCustomerDetail>;
|
|
1661
|
+
listTransactions(params?: AdminTransactionListParams): Promise<AdminTransactionListResponse>;
|
|
1662
|
+
analytics(params: AdminAnalyticsRequest): Promise<PlatformAnalyticsResponse>;
|
|
1663
|
+
overviewStats(): Promise<OverviewStatsResponse>;
|
|
1664
|
+
paymentAnalytics(params: PaymentAnalyticsRequest): Promise<PaymentAnalyticsResponse>;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
type RequestFn$G = <T>(method: string, path: string, options?: {
|
|
1668
|
+
body?: unknown;
|
|
1669
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1670
|
+
headers?: Record<string, string>;
|
|
1671
|
+
}) => Promise<T>;
|
|
1672
|
+
/** Create and manage API keys for a merchant account. */
|
|
1673
|
+
declare class ApiKeys {
|
|
1674
|
+
private readonly request;
|
|
1675
|
+
constructor(request: RequestFn$G);
|
|
1676
|
+
/**
|
|
1677
|
+
* Create a new API key for a merchant.
|
|
1678
|
+
*
|
|
1679
|
+
* @param merchantId - The merchant account ID.
|
|
1680
|
+
* @param params - Key creation parameters (name, expiry, etc.).
|
|
1681
|
+
* @returns The newly created key including the plaintext secret (shown once only).
|
|
1682
|
+
*
|
|
1683
|
+
* @example
|
|
1684
|
+
* ```typescript
|
|
1685
|
+
* const { key_value } = await delopay.apiKeys.create('merch_123', { name: 'Production key' });
|
|
1686
|
+
* ```
|
|
1687
|
+
*/
|
|
1688
|
+
create(merchantId: string, params: ApiKeyCreateRequest): Promise<ApiKeyCreateResponse>;
|
|
1689
|
+
/**
|
|
1690
|
+
* Retrieve metadata about an API key (does not return the plaintext secret).
|
|
1691
|
+
*
|
|
1692
|
+
* @param merchantId - The merchant account ID.
|
|
1693
|
+
* @param keyId - The API key ID.
|
|
1694
|
+
* @returns The API key metadata.
|
|
1695
|
+
*/
|
|
1696
|
+
retrieve(merchantId: string, keyId: string): Promise<ApiKeyResponse>;
|
|
1697
|
+
/**
|
|
1698
|
+
* Update an API key's name or expiry.
|
|
1699
|
+
*
|
|
1700
|
+
* @param merchantId - The merchant account ID.
|
|
1701
|
+
* @param keyId - The API key ID to update.
|
|
1702
|
+
* @param params - Fields to update.
|
|
1703
|
+
* @returns The updated API key metadata.
|
|
1704
|
+
*/
|
|
1705
|
+
update(merchantId: string, keyId: string, params: ApiKeyUpdateRequest): Promise<ApiKeyResponse>;
|
|
1706
|
+
/**
|
|
1707
|
+
* Revoke an API key, immediately invalidating it.
|
|
1708
|
+
*
|
|
1709
|
+
* @param merchantId - The merchant account ID.
|
|
1710
|
+
* @param keyId - The API key ID to revoke.
|
|
1711
|
+
* @returns Revocation confirmation.
|
|
1712
|
+
*/
|
|
1713
|
+
revoke(merchantId: string, keyId: string): Promise<ApiKeyRevokeResponse>;
|
|
1714
|
+
/**
|
|
1715
|
+
* List all API keys for a merchant.
|
|
1716
|
+
*
|
|
1717
|
+
* @param merchantId - The merchant account ID.
|
|
1718
|
+
* @returns Array of API key metadata objects.
|
|
1719
|
+
*/
|
|
1720
|
+
list(merchantId: string): Promise<ApiKeyResponse[]>;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
type RequestFn$F = <T>(method: string, path: string, options?: {
|
|
1724
|
+
body?: unknown;
|
|
1725
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1726
|
+
headers?: Record<string, string>;
|
|
1727
|
+
}) => Promise<T>;
|
|
1728
|
+
declare class AuditLogs {
|
|
1729
|
+
private readonly request;
|
|
1730
|
+
constructor(request: RequestFn$F);
|
|
1731
|
+
list(params?: AuditLogListParams): Promise<AuditLogListResponse>;
|
|
1732
|
+
retrieve(logId: string): Promise<AuditLogResponse>;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
type RequestFn$E = <T>(method: string, path: string, options?: {
|
|
1736
|
+
body?: unknown;
|
|
1737
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1738
|
+
headers?: Record<string, string>;
|
|
1739
|
+
}) => Promise<T>;
|
|
1740
|
+
declare class Authentication {
|
|
1741
|
+
private readonly request;
|
|
1742
|
+
constructor(request: RequestFn$E);
|
|
1743
|
+
create(params: AuthenticationCreateRequest): Promise<AuthenticationResponse>;
|
|
1744
|
+
checkEligibility(authId: string): Promise<AuthenticationResponse>;
|
|
1745
|
+
authenticate(authId: string, params: Record<string, unknown>): Promise<AuthenticationResponse>;
|
|
1746
|
+
sync(authId: string, params?: Record<string, unknown>): Promise<AuthenticationResponse>;
|
|
1747
|
+
/** Redirect after authentication. `POST /authentication/{authId}/redirect` */
|
|
1748
|
+
redirect(authId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
1749
|
+
/** Enable authn methods token. `POST /authentication/{authId}/enabled_authn_methods_token` */
|
|
1750
|
+
enabledAuthnMethodsToken(authId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
1751
|
+
/** Submit eligibility check. `POST /authentication/{authId}/eligibility-check` */
|
|
1752
|
+
eligibilityCheck(authId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
type RequestFn$D = <T>(method: string, path: string, options?: {
|
|
1756
|
+
body?: unknown;
|
|
1757
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1758
|
+
headers?: Record<string, string>;
|
|
1759
|
+
}) => Promise<T>;
|
|
1760
|
+
/** Manage per-shop prepaid balance allocations transferred from the host merchant treasury. */
|
|
1761
|
+
declare class BillingAllocations {
|
|
1762
|
+
private readonly request;
|
|
1763
|
+
constructor(request: RequestFn$D);
|
|
1764
|
+
/**
|
|
1765
|
+
* Transfer funds from the host merchant treasury into a shop's allocation.
|
|
1766
|
+
*
|
|
1767
|
+
* @param merchantId - The host merchant account ID.
|
|
1768
|
+
* @param params - Transfer details (amount, target profile/shop ID).
|
|
1769
|
+
* @returns The allocation transfer result.
|
|
1770
|
+
*/
|
|
1771
|
+
transferIn(merchantId: string, params: AllocationTransferRequest): Promise<AllocationTransferResponse>;
|
|
1772
|
+
/**
|
|
1773
|
+
* Transfer funds from a shop's allocation back to the host merchant treasury.
|
|
1774
|
+
*
|
|
1775
|
+
* @param merchantId - The host merchant account ID.
|
|
1776
|
+
* @param params - Transfer details (amount, source profile/shop ID).
|
|
1777
|
+
* @returns The allocation transfer result.
|
|
1778
|
+
*/
|
|
1779
|
+
transferOut(merchantId: string, params: AllocationTransferRequest): Promise<AllocationTransferResponse>;
|
|
1780
|
+
/**
|
|
1781
|
+
* List all shop balance allocations for a merchant.
|
|
1782
|
+
*
|
|
1783
|
+
* @param merchantId - The merchant account ID.
|
|
1784
|
+
* @returns List of shop allocations.
|
|
1785
|
+
*/
|
|
1786
|
+
list(merchantId: string): Promise<AllocationListResponse>;
|
|
1787
|
+
/**
|
|
1788
|
+
* Get the balance allocation for a specific shop.
|
|
1789
|
+
*
|
|
1790
|
+
* @param merchantId - The merchant account ID.
|
|
1791
|
+
* @param profileId - The shop (business profile) ID.
|
|
1792
|
+
* @returns The shop's balance allocation.
|
|
1793
|
+
*/
|
|
1794
|
+
get(merchantId: string, profileId: string): Promise<AllocationResponse>;
|
|
1795
|
+
}
|
|
1796
|
+
/**
|
|
1797
|
+
* Manage prepaid billing balances — top-ups, card setup, auto-recharge, and the balance ledger.
|
|
1798
|
+
*
|
|
1799
|
+
* Delopay deducts a platform fee from the merchant's prepaid balance on every successful payment.
|
|
1800
|
+
* Use these endpoints to fund and monitor that balance.
|
|
1801
|
+
*/
|
|
1802
|
+
declare class Billing {
|
|
1803
|
+
private readonly request;
|
|
1804
|
+
/** Per-shop balance allocation management for host merchants. */
|
|
1805
|
+
readonly allocations: BillingAllocations;
|
|
1806
|
+
constructor(request: RequestFn$D);
|
|
1807
|
+
/**
|
|
1808
|
+
* Retrieve a merchant's billing profile (balance, status, auto-recharge config).
|
|
1809
|
+
*
|
|
1810
|
+
* @param merchantId - The merchant account ID.
|
|
1811
|
+
* @returns The billing profile.
|
|
1812
|
+
*
|
|
1813
|
+
* @example
|
|
1814
|
+
* ```typescript
|
|
1815
|
+
* const profile = await delopay.billing.getProfile('merch_123');
|
|
1816
|
+
* console.log(profile.balance, profile.status);
|
|
1817
|
+
* ```
|
|
1818
|
+
*/
|
|
1819
|
+
getProfile(merchantId: string): Promise<BillingProfileResponse>;
|
|
1820
|
+
/**
|
|
1821
|
+
* Start a Stripe SetupIntent flow to collect a payment card for auto-recharge.
|
|
1822
|
+
*
|
|
1823
|
+
* @param merchantId - The merchant account ID.
|
|
1824
|
+
* @param params - Optional setup parameters.
|
|
1825
|
+
* @returns The Stripe client secret needed to render the card element.
|
|
1826
|
+
*/
|
|
1827
|
+
setup(merchantId: string, params?: BillingSetupRequest): Promise<BillingSetupResponse>;
|
|
1828
|
+
/**
|
|
1829
|
+
* Confirm card setup after the Stripe SetupIntent completes on the frontend.
|
|
1830
|
+
*
|
|
1831
|
+
* @param merchantId - The merchant account ID.
|
|
1832
|
+
* @param params - The Stripe SetupIntent ID to confirm.
|
|
1833
|
+
* @returns The updated billing profile.
|
|
1834
|
+
*/
|
|
1835
|
+
completeSetup(merchantId: string, params: BillingCompleteSetupRequest): Promise<BillingProfileResponse>;
|
|
1836
|
+
/**
|
|
1837
|
+
* Manually top up a merchant's prepaid balance by charging their saved card.
|
|
1838
|
+
*
|
|
1839
|
+
* @param merchantId - The merchant account ID.
|
|
1840
|
+
* @param params - Top-up amount and currency.
|
|
1841
|
+
* @returns The top-up result.
|
|
1842
|
+
*/
|
|
1843
|
+
topup(merchantId: string, params: TopupRequest): Promise<TopupResponse>;
|
|
1844
|
+
/**
|
|
1845
|
+
* List the balance ledger (credits and debits) for a merchant.
|
|
1846
|
+
*
|
|
1847
|
+
* @param merchantId - The merchant account ID.
|
|
1848
|
+
* @param params - Optional pagination parameters.
|
|
1849
|
+
* @returns The ledger entries.
|
|
1850
|
+
*/
|
|
1851
|
+
listLedger(merchantId: string, params?: LedgerListParams): Promise<LedgerResponse>;
|
|
1852
|
+
/**
|
|
1853
|
+
* Update auto-recharge configuration (threshold, top-up amount, enabled flag).
|
|
1854
|
+
*
|
|
1855
|
+
* @param merchantId - The merchant account ID.
|
|
1856
|
+
* @param params - Auto-recharge settings to update.
|
|
1857
|
+
* @returns The updated billing profile.
|
|
1858
|
+
*/
|
|
1859
|
+
updateAutoRecharge(merchantId: string, params: AutoRechargeUpdateRequest): Promise<BillingProfileResponse>;
|
|
1860
|
+
/**
|
|
1861
|
+
* Admin: manually credit a merchant's balance (e.g. promotional credit).
|
|
1862
|
+
*
|
|
1863
|
+
* @param merchantId - The merchant account ID.
|
|
1864
|
+
* @param params - Credit amount and reason.
|
|
1865
|
+
* @returns The adjustment result.
|
|
1866
|
+
*/
|
|
1867
|
+
adminCredit(merchantId: string, params: AdminAdjustmentRequest): Promise<AdminAdjustmentResponse>;
|
|
1868
|
+
/**
|
|
1869
|
+
* Admin: manually debit a merchant's balance.
|
|
1870
|
+
*
|
|
1871
|
+
* @param merchantId - The merchant account ID.
|
|
1872
|
+
* @param params - Debit amount and reason.
|
|
1873
|
+
* @returns The adjustment result.
|
|
1874
|
+
*/
|
|
1875
|
+
adminDebit(merchantId: string, params: AdminAdjustmentRequest): Promise<AdminAdjustmentResponse>;
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
type RequestFn$C = <T>(method: string, path: string, options?: {
|
|
1879
|
+
body?: unknown;
|
|
1880
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1881
|
+
headers?: Record<string, string>;
|
|
1882
|
+
}) => Promise<T>;
|
|
1883
|
+
interface BlocklistListParams {
|
|
1884
|
+
data_kind?: BlocklistDataKind | null;
|
|
1885
|
+
limit?: number | null;
|
|
1886
|
+
offset?: number | null;
|
|
1887
|
+
}
|
|
1888
|
+
interface BlocklistToggleParams {
|
|
1889
|
+
status: boolean;
|
|
1890
|
+
}
|
|
1891
|
+
declare class Blocklist {
|
|
1892
|
+
private readonly request;
|
|
1893
|
+
constructor(request: RequestFn$C);
|
|
1894
|
+
add(params: BlocklistAddRequest): Promise<BlocklistResponse>;
|
|
1895
|
+
remove(params: BlocklistAddRequest): Promise<BlocklistResponse>;
|
|
1896
|
+
list(params?: BlocklistListParams): Promise<BlocklistResponse[]>;
|
|
1897
|
+
toggle(params: BlocklistToggleParams): Promise<Record<string, unknown>>;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
type RequestFn$B = <T>(method: string, path: string, options?: {
|
|
1901
|
+
body?: unknown;
|
|
1902
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1903
|
+
headers?: Record<string, string>;
|
|
1904
|
+
}) => Promise<T>;
|
|
1905
|
+
declare class CardIssuers {
|
|
1906
|
+
private readonly request;
|
|
1907
|
+
constructor(request: RequestFn$B);
|
|
1908
|
+
create(params: CardIssuerCreateRequest): Promise<CardIssuerResponse>;
|
|
1909
|
+
update(issuerId: string, params: CardIssuerUpdateRequest): Promise<CardIssuerResponse>;
|
|
1910
|
+
list(): Promise<CardIssuerListResponse>;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
type RequestFn$A = <T>(method: string, path: string, options?: {
|
|
1914
|
+
body?: unknown;
|
|
1915
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1916
|
+
headers?: Record<string, string>;
|
|
1917
|
+
}) => Promise<T>;
|
|
1918
|
+
declare class Connectors {
|
|
1919
|
+
private readonly request;
|
|
1920
|
+
constructor(request: RequestFn$A);
|
|
1921
|
+
create(accountId: string, params: ConnectorCreateRequest): Promise<ConnectorResponse>;
|
|
1922
|
+
retrieve(accountId: string, connectorId: string): Promise<ConnectorResponse>;
|
|
1923
|
+
list(accountId: string): Promise<ConnectorResponse[]>;
|
|
1924
|
+
update(accountId: string, connectorId: string, params: ConnectorUpdateRequest): Promise<ConnectorResponse>;
|
|
1925
|
+
delete(accountId: string, connectorId: string): Promise<ConnectorResponse>;
|
|
1926
|
+
/** Verify connector credentials. `POST /account/connectors/verify` */
|
|
1927
|
+
verify(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
1928
|
+
/** Register a webhook for a connector. `POST /account/{merchantId}/connectors/webhooks/{connectorId}` */
|
|
1929
|
+
registerWebhook(merchantId: string, connectorId: string): Promise<Record<string, unknown>>;
|
|
1930
|
+
/** Get a webhook for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */
|
|
1931
|
+
getWebhook(merchantId: string, connectorId: string): Promise<Record<string, unknown>>;
|
|
1932
|
+
/** List available payment methods. `GET /account/payment_methods` */
|
|
1933
|
+
listPaymentMethods(): Promise<Record<string, unknown>[]>;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
type RequestFn$z = <T>(method: string, path: string, options?: {
|
|
1937
|
+
body?: unknown;
|
|
1938
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1939
|
+
headers?: Record<string, string>;
|
|
1940
|
+
}) => Promise<T>;
|
|
1941
|
+
/** Create and manage customer profiles. */
|
|
1942
|
+
declare class Customers {
|
|
1943
|
+
private readonly request;
|
|
1944
|
+
constructor(request: RequestFn$z);
|
|
1945
|
+
/**
|
|
1946
|
+
* Create a new customer.
|
|
1947
|
+
*
|
|
1948
|
+
* @param params - Customer creation parameters (name, email, phone, address, etc.).
|
|
1949
|
+
* @returns The created customer.
|
|
1950
|
+
*
|
|
1951
|
+
* @example
|
|
1952
|
+
* ```typescript
|
|
1953
|
+
* const customer = await delopay.customers.create({
|
|
1954
|
+
* email: 'alice@example.com',
|
|
1955
|
+
* name: 'Alice Smith',
|
|
1956
|
+
* });
|
|
1957
|
+
* ```
|
|
1958
|
+
*/
|
|
1959
|
+
create(params: CustomerCreateRequest): Promise<CustomerResponse>;
|
|
1960
|
+
/**
|
|
1961
|
+
* Retrieve a customer by their ID.
|
|
1962
|
+
*
|
|
1963
|
+
* @param customerId - The unique customer ID.
|
|
1964
|
+
* @returns The customer.
|
|
1965
|
+
*
|
|
1966
|
+
* @example
|
|
1967
|
+
* ```typescript
|
|
1968
|
+
* const customer = await delopay.customers.retrieve('cus_abc123');
|
|
1969
|
+
* ```
|
|
1970
|
+
*/
|
|
1971
|
+
retrieve(customerId: string): Promise<CustomerResponse>;
|
|
1972
|
+
/**
|
|
1973
|
+
* Update an existing customer's details.
|
|
1974
|
+
*
|
|
1975
|
+
* @param customerId - The customer ID to update.
|
|
1976
|
+
* @param params - Fields to update (name, email, address, metadata, etc.).
|
|
1977
|
+
* @returns The updated customer.
|
|
1978
|
+
*/
|
|
1979
|
+
update(customerId: string, params: CustomerUpdateRequest): Promise<CustomerResponse>;
|
|
1980
|
+
/**
|
|
1981
|
+
* Delete a customer and all their saved payment methods.
|
|
1982
|
+
*
|
|
1983
|
+
* @param customerId - The customer ID to delete.
|
|
1984
|
+
* @returns The deleted customer object.
|
|
1985
|
+
*/
|
|
1986
|
+
delete(customerId: string): Promise<CustomerResponse>;
|
|
1987
|
+
/**
|
|
1988
|
+
* List customers, optionally filtered by email.
|
|
1989
|
+
*
|
|
1990
|
+
* @param params - Optional filter and pagination parameters.
|
|
1991
|
+
* @returns Array of customer objects.
|
|
1992
|
+
*/
|
|
1993
|
+
list(params?: CustomerListParams): Promise<CustomerResponse[]>;
|
|
1994
|
+
/** List customers with count. `GET /customers/list` with count flag. */
|
|
1995
|
+
listWithCount(params?: CustomerListParams): Promise<{
|
|
1996
|
+
count: number;
|
|
1997
|
+
data: CustomerResponse[];
|
|
1998
|
+
}>;
|
|
1999
|
+
/** List mandates for a customer. `GET /customers/{customerId}/mandates` */
|
|
2000
|
+
listMandates(customerId: string): Promise<Record<string, unknown>[]>;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
type RequestFn$y = <T>(method: string, path: string, options?: {
|
|
2004
|
+
body?: unknown;
|
|
2005
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2006
|
+
headers?: Record<string, string>;
|
|
2007
|
+
}) => Promise<T>;
|
|
2008
|
+
/** View and respond to payment disputes and chargebacks. */
|
|
2009
|
+
declare class Disputes {
|
|
2010
|
+
private readonly request;
|
|
2011
|
+
constructor(request: RequestFn$y);
|
|
2012
|
+
/**
|
|
2013
|
+
* Retrieve a dispute by its ID.
|
|
2014
|
+
*
|
|
2015
|
+
* @param disputeId - The unique dispute ID.
|
|
2016
|
+
* @returns The dispute.
|
|
2017
|
+
*/
|
|
2018
|
+
retrieve(disputeId: string): Promise<DisputeResponse>;
|
|
2019
|
+
/**
|
|
2020
|
+
* List disputes, optionally filtered by status, stage, or date range.
|
|
2021
|
+
*
|
|
2022
|
+
* @param params - Optional filter and pagination parameters.
|
|
2023
|
+
* @returns Array of disputes.
|
|
2024
|
+
*/
|
|
2025
|
+
list(params?: DisputeListParams): Promise<DisputeResponse[]>;
|
|
2026
|
+
/**
|
|
2027
|
+
* Accept a dispute, conceding the chargeback to the customer.
|
|
2028
|
+
*
|
|
2029
|
+
* @param disputeId - The dispute ID to accept.
|
|
2030
|
+
* @returns The updated dispute.
|
|
2031
|
+
*/
|
|
2032
|
+
accept(disputeId: string): Promise<DisputeResponse>;
|
|
2033
|
+
/**
|
|
2034
|
+
* Submit evidence to challenge a dispute.
|
|
2035
|
+
*
|
|
2036
|
+
* @param params - Evidence details and the dispute ID to contest.
|
|
2037
|
+
* @returns The updated dispute.
|
|
2038
|
+
*/
|
|
2039
|
+
submitEvidence(params: DisputeEvidenceRequest): Promise<DisputeResponse>;
|
|
2040
|
+
/**
|
|
2041
|
+
* Attach evidence (e.g. file upload metadata) to a dispute.
|
|
2042
|
+
*
|
|
2043
|
+
* Uses `PUT /disputes/evidence`.
|
|
2044
|
+
*/
|
|
2045
|
+
attachEvidence(params: DisputeEvidenceRequest): Promise<DisputeResponse>;
|
|
2046
|
+
/**
|
|
2047
|
+
* Retrieve previously submitted evidence for a dispute.
|
|
2048
|
+
*
|
|
2049
|
+
* @param disputeId - The dispute ID.
|
|
2050
|
+
* @returns The submitted evidence.
|
|
2051
|
+
*/
|
|
2052
|
+
retrieveEvidence(disputeId: string): Promise<DisputeEvidenceRequest>;
|
|
2053
|
+
/**
|
|
2054
|
+
* Delete submitted evidence for a dispute.
|
|
2055
|
+
*
|
|
2056
|
+
* @param params - Evidence request body identifying what to delete.
|
|
2057
|
+
* @returns The updated dispute.
|
|
2058
|
+
*/
|
|
2059
|
+
deleteEvidence(params: DisputeEvidenceRequest): Promise<DisputeResponse>;
|
|
2060
|
+
/** List disputes (profile-scoped). `GET /disputes/profile/list` */
|
|
2061
|
+
listByProfile(params?: DisputeListParams): Promise<DisputeResponse[]>;
|
|
2062
|
+
/** Get dispute filter options. `GET /disputes/filter` */
|
|
2063
|
+
getFilters(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2064
|
+
/** Get dispute filters (profile-scoped). `GET /disputes/profile/filter` */
|
|
2065
|
+
getFiltersByProfile(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2066
|
+
/** Get dispute aggregates. `GET /disputes/aggregate` */
|
|
2067
|
+
aggregate(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2068
|
+
/** Get dispute aggregates (profile-scoped). `GET /disputes/profile/aggregate` */
|
|
2069
|
+
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2070
|
+
/** Fetch dispute from connector. `POST /disputes/{disputeId}/fetch_from_connector` */
|
|
2071
|
+
fetchFromConnector(disputeId: string): Promise<DisputeResponse>;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
type RequestFn$x = <T>(method: string, path: string, options?: {
|
|
2075
|
+
body?: unknown;
|
|
2076
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2077
|
+
headers?: Record<string, string>;
|
|
2078
|
+
}) => Promise<T>;
|
|
2079
|
+
/**
|
|
2080
|
+
* Create short-lived ephemeral keys for secure client-side operations.
|
|
2081
|
+
*
|
|
2082
|
+
* Ephemeral keys grant a mobile or browser client temporary access to a
|
|
2083
|
+
* specific customer's data (e.g. to display saved payment methods) without
|
|
2084
|
+
* exposing your secret API key.
|
|
2085
|
+
*/
|
|
2086
|
+
declare class EphemeralKeys {
|
|
2087
|
+
private readonly request;
|
|
2088
|
+
constructor(request: RequestFn$x);
|
|
2089
|
+
/**
|
|
2090
|
+
* Create an ephemeral key scoped to a specific customer.
|
|
2091
|
+
*
|
|
2092
|
+
* @param params - Customer ID and optional expiry.
|
|
2093
|
+
* @returns The ephemeral key with its plaintext secret and expiry timestamp.
|
|
2094
|
+
*
|
|
2095
|
+
* @example
|
|
2096
|
+
* ```typescript
|
|
2097
|
+
* const ephKey = await delopay.ephemeralKeys.create({ customer_id: 'cus_123' });
|
|
2098
|
+
* // Pass ephKey.secret to your mobile app.
|
|
2099
|
+
* ```
|
|
2100
|
+
*/
|
|
2101
|
+
create(params: EphemeralKeyCreateRequest): Promise<EphemeralKeyCreateResponse>;
|
|
2102
|
+
/**
|
|
2103
|
+
* Invalidate an ephemeral key before it expires.
|
|
2104
|
+
*
|
|
2105
|
+
* @param keyId - The ephemeral key ID to delete.
|
|
2106
|
+
* @returns The deleted key object.
|
|
2107
|
+
*/
|
|
2108
|
+
delete(keyId: string): Promise<EphemeralKeyCreateResponse>;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
type RequestFn$w = <T>(method: string, path: string, options?: {
|
|
2112
|
+
body?: unknown;
|
|
2113
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2114
|
+
headers?: Record<string, string>;
|
|
2115
|
+
}) => Promise<T>;
|
|
2116
|
+
declare class Events {
|
|
2117
|
+
private readonly request;
|
|
2118
|
+
constructor(request: RequestFn$w);
|
|
2119
|
+
list(merchantId: string, params?: EventListParams): Promise<EventListResponse>;
|
|
2120
|
+
listDeliveryAttempts(merchantId: string, eventId: string): Promise<EventDeliveryAttemptResponse[]>;
|
|
2121
|
+
retryDelivery(merchantId: string, eventId: string): Promise<EventDetailResponse>;
|
|
2122
|
+
/** List events (profile-scoped). `POST /events/profile/list` */
|
|
2123
|
+
listByProfile(params?: Record<string, unknown>): Promise<EventListResponse>;
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
type RequestFn$v = <T>(method: string, path: string, options?: {
|
|
2127
|
+
body?: unknown;
|
|
2128
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2129
|
+
headers?: Record<string, string>;
|
|
2130
|
+
}) => Promise<T>;
|
|
2131
|
+
/**
|
|
2132
|
+
* Admin-only fee schedule management.
|
|
2133
|
+
* Requires an admin API key.
|
|
2134
|
+
*/
|
|
2135
|
+
declare class PlatformFees {
|
|
2136
|
+
private readonly request;
|
|
2137
|
+
constructor(request: RequestFn$v);
|
|
2138
|
+
/**
|
|
2139
|
+
* Create a new platform fee schedule for a merchant (admin only).
|
|
2140
|
+
*
|
|
2141
|
+
* @param params - Fee schedule parameters (percentage, flat fee, min/max).
|
|
2142
|
+
* @param merchantId - The merchant account to attach the schedule to.
|
|
2143
|
+
* @returns The created fee schedule.
|
|
2144
|
+
*/
|
|
2145
|
+
create(params: FeeScheduleCreateRequest, merchantId: string): Promise<FeeScheduleResponse>;
|
|
2146
|
+
/**
|
|
2147
|
+
* List all platform fee schedules for a merchant (admin only).
|
|
2148
|
+
*
|
|
2149
|
+
* @param merchantId - The merchant account ID.
|
|
2150
|
+
* @returns Array of fee schedules.
|
|
2151
|
+
*/
|
|
2152
|
+
list(merchantId: string): Promise<FeeScheduleResponse[]>;
|
|
2153
|
+
/**
|
|
2154
|
+
* Retrieve a single fee schedule by ID (admin only).
|
|
2155
|
+
*
|
|
2156
|
+
* @param feeId - The fee schedule ID.
|
|
2157
|
+
* @returns The fee schedule.
|
|
2158
|
+
*/
|
|
2159
|
+
retrieve(feeId: string): Promise<FeeScheduleResponse>;
|
|
2160
|
+
/**
|
|
2161
|
+
* Update a fee schedule (admin only).
|
|
2162
|
+
*
|
|
2163
|
+
* @param feeId - The fee schedule ID to update.
|
|
2164
|
+
* @param params - Fields to update.
|
|
2165
|
+
* @returns The updated fee schedule.
|
|
2166
|
+
*/
|
|
2167
|
+
update(feeId: string, params: FeeScheduleUpdateRequest): Promise<FeeScheduleResponse>;
|
|
2168
|
+
/**
|
|
2169
|
+
* Delete a fee schedule (admin only).
|
|
2170
|
+
*
|
|
2171
|
+
* @param feeId - The fee schedule ID to delete.
|
|
2172
|
+
* @returns The deleted fee schedule.
|
|
2173
|
+
*/
|
|
2174
|
+
delete(feeId: string): Promise<FeeScheduleResponse>;
|
|
2175
|
+
}
|
|
2176
|
+
/** Per-shop merchant fee schedule overrides (merchant-scoped). */
|
|
2177
|
+
declare class MerchantFees {
|
|
2178
|
+
private readonly request;
|
|
2179
|
+
constructor(request: RequestFn$v);
|
|
2180
|
+
/**
|
|
2181
|
+
* Create a merchant-scoped fee schedule override for a specific shop.
|
|
2182
|
+
*
|
|
2183
|
+
* @param params - Fee schedule parameters.
|
|
2184
|
+
* @param merchantId - The merchant account ID.
|
|
2185
|
+
* @returns The created fee schedule.
|
|
2186
|
+
*/
|
|
2187
|
+
create(params: FeeScheduleCreateRequest, merchantId: string): Promise<FeeScheduleResponse>;
|
|
2188
|
+
/**
|
|
2189
|
+
* List merchant-scoped fee schedules.
|
|
2190
|
+
*
|
|
2191
|
+
* @param merchantId - The merchant account ID.
|
|
2192
|
+
* @returns Array of fee schedules.
|
|
2193
|
+
*/
|
|
2194
|
+
list(merchantId: string): Promise<FeeScheduleResponse[]>;
|
|
2195
|
+
/**
|
|
2196
|
+
* Update a merchant-scoped fee schedule.
|
|
2197
|
+
*
|
|
2198
|
+
* @param feeId - The fee schedule ID to update.
|
|
2199
|
+
* @param params - Fields to update.
|
|
2200
|
+
* @returns The updated fee schedule.
|
|
2201
|
+
*/
|
|
2202
|
+
update(feeId: string, params: FeeScheduleUpdateRequest): Promise<FeeScheduleResponse>;
|
|
2203
|
+
/**
|
|
2204
|
+
* Delete a merchant-scoped fee schedule.
|
|
2205
|
+
*
|
|
2206
|
+
* @param feeId - The fee schedule ID to delete.
|
|
2207
|
+
* @returns The deleted fee schedule.
|
|
2208
|
+
*/
|
|
2209
|
+
delete(feeId: string): Promise<FeeScheduleResponse>;
|
|
2210
|
+
}
|
|
2211
|
+
/**
|
|
2212
|
+
* Manage Delopay platform fee schedules.
|
|
2213
|
+
*
|
|
2214
|
+
* - `fees.platform` — admin-only CRUD for per-merchant fee schedules.
|
|
2215
|
+
* - `fees.merchant` — merchant-scoped per-shop fee schedule overrides.
|
|
2216
|
+
*/
|
|
2217
|
+
declare class Fees {
|
|
2218
|
+
/** Admin-managed platform fee schedules. */
|
|
2219
|
+
readonly platform: PlatformFees;
|
|
2220
|
+
/** Merchant-managed per-shop fee schedule overrides. */
|
|
2221
|
+
readonly merchant: MerchantFees;
|
|
2222
|
+
constructor(request: RequestFn$v);
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
type RequestFn$u = <T>(method: string, path: string, options?: {
|
|
2226
|
+
body?: unknown;
|
|
2227
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2228
|
+
headers?: Record<string, string>;
|
|
2229
|
+
}) => Promise<T>;
|
|
2230
|
+
declare class Gsm {
|
|
2231
|
+
private readonly request;
|
|
2232
|
+
constructor(request: RequestFn$u);
|
|
2233
|
+
create(params: GsmRuleCreateRequest): Promise<GsmRuleResponse>;
|
|
2234
|
+
retrieve(params: Record<string, unknown>): Promise<GsmRuleResponse>;
|
|
2235
|
+
update(params: GsmRuleUpdateRequest): Promise<GsmRuleResponse>;
|
|
2236
|
+
delete(params: Record<string, unknown>): Promise<GsmRuleResponse>;
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
type RequestFn$t = <T>(method: string, path: string, options?: {
|
|
2240
|
+
body?: unknown;
|
|
2241
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2242
|
+
headers?: Record<string, string>;
|
|
2243
|
+
}) => Promise<T>;
|
|
2244
|
+
/** View and revoke recurring payment mandates. */
|
|
2245
|
+
declare class Mandates {
|
|
2246
|
+
private readonly request;
|
|
2247
|
+
constructor(request: RequestFn$t);
|
|
2248
|
+
/**
|
|
2249
|
+
* Retrieve a mandate by its ID.
|
|
2250
|
+
*
|
|
2251
|
+
* @param mandateId - The unique mandate ID.
|
|
2252
|
+
* @returns The mandate.
|
|
2253
|
+
*/
|
|
2254
|
+
retrieve(mandateId: string): Promise<MandateResponse>;
|
|
2255
|
+
/**
|
|
2256
|
+
* Revoke an active mandate, preventing future charges.
|
|
2257
|
+
*
|
|
2258
|
+
* @param mandateId - The mandate ID to revoke.
|
|
2259
|
+
* @returns Revocation confirmation.
|
|
2260
|
+
*/
|
|
2261
|
+
revoke(mandateId: string): Promise<MandateRevokedResponse>;
|
|
2262
|
+
/**
|
|
2263
|
+
* List mandates, optionally filtered by customer or status.
|
|
2264
|
+
*
|
|
2265
|
+
* @param params - Optional filter and pagination parameters.
|
|
2266
|
+
* @returns Array of mandates.
|
|
2267
|
+
*/
|
|
2268
|
+
list(params?: MandateListParams): Promise<MandateResponse[]>;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
type RequestFn$s = <T>(method: string, path: string, options?: {
|
|
2272
|
+
body?: unknown;
|
|
2273
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2274
|
+
headers?: Record<string, string>;
|
|
2275
|
+
}) => Promise<T>;
|
|
2276
|
+
declare class MerchantAccounts {
|
|
2277
|
+
private readonly request;
|
|
2278
|
+
constructor(request: RequestFn$s);
|
|
2279
|
+
create(params: MerchantAccountCreateRequest): Promise<MerchantAccountResponse>;
|
|
2280
|
+
retrieve(accountId: string): Promise<MerchantAccountResponse>;
|
|
2281
|
+
update(accountId: string, params: MerchantAccountUpdateRequest): Promise<MerchantAccountResponse>;
|
|
2282
|
+
delete(accountId: string): Promise<MerchantAccountResponse>;
|
|
2283
|
+
/** List all merchant accounts. `GET /accounts/list` */
|
|
2284
|
+
list(): Promise<MerchantAccountResponse[]>;
|
|
2285
|
+
/** Toggle key-value store for a merchant. `POST /accounts/{accountId}/kv` */
|
|
2286
|
+
toggleKv(accountId: string): Promise<Record<string, unknown>>;
|
|
2287
|
+
/** Get KV status for a merchant. `GET /accounts/{accountId}/kv` */
|
|
2288
|
+
getKvStatus(accountId: string): Promise<Record<string, unknown>>;
|
|
2289
|
+
/** Transfer keys between merchants. `POST /accounts/transfer_keys` */
|
|
2290
|
+
transferKeys(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
type RequestFn$r = <T>(method: string, path: string, options?: {
|
|
2294
|
+
body?: unknown;
|
|
2295
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2296
|
+
headers?: Record<string, string>;
|
|
2297
|
+
}) => Promise<T>;
|
|
2298
|
+
/** Retrieve and list hosted payment links. */
|
|
2299
|
+
declare class PaymentLinks {
|
|
2300
|
+
private readonly request;
|
|
2301
|
+
constructor(request: RequestFn$r);
|
|
2302
|
+
/**
|
|
2303
|
+
* Retrieve a payment link by its ID.
|
|
2304
|
+
*
|
|
2305
|
+
* @param linkId - The unique payment link ID.
|
|
2306
|
+
* @returns The payment link details.
|
|
2307
|
+
*/
|
|
2308
|
+
retrieve(linkId: string): Promise<PaymentLinkResponse>;
|
|
2309
|
+
/**
|
|
2310
|
+
* List payment links, optionally filtered by status or date range.
|
|
2311
|
+
*
|
|
2312
|
+
* @param params - Optional filter and pagination parameters.
|
|
2313
|
+
* @returns Paginated list of payment links.
|
|
2314
|
+
*/
|
|
2315
|
+
list(params?: PaymentLinkListParams): Promise<PaymentLinkListResponse>;
|
|
2316
|
+
/** Initiate (render) a payment link page. `GET /payment_link/{merchantId}/{paymentId}` */
|
|
2317
|
+
initiate(merchantId: string, paymentId: string): Promise<Record<string, unknown>>;
|
|
2318
|
+
/** Get payment link status. `GET /payment_linkstatus/{merchantId}/{paymentId}` */
|
|
2319
|
+
status(merchantId: string, paymentId: string): Promise<Record<string, unknown>>;
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
type RequestFn$q = <T>(method: string, path: string, options?: {
|
|
2323
|
+
body?: unknown;
|
|
2324
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2325
|
+
headers?: Record<string, string>;
|
|
2326
|
+
}) => Promise<T>;
|
|
2327
|
+
/** Create and manage saved payment methods for customers. */
|
|
2328
|
+
declare class PaymentMethods {
|
|
2329
|
+
private readonly request;
|
|
2330
|
+
constructor(request: RequestFn$q);
|
|
2331
|
+
/**
|
|
2332
|
+
* Save a new payment method (card, bank account, wallet, etc.).
|
|
2333
|
+
*
|
|
2334
|
+
* @param params - Payment method data including type and card/bank details.
|
|
2335
|
+
* @returns The saved payment method.
|
|
2336
|
+
*
|
|
2337
|
+
* @example
|
|
2338
|
+
* ```typescript
|
|
2339
|
+
* const pm = await delopay.paymentMethods.create({
|
|
2340
|
+
* payment_method: 'card',
|
|
2341
|
+
* customer_id: 'cus_123',
|
|
2342
|
+
* client_secret: 'cs_...',
|
|
2343
|
+
* });
|
|
2344
|
+
* ```
|
|
2345
|
+
*/
|
|
2346
|
+
create(params: PaymentMethodCreateRequest): Promise<PaymentMethodResponse>;
|
|
2347
|
+
/**
|
|
2348
|
+
* Retrieve a saved payment method by its ID.
|
|
2349
|
+
*
|
|
2350
|
+
* @param methodId - The payment method ID.
|
|
2351
|
+
* @returns The payment method.
|
|
2352
|
+
*/
|
|
2353
|
+
retrieve(methodId: string): Promise<PaymentMethodResponse>;
|
|
2354
|
+
/**
|
|
2355
|
+
* Update an existing payment method (e.g. update card expiry).
|
|
2356
|
+
*
|
|
2357
|
+
* @param methodId - The payment method ID to update.
|
|
2358
|
+
* @param params - Fields to update (card expiry, holder name, etc.).
|
|
2359
|
+
* @returns The updated payment method.
|
|
2360
|
+
*/
|
|
2361
|
+
update(methodId: string, params: PaymentMethodUpdateRequest): Promise<PaymentMethodResponse>;
|
|
2362
|
+
/**
|
|
2363
|
+
* Delete a saved payment method.
|
|
2364
|
+
*
|
|
2365
|
+
* @param methodId - The payment method ID to delete.
|
|
2366
|
+
* @returns Deletion confirmation.
|
|
2367
|
+
*/
|
|
2368
|
+
delete(methodId: string): Promise<PaymentMethodDeleteResponse>;
|
|
2369
|
+
/**
|
|
2370
|
+
* List payment methods using a client secret.
|
|
2371
|
+
*
|
|
2372
|
+
* @param params - Filter by `client_secret`.
|
|
2373
|
+
* @returns Array of payment methods.
|
|
2374
|
+
*/
|
|
2375
|
+
list(params?: PaymentMethodListParams): Promise<PaymentMethodResponse[]>;
|
|
2376
|
+
/**
|
|
2377
|
+
* List all saved payment methods for a customer.
|
|
2378
|
+
*
|
|
2379
|
+
* @param customerId - The customer ID.
|
|
2380
|
+
* @returns Customer's saved payment methods.
|
|
2381
|
+
*
|
|
2382
|
+
* @example
|
|
2383
|
+
* ```typescript
|
|
2384
|
+
* const { customer_payment_methods } = await delopay.paymentMethods.listForCustomer('cus_123');
|
|
2385
|
+
* ```
|
|
2386
|
+
*/
|
|
2387
|
+
listForCustomer(customerId: string): Promise<CustomerPaymentMethodsListResponse>;
|
|
2388
|
+
/**
|
|
2389
|
+
* Set a payment method as the default for a customer.
|
|
2390
|
+
*
|
|
2391
|
+
* @param customerId - The customer ID.
|
|
2392
|
+
* @param methodId - The payment method ID to set as default.
|
|
2393
|
+
* @returns The updated payment method.
|
|
2394
|
+
*/
|
|
2395
|
+
setDefault(customerId: string, methodId: string): Promise<PaymentMethodResponse>;
|
|
2396
|
+
/** Migrate a payment method. `POST /payment_methods/migrate` */
|
|
2397
|
+
migrate(params: Record<string, unknown>): Promise<PaymentMethodResponse>;
|
|
2398
|
+
/** Batch migrate payment methods. `POST /payment_methods/migrate-batch` */
|
|
2399
|
+
migrateBatch(params: Record<string, unknown>[]): Promise<Record<string, unknown>>;
|
|
2400
|
+
/** Batch update payment methods. `POST /payment_methods/update-batch` */
|
|
2401
|
+
updateBatch(params: Record<string, unknown>[]): Promise<Record<string, unknown>>;
|
|
2402
|
+
/** Batch retrieve payment methods. `GET /payment_methods/batch` */
|
|
2403
|
+
batchRetrieve(params?: Record<string, string | number | undefined>): Promise<PaymentMethodResponse[]>;
|
|
2404
|
+
/** Tokenize a card. `POST /payment_methods/tokenize-card` */
|
|
2405
|
+
tokenizeCard(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2406
|
+
/** Batch tokenize cards. `POST /payment_methods/tokenize-card-batch` */
|
|
2407
|
+
tokenizeCardBatch(params: Record<string, unknown>[]): Promise<Record<string, unknown>>;
|
|
2408
|
+
/** Initiate payment method collect link flow. `POST /payment_methods/collect` */
|
|
2409
|
+
collect(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2410
|
+
/** Save a payment method. `POST /payment_methods/{methodId}/save` */
|
|
2411
|
+
save(methodId: string, params?: Record<string, unknown>): Promise<PaymentMethodResponse>;
|
|
2412
|
+
/** Create payment method auth link token. `POST /payment_methods/auth/link` */
|
|
2413
|
+
createAuthLink(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2414
|
+
/** Exchange payment method auth token. `POST /payment_methods/auth/exchange` */
|
|
2415
|
+
exchangeAuthToken(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2416
|
+
/** Tokenize card using existing PM. `POST /payment_methods/{methodId}/tokenize-card` */
|
|
2417
|
+
tokenizeCardForMethod(methodId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
type RequestFn$p = <T>(method: string, path: string, options?: {
|
|
2421
|
+
body?: unknown;
|
|
2422
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2423
|
+
headers?: Record<string, string>;
|
|
2424
|
+
}) => Promise<T>;
|
|
2425
|
+
/** Manage payment intents — create, confirm, capture, cancel, and list payments. */
|
|
2426
|
+
declare class Payments {
|
|
2427
|
+
private readonly request;
|
|
2428
|
+
constructor(request: RequestFn$p);
|
|
2429
|
+
/**
|
|
2430
|
+
* Create a new payment intent.
|
|
2431
|
+
*
|
|
2432
|
+
* @param params - Payment creation parameters including amount and currency.
|
|
2433
|
+
* @returns The created payment intent.
|
|
2434
|
+
*
|
|
2435
|
+
* @example
|
|
2436
|
+
* ```typescript
|
|
2437
|
+
* const payment = await delopay.payments.create({
|
|
2438
|
+
* amount: 5000,
|
|
2439
|
+
* currency: 'EUR',
|
|
2440
|
+
* customer_id: 'cus_123',
|
|
2441
|
+
* });
|
|
2442
|
+
* ```
|
|
2443
|
+
*/
|
|
2444
|
+
create(params: PaymentCreateRequest): Promise<PaymentResponse>;
|
|
2445
|
+
/**
|
|
2446
|
+
* Retrieve a payment by its ID.
|
|
2447
|
+
*
|
|
2448
|
+
* @param paymentId - The unique payment intent ID.
|
|
2449
|
+
* @returns The payment intent.
|
|
2450
|
+
*
|
|
2451
|
+
* @example
|
|
2452
|
+
* ```typescript
|
|
2453
|
+
* const payment = await delopay.payments.retrieve('pay_abc123');
|
|
2454
|
+
* ```
|
|
2455
|
+
*/
|
|
2456
|
+
retrieve(paymentId: string): Promise<PaymentResponse>;
|
|
2457
|
+
/**
|
|
2458
|
+
* Update an existing payment intent before it is confirmed.
|
|
2459
|
+
*
|
|
2460
|
+
* @param paymentId - The payment intent ID to update.
|
|
2461
|
+
* @param params - Fields to update (amount, currency, metadata, etc.).
|
|
2462
|
+
* @returns The updated payment intent.
|
|
2463
|
+
*/
|
|
2464
|
+
update(paymentId: string, params: PaymentUpdateRequest): Promise<PaymentResponse>;
|
|
2465
|
+
/**
|
|
2466
|
+
* Confirm a payment intent, triggering authorisation with the selected gateway.
|
|
2467
|
+
*
|
|
2468
|
+
* @param paymentId - The payment intent ID to confirm.
|
|
2469
|
+
* @param params - Confirmation parameters (payment method data, return URL, etc.).
|
|
2470
|
+
* @returns The updated payment intent.
|
|
2471
|
+
*/
|
|
2472
|
+
confirm(paymentId: string, params: PaymentConfirmRequest): Promise<PaymentResponse>;
|
|
2473
|
+
/**
|
|
2474
|
+
* Capture a previously authorised payment.
|
|
2475
|
+
*
|
|
2476
|
+
* @param paymentId - The payment intent ID to capture.
|
|
2477
|
+
* @param params - Optional capture parameters (partial capture amount, etc.).
|
|
2478
|
+
* @returns The updated payment intent.
|
|
2479
|
+
*/
|
|
2480
|
+
capture(paymentId: string, params?: PaymentCaptureRequest): Promise<PaymentResponse>;
|
|
2481
|
+
/**
|
|
2482
|
+
* Cancel a payment intent that has not yet been captured.
|
|
2483
|
+
*
|
|
2484
|
+
* @param paymentId - The payment intent ID to cancel.
|
|
2485
|
+
* @param params - Optional cancellation reason.
|
|
2486
|
+
* @returns The updated payment intent.
|
|
2487
|
+
*/
|
|
2488
|
+
cancel(paymentId: string, params?: PaymentCancelRequest): Promise<PaymentResponse>;
|
|
2489
|
+
/**
|
|
2490
|
+
* List payment intents, optionally filtered by customer or date range.
|
|
2491
|
+
*
|
|
2492
|
+
* @param params - Optional filter and pagination parameters.
|
|
2493
|
+
* @returns Paginated list of payment intents.
|
|
2494
|
+
*
|
|
2495
|
+
* @example
|
|
2496
|
+
* ```typescript
|
|
2497
|
+
* const { data } = await delopay.payments.list({ customer_id: 'cus_123', limit: 25 });
|
|
2498
|
+
* ```
|
|
2499
|
+
*/
|
|
2500
|
+
list(params?: PaymentListParams): Promise<PaymentListResponse>;
|
|
2501
|
+
/** Generate session tokens. `POST /payments/session_tokens` */
|
|
2502
|
+
sessionTokens(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2503
|
+
/** Retrieve payment with gateway credentials. `POST /payments/sync` */
|
|
2504
|
+
sync(params: Record<string, unknown>): Promise<PaymentResponse>;
|
|
2505
|
+
/** Cancel after partial capture. `POST /payments/{paymentId}/cancel_post_capture` */
|
|
2506
|
+
cancelPostCapture(paymentId: string, params?: Record<string, unknown>): Promise<PaymentResponse>;
|
|
2507
|
+
/** Incrementally authorize more funds. `POST /payments/{paymentId}/incremental_authorization` */
|
|
2508
|
+
incrementalAuthorization(paymentId: string, params: Record<string, unknown>): Promise<PaymentResponse>;
|
|
2509
|
+
/** Extend authorization window. `POST /payments/{paymentId}/extend_authorization` */
|
|
2510
|
+
extendAuthorization(paymentId: string, params?: Record<string, unknown>): Promise<PaymentResponse>;
|
|
2511
|
+
/** Complete authorization. `POST /payments/{paymentId}/complete_authorize` */
|
|
2512
|
+
completeAuthorize(paymentId: string, params?: Record<string, unknown>): Promise<PaymentResponse>;
|
|
2513
|
+
/** Dynamic tax calculation. `POST /payments/{paymentId}/calculate_tax` */
|
|
2514
|
+
calculateTax(paymentId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2515
|
+
/** Update payment metadata. `POST /payments/{paymentId}/update_metadata` */
|
|
2516
|
+
updateMetadata(paymentId: string, params: Record<string, unknown>): Promise<PaymentResponse>;
|
|
2517
|
+
/** Retrieve extended card info. `GET /payments/{paymentId}/extended_card_info` */
|
|
2518
|
+
extendedCardInfo(paymentId: string): Promise<Record<string, unknown>>;
|
|
2519
|
+
/** List payments (profile-scoped). `GET /payments/profile/list` */
|
|
2520
|
+
listByProfile(params?: PaymentListParams): Promise<PaymentListResponse>;
|
|
2521
|
+
/** List payments across all shops. `GET /payments/list-all-shops` */
|
|
2522
|
+
listAllShops(params?: PaymentListParams): Promise<PaymentListResponse>;
|
|
2523
|
+
/** List payments by filter (POST body). `POST /payments/list` */
|
|
2524
|
+
listByFilter(params: Record<string, unknown>): Promise<PaymentListResponse>;
|
|
2525
|
+
/** Get payment filter options. `POST /payments/filter` */
|
|
2526
|
+
getFilters(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2527
|
+
/** Get payment filters (v2). `GET /payments/v2/filter` */
|
|
2528
|
+
getFiltersV2(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2529
|
+
/** Get payment aggregates. `GET /payments/aggregate` */
|
|
2530
|
+
aggregate(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2531
|
+
/** Get payment aggregates (profile-scoped). `GET /payments/profile/aggregate` */
|
|
2532
|
+
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2533
|
+
/** Manually update payment status. `PUT /payments/{paymentId}/manual-update` */
|
|
2534
|
+
manualUpdate(paymentId: string, params: Record<string, unknown>): Promise<PaymentResponse>;
|
|
2535
|
+
/** Approve a payment waiting for review. `POST /payments/{paymentId}/approve` */
|
|
2536
|
+
approve(paymentId: string, params?: Record<string, unknown>): Promise<PaymentResponse>;
|
|
2537
|
+
/** Reject a payment waiting for review. `POST /payments/{paymentId}/reject` */
|
|
2538
|
+
reject(paymentId: string, params?: Record<string, unknown>): Promise<PaymentResponse>;
|
|
2539
|
+
/** Initiate external 3DS authentication. `POST /payments/{paymentId}/3ds/authentication` */
|
|
2540
|
+
threeDsAuthentication(paymentId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
type RequestFn$o = <T>(method: string, path: string, options?: {
|
|
2544
|
+
body?: unknown;
|
|
2545
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2546
|
+
headers?: Record<string, string>;
|
|
2547
|
+
}) => Promise<T>;
|
|
2548
|
+
/** Create and manage payouts — fund transfers from merchant to a recipient bank account. */
|
|
2549
|
+
declare class Payouts {
|
|
2550
|
+
private readonly request;
|
|
2551
|
+
constructor(request: RequestFn$o);
|
|
2552
|
+
/**
|
|
2553
|
+
* Create a new payout.
|
|
2554
|
+
*
|
|
2555
|
+
* @param params - Payout parameters including amount, currency, and destination.
|
|
2556
|
+
* @returns The created payout.
|
|
2557
|
+
*
|
|
2558
|
+
* @example
|
|
2559
|
+
* ```typescript
|
|
2560
|
+
* const payout = await delopay.payouts.create({
|
|
2561
|
+
* amount: 10000,
|
|
2562
|
+
* currency: 'EUR',
|
|
2563
|
+
* customer_id: 'cus_123',
|
|
2564
|
+
* });
|
|
2565
|
+
* ```
|
|
2566
|
+
*/
|
|
2567
|
+
create(params: PayoutCreateRequest): Promise<PayoutResponse>;
|
|
2568
|
+
/**
|
|
2569
|
+
* Retrieve a payout by its ID.
|
|
2570
|
+
*
|
|
2571
|
+
* @param payoutId - The unique payout ID.
|
|
2572
|
+
* @returns The payout.
|
|
2573
|
+
*/
|
|
2574
|
+
retrieve(payoutId: string): Promise<PayoutResponse>;
|
|
2575
|
+
/**
|
|
2576
|
+
* Update a payout before it is confirmed.
|
|
2577
|
+
*
|
|
2578
|
+
* @param payoutId - The payout ID to update.
|
|
2579
|
+
* @param params - Fields to update.
|
|
2580
|
+
* @returns The updated payout.
|
|
2581
|
+
*/
|
|
2582
|
+
update(payoutId: string, params: PayoutUpdateRequest): Promise<PayoutResponse>;
|
|
2583
|
+
/**
|
|
2584
|
+
* Confirm a payout, triggering the actual transfer.
|
|
2585
|
+
*
|
|
2586
|
+
* @param payoutId - The payout ID to confirm.
|
|
2587
|
+
* @param params - Optional confirmation parameters.
|
|
2588
|
+
* @returns The updated payout.
|
|
2589
|
+
*/
|
|
2590
|
+
confirm(payoutId: string, params?: PayoutUpdateRequest): Promise<PayoutResponse>;
|
|
2591
|
+
/**
|
|
2592
|
+
* Cancel a payout before it is fulfilled.
|
|
2593
|
+
*
|
|
2594
|
+
* @param payoutId - The payout ID to cancel.
|
|
2595
|
+
* @returns The cancelled payout.
|
|
2596
|
+
*/
|
|
2597
|
+
cancel(payoutId: string): Promise<PayoutResponse>;
|
|
2598
|
+
/**
|
|
2599
|
+
* Mark a payout as fulfilled (manual confirmation of successful transfer).
|
|
2600
|
+
*
|
|
2601
|
+
* @param payoutId - The payout ID to fulfil.
|
|
2602
|
+
* @returns The fulfilled payout.
|
|
2603
|
+
*/
|
|
2604
|
+
fulfill(payoutId: string): Promise<PayoutResponse>;
|
|
2605
|
+
/**
|
|
2606
|
+
* List payouts, optionally filtered by status or date range.
|
|
2607
|
+
*
|
|
2608
|
+
* @param params - Optional filter and pagination parameters.
|
|
2609
|
+
* @returns Paginated list of payouts.
|
|
2610
|
+
*/
|
|
2611
|
+
list(params?: PayoutListParams): Promise<PayoutListResponse>;
|
|
2612
|
+
/** List payouts (profile-scoped). `GET /payouts/profile/list` */
|
|
2613
|
+
listByProfile(params?: PayoutListParams): Promise<PayoutListResponse>;
|
|
2614
|
+
/** List payouts by filter (POST body). `POST /payouts/list` */
|
|
2615
|
+
listByFilter(params: Record<string, unknown>): Promise<PayoutListResponse>;
|
|
2616
|
+
/** Get payout filter options. `POST /payouts/filter` */
|
|
2617
|
+
getFilters(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2618
|
+
/** Get payout filters (profile-scoped). `POST /payouts/profile/filter` */
|
|
2619
|
+
getFiltersByProfile(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2620
|
+
/** Get payout aggregates. `GET /payouts/aggregate` */
|
|
2621
|
+
aggregate(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2622
|
+
/** Get payout aggregates (profile-scoped). `GET /payouts/profile/aggregate` */
|
|
2623
|
+
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2624
|
+
/** Manually update payout status. `PUT /payouts/{payoutId}/manual-update` */
|
|
2625
|
+
manualUpdate(payoutId: string, params: Record<string, unknown>): Promise<PayoutResponse>;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
type RequestFn$n = <T>(method: string, path: string, options?: {
|
|
2629
|
+
body?: unknown;
|
|
2630
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2631
|
+
headers?: Record<string, string>;
|
|
2632
|
+
}) => Promise<T>;
|
|
2633
|
+
declare class Poll {
|
|
2634
|
+
private readonly request;
|
|
2635
|
+
constructor(request: RequestFn$n);
|
|
2636
|
+
getStatus(pollId: string): Promise<PollStatusResponse>;
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2639
|
+
type RequestFn$m = <T>(method: string, path: string, options?: {
|
|
2640
|
+
body?: unknown;
|
|
2641
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2642
|
+
headers?: Record<string, string>;
|
|
2643
|
+
}) => Promise<T>;
|
|
2644
|
+
declare class ProfileAcquirers {
|
|
2645
|
+
private readonly request;
|
|
2646
|
+
constructor(request: RequestFn$m);
|
|
2647
|
+
create(params: ProfileAcquirerCreateRequest): Promise<ProfileAcquirerResponse>;
|
|
2648
|
+
update(profileId: string, profileAcquirerId: string, params: ProfileAcquirerUpdateRequest): Promise<ProfileAcquirerResponse>;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
type RequestFn$l = <T>(method: string, path: string, options?: {
|
|
2652
|
+
body?: unknown;
|
|
2653
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2654
|
+
headers?: Record<string, string>;
|
|
2655
|
+
}) => Promise<T>;
|
|
2656
|
+
declare class Profiles {
|
|
2657
|
+
private readonly request;
|
|
2658
|
+
constructor(request: RequestFn$l);
|
|
2659
|
+
create(accountId: string, params: ProfileCreateRequest): Promise<ProfileResponse>;
|
|
2660
|
+
retrieve(accountId: string, profileId: string): Promise<ProfileResponse>;
|
|
2661
|
+
list(accountId: string): Promise<ProfileResponse[]>;
|
|
2662
|
+
update(accountId: string, profileId: string, params: ProfileUpdateRequest): Promise<ProfileResponse>;
|
|
2663
|
+
delete(accountId: string, profileId: string): Promise<ProfileResponse>;
|
|
2664
|
+
/** Toggle extended card info for a profile. `POST /account/{accountId}/business_profile/{profileId}/toggle_extended_card_info` */
|
|
2665
|
+
toggleExtendedCardInfo(accountId: string, profileId: string): Promise<ProfileResponse>;
|
|
2666
|
+
/** Toggle connector agnostic MIT. `POST /account/{accountId}/business_profile/{profileId}/toggle_connector_agnostic_mit` */
|
|
2667
|
+
toggleConnectorAgnosticMit(accountId: string, profileId: string): Promise<ProfileResponse>;
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
type RequestFn$k = <T>(method: string, path: string, options?: {
|
|
2671
|
+
body?: unknown;
|
|
2672
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2673
|
+
headers?: Record<string, string>;
|
|
2674
|
+
}) => Promise<T>;
|
|
2675
|
+
/** Create and manage projects — optional grouping layers that contain one or more shops. */
|
|
2676
|
+
declare class Projects {
|
|
2677
|
+
private readonly request;
|
|
2678
|
+
constructor(request: RequestFn$k);
|
|
2679
|
+
/**
|
|
2680
|
+
* Create a new project under a merchant account.
|
|
2681
|
+
*
|
|
2682
|
+
* @param params - Project creation parameters (name, description, etc.).
|
|
2683
|
+
* @param merchantId - The merchant account ID that owns this project.
|
|
2684
|
+
* @returns The created project.
|
|
2685
|
+
*
|
|
2686
|
+
* @example
|
|
2687
|
+
* ```typescript
|
|
2688
|
+
* const project = await delopay.projects.create({ name: 'EU Stores' }, 'merch_123');
|
|
2689
|
+
* ```
|
|
2690
|
+
*/
|
|
2691
|
+
create(params: ProjectCreateRequest, merchantId: string): Promise<ProjectResponse>;
|
|
2692
|
+
/**
|
|
2693
|
+
* Retrieve a project by its ID.
|
|
2694
|
+
*
|
|
2695
|
+
* @param projectId - The unique project ID.
|
|
2696
|
+
* @returns The project.
|
|
2697
|
+
*/
|
|
2698
|
+
retrieve(projectId: string): Promise<ProjectResponse>;
|
|
2699
|
+
/**
|
|
2700
|
+
* Update a project's details.
|
|
2701
|
+
*
|
|
2702
|
+
* @param projectId - The project ID to update.
|
|
2703
|
+
* @param params - Fields to update.
|
|
2704
|
+
* @returns The updated project.
|
|
2705
|
+
*/
|
|
2706
|
+
update(projectId: string, params: ProjectUpdateRequest): Promise<ProjectResponse>;
|
|
2707
|
+
/**
|
|
2708
|
+
* Delete a project.
|
|
2709
|
+
*
|
|
2710
|
+
* @param projectId - The project ID to delete.
|
|
2711
|
+
* @returns The deleted project object.
|
|
2712
|
+
*/
|
|
2713
|
+
delete(projectId: string): Promise<ProjectResponse>;
|
|
2714
|
+
/**
|
|
2715
|
+
* List all projects for a merchant.
|
|
2716
|
+
*
|
|
2717
|
+
* @param merchantId - The merchant account ID.
|
|
2718
|
+
* @returns Array of projects.
|
|
2719
|
+
*/
|
|
2720
|
+
list(merchantId: string): Promise<ProjectResponse[]>;
|
|
2721
|
+
/**
|
|
2722
|
+
* Get aggregate payment statistics across all projects for a merchant.
|
|
2723
|
+
*
|
|
2724
|
+
* @param merchantId - The merchant account ID.
|
|
2725
|
+
* @returns Project statistics.
|
|
2726
|
+
*/
|
|
2727
|
+
stats(merchantId: string): Promise<ProjectStatsResponse>;
|
|
2728
|
+
/**
|
|
2729
|
+
* Get a high-level overview (volume, counts, top connectors) for a merchant.
|
|
2730
|
+
*
|
|
2731
|
+
* @param merchantId - The merchant account ID.
|
|
2732
|
+
* @returns Merchant overview data.
|
|
2733
|
+
*/
|
|
2734
|
+
overview(merchantId: string): Promise<MerchantOverviewResponse>;
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
type RequestFn$j = <T>(method: string, path: string, options?: {
|
|
2738
|
+
body?: unknown;
|
|
2739
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2740
|
+
headers?: Record<string, string>;
|
|
2741
|
+
}) => Promise<T>;
|
|
2742
|
+
/** Create and manage refunds for completed payments. */
|
|
2743
|
+
declare class Refunds {
|
|
2744
|
+
private readonly request;
|
|
2745
|
+
constructor(request: RequestFn$j);
|
|
2746
|
+
/**
|
|
2747
|
+
* Create a refund for a payment.
|
|
2748
|
+
*
|
|
2749
|
+
* @param params - Refund parameters, including the required `payment_id` and optional amount.
|
|
2750
|
+
* @returns The created refund.
|
|
2751
|
+
*
|
|
2752
|
+
* @example
|
|
2753
|
+
* ```typescript
|
|
2754
|
+
* const refund = await delopay.refunds.create({
|
|
2755
|
+
* payment_id: 'pay_abc123',
|
|
2756
|
+
* amount: 2500, // partial refund of 25.00 EUR
|
|
2757
|
+
* });
|
|
2758
|
+
* ```
|
|
2759
|
+
*/
|
|
2760
|
+
create(params: RefundCreateRequest): Promise<RefundResponse>;
|
|
2761
|
+
/**
|
|
2762
|
+
* Retrieve a refund by its ID.
|
|
2763
|
+
*
|
|
2764
|
+
* @param refundId - The unique refund ID.
|
|
2765
|
+
* @returns The refund.
|
|
2766
|
+
*
|
|
2767
|
+
* @example
|
|
2768
|
+
* ```typescript
|
|
2769
|
+
* const refund = await delopay.refunds.retrieve('ref_abc123');
|
|
2770
|
+
* ```
|
|
2771
|
+
*/
|
|
2772
|
+
retrieve(refundId: string): Promise<RefundResponse>;
|
|
2773
|
+
/**
|
|
2774
|
+
* Update the reason or metadata on an existing refund.
|
|
2775
|
+
*
|
|
2776
|
+
* @param refundId - The refund ID to update.
|
|
2777
|
+
* @param params - Fields to update (reason, metadata).
|
|
2778
|
+
* @returns The updated refund.
|
|
2779
|
+
*/
|
|
2780
|
+
update(refundId: string, params: RefundUpdateRequest): Promise<RefundResponse>;
|
|
2781
|
+
/**
|
|
2782
|
+
* List refunds, optionally filtered by payment, status, or date range.
|
|
2783
|
+
*
|
|
2784
|
+
* @param params - Optional filter and pagination parameters.
|
|
2785
|
+
* @returns Paginated list of refunds.
|
|
2786
|
+
*/
|
|
2787
|
+
list(params?: RefundListParams): Promise<RefundListResponse>;
|
|
2788
|
+
/** List refunds (profile-scoped). `POST /refunds/profile/list` */
|
|
2789
|
+
listByProfile(params?: RefundListParams): Promise<RefundListResponse>;
|
|
2790
|
+
/** Get refund filter options. `POST /refunds/filter` */
|
|
2791
|
+
getFilters(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2792
|
+
/** Get refund filters (v2). `GET /refunds/v2/filter` */
|
|
2793
|
+
getFiltersV2(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2794
|
+
/** Get refund aggregates. `GET /refunds/aggregate` */
|
|
2795
|
+
aggregate(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2796
|
+
/** Get refund aggregates (profile-scoped). `GET /refunds/profile/aggregate` */
|
|
2797
|
+
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
2798
|
+
/** Manually update refund status. `PUT /refunds/{refundId}/manual-update` */
|
|
2799
|
+
manualUpdate(refundId: string, params: Record<string, unknown>): Promise<RefundResponse>;
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
type RequestFn$i = <T>(method: string, path: string, options?: {
|
|
2803
|
+
body?: unknown;
|
|
2804
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2805
|
+
headers?: Record<string, string>;
|
|
2806
|
+
}) => Promise<T>;
|
|
2807
|
+
declare class Relay {
|
|
2808
|
+
private readonly request;
|
|
2809
|
+
constructor(request: RequestFn$i);
|
|
2810
|
+
create(params: RelayRequest): Promise<RelayResponse>;
|
|
2811
|
+
retrieve(relayId: string): Promise<RelayResponse>;
|
|
2812
|
+
}
|
|
2813
|
+
|
|
2814
|
+
type RequestFn$h = <T>(method: string, path: string, options?: {
|
|
2815
|
+
body?: unknown;
|
|
2816
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2817
|
+
headers?: Record<string, string>;
|
|
2818
|
+
}) => Promise<T>;
|
|
2819
|
+
/**
|
|
2820
|
+
* Create and manage payment routing algorithms.
|
|
2821
|
+
*
|
|
2822
|
+
* Routing rules determine which gateway connector handles each payment based on
|
|
2823
|
+
* card type, currency, amount, or custom conditions.
|
|
2824
|
+
*/
|
|
2825
|
+
declare class Routing {
|
|
2826
|
+
private readonly request;
|
|
2827
|
+
readonly decision: RoutingDecisionManager;
|
|
2828
|
+
constructor(request: RequestFn$h);
|
|
2829
|
+
/**
|
|
2830
|
+
* Create a new routing algorithm.
|
|
2831
|
+
*
|
|
2832
|
+
* @param params - Routing algorithm definition (rule-based, priority, or volume-based).
|
|
2833
|
+
* @returns The created routing configuration.
|
|
2834
|
+
*
|
|
2835
|
+
* @example
|
|
2836
|
+
* ```typescript
|
|
2837
|
+
* const config = await delopay.routing.create({
|
|
2838
|
+
* name: 'EU Priority',
|
|
2839
|
+
* algorithm: { type: 'priority', data: [{ connector: 'stripe' }] },
|
|
2840
|
+
* });
|
|
2841
|
+
* ```
|
|
2842
|
+
*/
|
|
2843
|
+
create(params: RoutingConfigCreateRequest): Promise<RoutingConfigResponse>;
|
|
2844
|
+
/**
|
|
2845
|
+
* Retrieve a routing algorithm by its ID.
|
|
2846
|
+
*
|
|
2847
|
+
* @param algorithmId - The routing algorithm ID.
|
|
2848
|
+
* @returns The routing configuration.
|
|
2849
|
+
*/
|
|
2850
|
+
retrieve(algorithmId: string): Promise<RoutingConfigResponse>;
|
|
2851
|
+
/**
|
|
2852
|
+
* Activate a routing algorithm, making it the active routing strategy for the shop.
|
|
2853
|
+
*
|
|
2854
|
+
* @param algorithmId - The routing algorithm ID to activate.
|
|
2855
|
+
* @returns The activated routing configuration.
|
|
2856
|
+
*/
|
|
2857
|
+
activate(algorithmId: string): Promise<RoutingConfigResponse>;
|
|
2858
|
+
/**
|
|
2859
|
+
* Deactivate the currently active routing algorithm (falls back to default routing).
|
|
2860
|
+
*
|
|
2861
|
+
* @returns The deactivated routing configuration.
|
|
2862
|
+
*/
|
|
2863
|
+
deactivate(): Promise<RoutingConfigResponse>;
|
|
2864
|
+
/**
|
|
2865
|
+
* List all routing algorithms for the current shop.
|
|
2866
|
+
*
|
|
2867
|
+
* @returns Array of routing configurations.
|
|
2868
|
+
*/
|
|
2869
|
+
list(): Promise<RoutingConfigResponse[]>;
|
|
2870
|
+
/** Get active routing config. `GET /routing/active` */
|
|
2871
|
+
getActive(): Promise<RoutingConfigResponse>;
|
|
2872
|
+
/** Update default routing config. `POST /routing/default` */
|
|
2873
|
+
updateDefault(params: Record<string, unknown>): Promise<RoutingConfigResponse>;
|
|
2874
|
+
/** Retrieve default config for profiles. `GET /routing/default/profile` */
|
|
2875
|
+
getDefaultProfile(): Promise<RoutingConfigResponse>;
|
|
2876
|
+
/** Update default config for a profile. `POST /routing/default/profile/{profileId}` */
|
|
2877
|
+
updateDefaultProfile(profileId: string, params: Record<string, unknown>): Promise<RoutingConfigResponse>;
|
|
2878
|
+
/** List routing configs for profile. `GET /routing/list/profile` */
|
|
2879
|
+
listForProfile(): Promise<RoutingConfigResponse[]>;
|
|
2880
|
+
/** Evaluate a routing rule. `POST /routing/rule/evaluate` */
|
|
2881
|
+
evaluateRule(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2882
|
+
/** Migrate routing rules for profile. `POST /routing/rule/migrate` */
|
|
2883
|
+
migrateRule(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2884
|
+
/** Evaluate routing for a payment. `POST /routing/evaluate` */
|
|
2885
|
+
evaluate(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2886
|
+
/** Update gateway scores for dynamic routing. `POST /routing/feedback` */
|
|
2887
|
+
feedback(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2888
|
+
}
|
|
2889
|
+
declare class RoutingDecisionManager {
|
|
2890
|
+
private readonly request;
|
|
2891
|
+
constructor(request: RequestFn$h);
|
|
2892
|
+
/** Upsert decision manager config. `PUT /routing/decision` */
|
|
2893
|
+
upsert(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2894
|
+
/** Retrieve decision manager config. `GET /routing/decision` */
|
|
2895
|
+
retrieve(): Promise<Record<string, unknown>>;
|
|
2896
|
+
/** Delete decision manager config. `DELETE /routing/decision` */
|
|
2897
|
+
delete(): Promise<Record<string, unknown>>;
|
|
2898
|
+
/** Upsert surcharge decision config. `PUT /routing/decision/surcharge` */
|
|
2899
|
+
upsertSurcharge(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
2900
|
+
/** Retrieve surcharge decision config. `GET /routing/decision/surcharge` */
|
|
2901
|
+
retrieveSurcharge(): Promise<Record<string, unknown>>;
|
|
2902
|
+
/** Delete surcharge decision config. `DELETE /routing/decision/surcharge` */
|
|
2903
|
+
deleteSurcharge(): Promise<Record<string, unknown>>;
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
type RequestFn$g = <T>(method: string, path: string, options?: {
|
|
2907
|
+
body?: unknown;
|
|
2908
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
2909
|
+
headers?: Record<string, string>;
|
|
2910
|
+
}) => Promise<T>;
|
|
2911
|
+
/** Manage gateway connections for a specific shop. */
|
|
2912
|
+
declare class ShopGateways {
|
|
2913
|
+
private readonly request;
|
|
2914
|
+
constructor(request: RequestFn$g);
|
|
2915
|
+
/**
|
|
2916
|
+
* Connect a payment gateway to a shop.
|
|
2917
|
+
*
|
|
2918
|
+
* @param merchantId - The merchant account ID.
|
|
2919
|
+
* @param shopId - The shop (business profile) ID.
|
|
2920
|
+
* @param params - Gateway connector credentials and configuration.
|
|
2921
|
+
* @returns The created gateway connection.
|
|
2922
|
+
*/
|
|
2923
|
+
connect(merchantId: string, shopId: string, params: GatewayConnectRequest): Promise<GatewayResponse>;
|
|
2924
|
+
/**
|
|
2925
|
+
* List all gateway connections for a shop.
|
|
2926
|
+
*
|
|
2927
|
+
* @param merchantId - The merchant account ID.
|
|
2928
|
+
* @param shopId - The shop ID.
|
|
2929
|
+
* @returns Array of gateway connections.
|
|
2930
|
+
*/
|
|
2931
|
+
list(merchantId: string, shopId: string): Promise<GatewayResponse[]>;
|
|
2932
|
+
/**
|
|
2933
|
+
* Disconnect a gateway from a shop.
|
|
2934
|
+
*
|
|
2935
|
+
* @param merchantId - The merchant account ID.
|
|
2936
|
+
* @param shopId - The shop ID.
|
|
2937
|
+
* @param gatewayId - The gateway connector ID to remove.
|
|
2938
|
+
* @returns The removed gateway connection.
|
|
2939
|
+
*/
|
|
2940
|
+
disconnect(merchantId: string, shopId: string, gatewayId: string): Promise<GatewayResponse>;
|
|
2941
|
+
}
|
|
2942
|
+
/**
|
|
2943
|
+
* Create and manage shops (business profiles) within a merchant account.
|
|
2944
|
+
*
|
|
2945
|
+
* Each shop can have its own gateway connections, routing rules, and fee schedules.
|
|
2946
|
+
*/
|
|
2947
|
+
declare class Shops {
|
|
2948
|
+
private readonly request;
|
|
2949
|
+
/** Gateway connection management for shops. */
|
|
2950
|
+
readonly gateways: ShopGateways;
|
|
2951
|
+
constructor(request: RequestFn$g);
|
|
2952
|
+
/**
|
|
2953
|
+
* Create a new shop under a merchant account.
|
|
2954
|
+
*
|
|
2955
|
+
* @param merchantId - The merchant account ID.
|
|
2956
|
+
* @param params - Shop creation parameters (name, etc.).
|
|
2957
|
+
* @returns The created shop.
|
|
2958
|
+
*
|
|
2959
|
+
* @example
|
|
2960
|
+
* ```typescript
|
|
2961
|
+
* const shop = await delopay.shops.create('merch_123', { profile_name: 'EU Store' });
|
|
2962
|
+
* ```
|
|
2963
|
+
*/
|
|
2964
|
+
create(merchantId: string, params: ShopCreateRequest): Promise<ShopResponse>;
|
|
2965
|
+
/**
|
|
2966
|
+
* Retrieve a shop by its ID.
|
|
2967
|
+
*
|
|
2968
|
+
* @param merchantId - The merchant account ID.
|
|
2969
|
+
* @param shopId - The shop ID.
|
|
2970
|
+
* @returns The shop.
|
|
2971
|
+
*/
|
|
2972
|
+
retrieve(merchantId: string, shopId: string): Promise<ShopResponse>;
|
|
2973
|
+
/**
|
|
2974
|
+
* Update a shop's configuration.
|
|
2975
|
+
*
|
|
2976
|
+
* @param merchantId - The merchant account ID.
|
|
2977
|
+
* @param shopId - The shop ID to update.
|
|
2978
|
+
* @param params - Fields to update.
|
|
2979
|
+
* @returns The updated shop.
|
|
2980
|
+
*/
|
|
2981
|
+
update(merchantId: string, shopId: string, params: ShopUpdateRequest): Promise<ShopResponse>;
|
|
2982
|
+
/**
|
|
2983
|
+
* Delete a shop.
|
|
2984
|
+
*
|
|
2985
|
+
* @param merchantId - The merchant account ID.
|
|
2986
|
+
* @param shopId - The shop ID to delete.
|
|
2987
|
+
* @returns The deleted shop object.
|
|
2988
|
+
*/
|
|
2989
|
+
delete(merchantId: string, shopId: string): Promise<ShopResponse>;
|
|
2990
|
+
/**
|
|
2991
|
+
* List all shops under a merchant account.
|
|
2992
|
+
*
|
|
2993
|
+
* @param merchantId - The merchant account ID.
|
|
2994
|
+
* @returns Array of shops.
|
|
2995
|
+
*/
|
|
2996
|
+
list(merchantId: string): Promise<ShopResponse[]>;
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
type RequestFn$f = <T>(method: string, path: string, options?: {
|
|
3000
|
+
body?: unknown;
|
|
3001
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3002
|
+
headers?: Record<string, string>;
|
|
3003
|
+
}) => Promise<T>;
|
|
3004
|
+
declare class StripeConnect {
|
|
3005
|
+
private readonly request;
|
|
3006
|
+
constructor(request: RequestFn$f);
|
|
3007
|
+
createAccount(params: StripeConnectAccountRequest): Promise<StripeConnectAccountResponse>;
|
|
3008
|
+
createAccountLink(params: StripeConnectLinkRequest): Promise<StripeConnectLinkResponse>;
|
|
3009
|
+
/** Get onboarding action URL. `POST /connector_onboarding/action_url` */
|
|
3010
|
+
getActionUrl(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3011
|
+
/** Sync onboarding status. `POST /connector_onboarding/sync` */
|
|
3012
|
+
syncOnboarding(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3013
|
+
/** Reset tracking ID. `POST /connector_onboarding/reset_tracking_id` */
|
|
3014
|
+
resetTrackingId(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3015
|
+
}
|
|
3016
|
+
|
|
3017
|
+
type RequestFn$e = <T>(method: string, path: string, options?: {
|
|
3018
|
+
body?: unknown;
|
|
3019
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3020
|
+
headers?: Record<string, string>;
|
|
3021
|
+
}) => Promise<T>;
|
|
3022
|
+
declare class ThreeDsRules {
|
|
3023
|
+
private readonly request;
|
|
3024
|
+
constructor(request: RequestFn$e);
|
|
3025
|
+
execute(params: ThreeDsRuleExecuteRequest): Promise<ThreeDsRuleResponse>;
|
|
3026
|
+
}
|
|
3027
|
+
|
|
3028
|
+
type RequestFn$d = <T>(method: string, path: string, options?: {
|
|
3029
|
+
body?: unknown;
|
|
3030
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3031
|
+
headers?: Record<string, string>;
|
|
3032
|
+
}) => Promise<T>;
|
|
3033
|
+
declare class Users {
|
|
3034
|
+
private readonly request;
|
|
3035
|
+
constructor(request: RequestFn$d);
|
|
3036
|
+
signUp(params: SignUpRequest | SignUpWithMerchantRequest): Promise<AuthResponse>;
|
|
3037
|
+
signIn(params: SignInRequest): Promise<AuthResponse>;
|
|
3038
|
+
signOut(): Promise<Record<string, unknown>>;
|
|
3039
|
+
getDetails(): Promise<UserResponse>;
|
|
3040
|
+
update(params: UpdateUserDetailsRequest): Promise<UserResponse>;
|
|
3041
|
+
changePassword(params: ChangePasswordRequest): Promise<UserResponse>;
|
|
3042
|
+
rotatePassword(params: ResetPasswordRequest): Promise<UserResponse>;
|
|
3043
|
+
forgotPassword(params: ForgotPasswordRequest): Promise<Record<string, unknown>>;
|
|
3044
|
+
resetPassword(params: ResetPasswordRequest): Promise<Record<string, unknown>>;
|
|
3045
|
+
verifyEmail(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
3046
|
+
sendVerificationEmail(params: ForgotPasswordRequest): Promise<Record<string, unknown>>;
|
|
3047
|
+
createMerchant(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
3048
|
+
switchMerchant(params: SwitchMerchantRequest): Promise<AuthResponse>;
|
|
3049
|
+
switchProfile(params: SwitchProfileRequest): Promise<AuthResponse>;
|
|
3050
|
+
listMerchants(): Promise<Record<string, unknown>[]>;
|
|
3051
|
+
listProfiles(): Promise<Record<string, unknown>[]>;
|
|
3052
|
+
inviteUsers(params: InviteUsersRequest[]): Promise<InviteUsersResponse[]>;
|
|
3053
|
+
acceptInvitation(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
3054
|
+
beginTotp(): Promise<TotpResponse>;
|
|
3055
|
+
verifyTotp(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
3056
|
+
resetTotp(): Promise<Record<string, unknown>>;
|
|
3057
|
+
generateRecoveryCodes(): Promise<RecoveryCodesResponse>;
|
|
3058
|
+
verifyRecoveryCode(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
3059
|
+
sendPhoneOtp(params: PhoneOtpRequest): Promise<PhoneOtpResponse>;
|
|
3060
|
+
verifyPhoneOtp(params: PhoneOtpVerifyRequest): Promise<PhoneOtpVerifyResponse>;
|
|
3061
|
+
getRoleFromToken(): Promise<Record<string, unknown>>;
|
|
3062
|
+
listRoles(): Promise<Record<string, unknown>[]>;
|
|
3063
|
+
listUserRoles(params?: Record<string, unknown>): Promise<Record<string, unknown>[]>;
|
|
3064
|
+
updateUserRole(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3065
|
+
deleteUserRole(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3066
|
+
getDashboardMetadata(params?: Record<string, unknown>): Promise<DashboardMetadataResponse>;
|
|
3067
|
+
setDashboardMetadata(params: Record<string, unknown>): Promise<DashboardMetadataResponse>;
|
|
3068
|
+
/** Sign in (v2). `POST /user/v2/signin` */
|
|
3069
|
+
signInV2(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
3070
|
+
/** Sign in via OIDC. `POST /user/oidc` */
|
|
3071
|
+
signInOidc(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
3072
|
+
/** Transfer key. `POST /user/key/transfer` */
|
|
3073
|
+
transferKey(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3074
|
+
/** List invitations. `GET /user/list/invitation` */
|
|
3075
|
+
listInvitations(): Promise<Record<string, unknown>[]>;
|
|
3076
|
+
/** Check 2FA status. `GET /user/2fa` */
|
|
3077
|
+
check2faStatus(): Promise<Record<string, unknown>>;
|
|
3078
|
+
/** Check 2FA status (v2). `GET /user/2fa/v2` */
|
|
3079
|
+
check2faStatusV2(): Promise<Record<string, unknown>>;
|
|
3080
|
+
/** Update TOTP. `PUT /user/2fa/totp/verify` */
|
|
3081
|
+
updateTotp(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3082
|
+
/** Terminate 2FA. `GET /user/2fa/terminate` */
|
|
3083
|
+
terminate2fa(): Promise<Record<string, unknown>>;
|
|
3084
|
+
/** Create auth method. `POST /user/auth` */
|
|
3085
|
+
createAuthMethod(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3086
|
+
/** Update auth method. `PUT /user/auth` */
|
|
3087
|
+
updateAuthMethod(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3088
|
+
/** List auth methods. `GET /user/auth/list` */
|
|
3089
|
+
listAuthMethods(): Promise<Record<string, unknown>[]>;
|
|
3090
|
+
/** Get auth URL. `GET /user/auth/url` */
|
|
3091
|
+
getAuthUrl(): Promise<Record<string, unknown>>;
|
|
3092
|
+
/** Select auth method. `POST /user/auth/select` */
|
|
3093
|
+
selectAuth(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3094
|
+
/** List user roles (v2). `POST /user/user/v2` */
|
|
3095
|
+
listUserRolesV2(params?: Record<string, unknown>): Promise<Record<string, unknown>[]>;
|
|
3096
|
+
/** List users in lineage. `GET /user/user/list` */
|
|
3097
|
+
listUsersInLineage(): Promise<Record<string, unknown>[]>;
|
|
3098
|
+
/** List users in lineage (v2). `GET /user/user/v2/list` */
|
|
3099
|
+
listUsersInLineageV2(): Promise<Record<string, unknown>[]>;
|
|
3100
|
+
/** Accept invitation (v2). `POST /user/user/invite/accept/v2` */
|
|
3101
|
+
acceptInvitationV2(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
3102
|
+
/** Resend invite. `POST /user/user/resend_invite` */
|
|
3103
|
+
resendInvite(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3104
|
+
/** Clone connector. `POST /user/clone_connector` */
|
|
3105
|
+
cloneConnector(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3106
|
+
/** Get role (v2). `GET /user/role/v2` */
|
|
3107
|
+
getRoleV2(): Promise<Record<string, unknown>>;
|
|
3108
|
+
/** Get role (v3). `GET /user/role/v3` */
|
|
3109
|
+
getRoleV3(): Promise<Record<string, unknown>>;
|
|
3110
|
+
/** List roles (v2). `GET /user/role/v2/list` */
|
|
3111
|
+
listRolesV2(): Promise<Record<string, unknown>[]>;
|
|
3112
|
+
/** List invitable roles. `GET /user/role/list/invite` */
|
|
3113
|
+
listInvitableRoles(): Promise<Record<string, unknown>[]>;
|
|
3114
|
+
/** List updatable roles. `GET /user/role/list/update` */
|
|
3115
|
+
listUpdatableRoles(): Promise<Record<string, unknown>[]>;
|
|
3116
|
+
/** Get permission info. `GET /user/permission_info` */
|
|
3117
|
+
getPermissionInfo(): Promise<Record<string, unknown>>;
|
|
3118
|
+
/** Get module list. `GET /user/module/list` */
|
|
3119
|
+
getModuleList(): Promise<Record<string, unknown>[]>;
|
|
3120
|
+
/** Get parent list. `GET /user/parent/list` */
|
|
3121
|
+
getParentList(): Promise<Record<string, unknown>[]>;
|
|
3122
|
+
/** Create a role. `POST /user/role` */
|
|
3123
|
+
createRole(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3124
|
+
/** Get role by ID. `GET /user/role/{roleId}` */
|
|
3125
|
+
getRoleById(roleId: string): Promise<Record<string, unknown>>;
|
|
3126
|
+
/** Update role by ID. `PUT /user/role/{roleId}` */
|
|
3127
|
+
updateRole(roleId: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3130
|
+
type RequestFn$c = <T>(method: string, path: string, options?: {
|
|
3131
|
+
body?: unknown;
|
|
3132
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3133
|
+
headers?: Record<string, string>;
|
|
3134
|
+
}) => Promise<T>;
|
|
3135
|
+
declare class Verification {
|
|
3136
|
+
private readonly request;
|
|
3137
|
+
constructor(request: RequestFn$c);
|
|
3138
|
+
registerApplePayDomains(merchantId: string, params: ApplePayVerificationRequest): Promise<ApplePayVerificationResponse>;
|
|
3139
|
+
getApplePayVerifiedDomains(params: Record<string, string>): Promise<ApplePayVerifiedDomainsResponse>;
|
|
3140
|
+
}
|
|
3141
|
+
|
|
3142
|
+
type RequestFn$b = <T>(method: string, path: string, options?: {
|
|
3143
|
+
body?: unknown;
|
|
3144
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3145
|
+
headers?: Record<string, string>;
|
|
3146
|
+
}) => Promise<T>;
|
|
3147
|
+
type AnalyticsScope = 'merchant' | 'org' | 'profile';
|
|
3148
|
+
declare class AnalyticsDomain {
|
|
3149
|
+
private readonly request;
|
|
3150
|
+
private readonly domain;
|
|
3151
|
+
constructor(request: RequestFn$b, domain: string);
|
|
3152
|
+
/** Get metrics. `POST /analytics/v1/metrics/{domain}` */
|
|
3153
|
+
metrics(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3154
|
+
/** Get filters. `POST /analytics/v1/filters/{domain}` */
|
|
3155
|
+
filters(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3156
|
+
/** Generate report. `POST /analytics/v1/report/{domain}` */
|
|
3157
|
+
report(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3158
|
+
/** Sankey chart data. `POST /analytics/v1/metrics/{domain}/sankey` */
|
|
3159
|
+
sankey(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3160
|
+
}
|
|
3161
|
+
declare class Analytics {
|
|
3162
|
+
private readonly request;
|
|
3163
|
+
readonly payments: AnalyticsDomain;
|
|
3164
|
+
readonly refunds: AnalyticsDomain;
|
|
3165
|
+
readonly disputes: AnalyticsDomain;
|
|
3166
|
+
readonly authEvents: AnalyticsDomain;
|
|
3167
|
+
readonly sdkEvents: AnalyticsDomain;
|
|
3168
|
+
readonly frm: AnalyticsDomain;
|
|
3169
|
+
readonly apiEvents: AnalyticsDomain;
|
|
3170
|
+
readonly routing: AnalyticsDomain;
|
|
3171
|
+
constructor(request: RequestFn$b);
|
|
3172
|
+
/** Global search. `POST /analytics/v1/search` */
|
|
3173
|
+
search(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3174
|
+
/** Domain-specific search. `POST /analytics/v1/search/{domain}` */
|
|
3175
|
+
searchDomain(domain: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3176
|
+
/** Get analytics info. `GET /analytics/v1/{domain}/info` */
|
|
3177
|
+
getInfo(domain: string): Promise<Record<string, unknown>>;
|
|
3178
|
+
/** Get API event logs. `GET /analytics/v1/api_event_logs` */
|
|
3179
|
+
apiEventLogs(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3180
|
+
/** Get SDK event logs. `POST /analytics/v1/sdk_event_logs` */
|
|
3181
|
+
sdkEventLogs(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3182
|
+
/** Get connector event logs. `GET /analytics/v1/connector_event_logs` */
|
|
3183
|
+
connectorEventLogs(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3184
|
+
/** Get routing event logs. `GET /analytics/v1/routing_event_logs` */
|
|
3185
|
+
routingEventLogs(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3186
|
+
/** Get outgoing webhook event logs. `GET /analytics/v1/outgoing_webhook_event_logs` */
|
|
3187
|
+
outgoingWebhookEventLogs(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
type RequestFn$a = <T>(method: string, path: string, options?: {
|
|
3191
|
+
body?: unknown;
|
|
3192
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3193
|
+
headers?: Record<string, string>;
|
|
3194
|
+
}) => Promise<T>;
|
|
3195
|
+
declare class AnalyticsDashboard {
|
|
3196
|
+
private readonly request;
|
|
3197
|
+
constructor(request: RequestFn$a);
|
|
3198
|
+
/** Get analytics dashboard data. `GET /analytics-dashboard` */
|
|
3199
|
+
retrieve(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3200
|
+
/** Generate analytics dashboard report. `POST /analytics-dashboard` */
|
|
3201
|
+
generate(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
type RequestFn$9 = <T>(method: string, path: string, options?: {
|
|
3205
|
+
body?: unknown;
|
|
3206
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3207
|
+
headers?: Record<string, string>;
|
|
3208
|
+
}) => Promise<T>;
|
|
3209
|
+
declare class Cache {
|
|
3210
|
+
private readonly request;
|
|
3211
|
+
constructor(request: RequestFn$9);
|
|
3212
|
+
/** Invalidate a cache entry by key. `POST /cache/invalidate/{key}` */
|
|
3213
|
+
invalidate(key: string): Promise<Record<string, unknown>>;
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3216
|
+
type RequestFn$8 = <T>(method: string, path: string, options?: {
|
|
3217
|
+
body?: unknown;
|
|
3218
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3219
|
+
headers?: Record<string, string>;
|
|
3220
|
+
}) => Promise<T>;
|
|
3221
|
+
declare class Cards {
|
|
3222
|
+
private readonly request;
|
|
3223
|
+
constructor(request: RequestFn$8);
|
|
3224
|
+
/** Create a card. `POST /cards/create` */
|
|
3225
|
+
create(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3226
|
+
/** Update a card. `POST /cards/update` */
|
|
3227
|
+
update(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3228
|
+
/** Retrieve card info by BIN. `GET /cards/{bin}` */
|
|
3229
|
+
retrieve(bin: string): Promise<Record<string, unknown>>;
|
|
3230
|
+
}
|
|
3231
|
+
|
|
3232
|
+
type RequestFn$7 = <T>(method: string, path: string, options?: {
|
|
3233
|
+
body?: unknown;
|
|
3234
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3235
|
+
headers?: Record<string, string>;
|
|
3236
|
+
}) => Promise<T>;
|
|
3237
|
+
declare class Configs {
|
|
3238
|
+
private readonly request;
|
|
3239
|
+
constructor(request: RequestFn$7);
|
|
3240
|
+
/** Create a config. `POST /configs` */
|
|
3241
|
+
create(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3242
|
+
/** Retrieve a config by key. `GET /configs/{key}` */
|
|
3243
|
+
retrieve(key: string): Promise<Record<string, unknown>>;
|
|
3244
|
+
/** Update a config. `PUT /configs/{key}` */
|
|
3245
|
+
update(key: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3246
|
+
/** Delete a config. `DELETE /configs/{key}` */
|
|
3247
|
+
delete(key: string): Promise<Record<string, unknown>>;
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
type RequestFn$6 = <T>(method: string, path: string, options?: {
|
|
3251
|
+
body?: unknown;
|
|
3252
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3253
|
+
headers?: Record<string, string>;
|
|
3254
|
+
}) => Promise<T>;
|
|
3255
|
+
declare class Export {
|
|
3256
|
+
private readonly request;
|
|
3257
|
+
constructor(request: RequestFn$6);
|
|
3258
|
+
/** Export transactions. `POST /export/transactions` */
|
|
3259
|
+
transactions(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3260
|
+
}
|
|
3261
|
+
|
|
3262
|
+
type RequestFn$5 = <T>(method: string, path: string, options?: {
|
|
3263
|
+
body?: unknown;
|
|
3264
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3265
|
+
headers?: Record<string, string>;
|
|
3266
|
+
}) => Promise<T>;
|
|
3267
|
+
declare class FeatureMatrix {
|
|
3268
|
+
private readonly request;
|
|
3269
|
+
constructor(request: RequestFn$5);
|
|
3270
|
+
/** Retrieve the feature matrix. `GET /feature_matrix` */
|
|
3271
|
+
retrieve(): Promise<Record<string, unknown>>;
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3274
|
+
type RequestFn$4 = <T>(method: string, path: string, options?: {
|
|
3275
|
+
body?: unknown;
|
|
3276
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3277
|
+
headers?: Record<string, string>;
|
|
3278
|
+
}) => Promise<T>;
|
|
3279
|
+
declare class Files {
|
|
3280
|
+
private readonly request;
|
|
3281
|
+
constructor(request: RequestFn$4);
|
|
3282
|
+
/** Upload a file. `POST /files` */
|
|
3283
|
+
create(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3284
|
+
/** Retrieve/download a file. `GET /files/{fileId}` */
|
|
3285
|
+
retrieve(fileId: string): Promise<Record<string, unknown>>;
|
|
3286
|
+
/** Delete a file. `DELETE /files/{fileId}` */
|
|
3287
|
+
delete(fileId: string): Promise<Record<string, unknown>>;
|
|
3288
|
+
}
|
|
3289
|
+
|
|
3290
|
+
type RequestFn$3 = <T>(method: string, path: string, options?: {
|
|
3291
|
+
body?: unknown;
|
|
3292
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3293
|
+
headers?: Record<string, string>;
|
|
3294
|
+
}) => Promise<T>;
|
|
3295
|
+
declare class Forex {
|
|
3296
|
+
private readonly request;
|
|
3297
|
+
constructor(request: RequestFn$3);
|
|
3298
|
+
/** Retrieve forex rates. `GET /forex/rates` */
|
|
3299
|
+
getRates(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3300
|
+
/** Convert from minor currency. `GET /forex/convert_from_minor` */
|
|
3301
|
+
convertFromMinor(params: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3302
|
+
}
|
|
3303
|
+
|
|
3304
|
+
type RequestFn$2 = <T>(method: string, path: string, options?: {
|
|
3305
|
+
body?: unknown;
|
|
3306
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3307
|
+
headers?: Record<string, string>;
|
|
3308
|
+
}) => Promise<T>;
|
|
3309
|
+
declare class Regions {
|
|
3310
|
+
private readonly request;
|
|
3311
|
+
constructor(request: RequestFn$2);
|
|
3312
|
+
/** Create a region. `POST /regions` */
|
|
3313
|
+
create(params: RegionCreateRequest): Promise<RegionResponse>;
|
|
3314
|
+
/** Retrieve a region by ID. `GET /regions/{regionId}` */
|
|
3315
|
+
retrieve(regionId: string): Promise<RegionResponse>;
|
|
3316
|
+
/** Update a region. `PUT /regions/{regionId}` */
|
|
3317
|
+
update(regionId: string, params: RegionUpdateRequest): Promise<RegionResponse>;
|
|
3318
|
+
/** Delete a region. `DELETE /regions/{regionId}` */
|
|
3319
|
+
delete(regionId: string): Promise<RegionResponse>;
|
|
3320
|
+
/** List all regions. `GET /regions/list` */
|
|
3321
|
+
list(): Promise<RegionResponse[]>;
|
|
3322
|
+
}
|
|
3323
|
+
|
|
3324
|
+
type RequestFn$1 = <T>(method: string, path: string, options?: {
|
|
3325
|
+
body?: unknown;
|
|
3326
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3327
|
+
headers?: Record<string, string>;
|
|
3328
|
+
}) => Promise<T>;
|
|
3329
|
+
declare class Subscriptions {
|
|
3330
|
+
private readonly request;
|
|
3331
|
+
constructor(request: RequestFn$1);
|
|
3332
|
+
/** Create and immediately confirm a subscription. `POST /subscriptions` */
|
|
3333
|
+
createAndConfirm(params: SubscriptionCreateRequest): Promise<SubscriptionResponse>;
|
|
3334
|
+
/** Create a subscription (without confirming). `POST /subscriptions/create` */
|
|
3335
|
+
create(params: SubscriptionCreateRequest): Promise<SubscriptionResponse>;
|
|
3336
|
+
/** Retrieve a subscription by ID. `GET /subscriptions/{subscriptionId}` */
|
|
3337
|
+
retrieve(subscriptionId: string): Promise<SubscriptionResponse>;
|
|
3338
|
+
/** Confirm a subscription. `POST /subscriptions/{subscriptionId}/confirm` */
|
|
3339
|
+
confirm(subscriptionId: string, params?: Record<string, unknown>): Promise<SubscriptionResponse>;
|
|
3340
|
+
/** Update a subscription. `PUT /subscriptions/{subscriptionId}/update` */
|
|
3341
|
+
update(subscriptionId: string, params: SubscriptionUpdateRequest): Promise<SubscriptionResponse>;
|
|
3342
|
+
/** List subscriptions. `GET /subscriptions/list` */
|
|
3343
|
+
list(params?: SubscriptionListParams): Promise<SubscriptionListResponse>;
|
|
3344
|
+
/** Get subscription estimate. `GET /subscriptions/estimate` */
|
|
3345
|
+
getEstimate(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3346
|
+
/** Get subscription items. `GET /subscriptions/items` */
|
|
3347
|
+
getItems(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3348
|
+
/** Pause a subscription. `POST /subscriptions/{subscriptionId}/pause` */
|
|
3349
|
+
pause(subscriptionId: string): Promise<SubscriptionResponse>;
|
|
3350
|
+
/** Resume a subscription. `POST /subscriptions/{subscriptionId}/resume` */
|
|
3351
|
+
resume(subscriptionId: string): Promise<SubscriptionResponse>;
|
|
3352
|
+
/** Cancel a subscription. `POST /subscriptions/{subscriptionId}/cancel` */
|
|
3353
|
+
cancel(subscriptionId: string): Promise<SubscriptionResponse>;
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3356
|
+
/**
|
|
3357
|
+
* Configuration options for the Delopay client.
|
|
3358
|
+
*/
|
|
3359
|
+
interface DelopayOptions {
|
|
3360
|
+
/** Use the sandbox environment (`https://sandbox.delopay.net`). Defaults to `false` (production). */
|
|
3361
|
+
sandbox?: boolean;
|
|
3362
|
+
/** Override the base URL entirely. Takes precedence over `sandbox`. */
|
|
3363
|
+
baseUrl?: string;
|
|
3364
|
+
/** Request timeout in milliseconds. Defaults to `30000` (30 seconds). */
|
|
3365
|
+
timeout?: number;
|
|
3366
|
+
/**
|
|
3367
|
+
* Maximum number of automatic retries for transient failures (5xx, timeout, network errors).
|
|
3368
|
+
* Retries use exponential backoff. Set to `0` to disable. Defaults to `2`.
|
|
3369
|
+
* Only idempotent-safe requests (GET, DELETE, and requests with an `Idempotency-Key` header) are retried.
|
|
3370
|
+
*/
|
|
3371
|
+
maxRetries?: number;
|
|
3372
|
+
/** Enable debug logging of requests and responses to `console.log`. Defaults to `false`. */
|
|
3373
|
+
debug?: boolean;
|
|
3374
|
+
}
|
|
3375
|
+
/**
|
|
3376
|
+
* Low-level options forwarded to a single HTTP request.
|
|
3377
|
+
*/
|
|
3378
|
+
interface RequestOptions {
|
|
3379
|
+
/** Request body, serialised as JSON. */
|
|
3380
|
+
body?: unknown;
|
|
3381
|
+
/** Query-string parameters. `undefined` values are omitted. */
|
|
3382
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
3383
|
+
/** Additional HTTP headers merged with the default `api-key` header. */
|
|
3384
|
+
headers?: Record<string, string>;
|
|
3385
|
+
}
|
|
3386
|
+
type RequestFn = <T>(method: string, path: string, options?: RequestOptions) => Promise<T>;
|
|
3387
|
+
/**
|
|
3388
|
+
* Delopay API client.
|
|
3389
|
+
*
|
|
3390
|
+
* Instantiate once with your API key and reuse across your application.
|
|
3391
|
+
* All resource sub-clients (payments, refunds, customers, …) are exposed
|
|
3392
|
+
* as properties on the instance.
|
|
3393
|
+
*
|
|
3394
|
+
* @example
|
|
3395
|
+
* ```typescript
|
|
3396
|
+
* const delopay = new Delopay('sk_live_...', { sandbox: false });
|
|
3397
|
+
* const payment = await delopay.payments.create({ amount: 5000, currency: 'EUR' });
|
|
3398
|
+
* ```
|
|
3399
|
+
*/
|
|
3400
|
+
declare class Delopay {
|
|
3401
|
+
/** Utility for verifying incoming webhook signatures (static, no instance needed). */
|
|
3402
|
+
static webhooks: {
|
|
3403
|
+
verify(rawBody: string, signatureHeader: string, secret: string, options?: VerifyOptions): WebhookEvent;
|
|
3404
|
+
};
|
|
3405
|
+
/** The resolved base URL used for all API requests. */
|
|
3406
|
+
readonly baseUrl: string;
|
|
3407
|
+
private readonly apiKey;
|
|
3408
|
+
private readonly timeout;
|
|
3409
|
+
private readonly maxRetries;
|
|
3410
|
+
private readonly debug;
|
|
3411
|
+
private jwtToken?;
|
|
3412
|
+
readonly payments: Payments;
|
|
3413
|
+
readonly refunds: Refunds;
|
|
3414
|
+
readonly customers: Customers;
|
|
3415
|
+
readonly paymentMethods: PaymentMethods;
|
|
3416
|
+
readonly paymentLinks: PaymentLinks;
|
|
3417
|
+
readonly mandates: Mandates;
|
|
3418
|
+
readonly disputes: Disputes;
|
|
3419
|
+
readonly payouts: Payouts;
|
|
3420
|
+
readonly ephemeralKeys: EphemeralKeys;
|
|
3421
|
+
readonly events: Events;
|
|
3422
|
+
readonly poll: Poll;
|
|
3423
|
+
readonly connectors: Connectors;
|
|
3424
|
+
readonly routing: Routing;
|
|
3425
|
+
readonly profiles: Profiles;
|
|
3426
|
+
readonly shops: Shops;
|
|
3427
|
+
readonly profileAcquirers: ProfileAcquirers;
|
|
3428
|
+
readonly authentication: Authentication;
|
|
3429
|
+
readonly verification: Verification;
|
|
3430
|
+
readonly users: Users;
|
|
3431
|
+
readonly admin: Admin;
|
|
3432
|
+
readonly adminPortal: AdminPortal;
|
|
3433
|
+
readonly apiKeys: ApiKeys;
|
|
3434
|
+
readonly auditLogs: AuditLogs;
|
|
3435
|
+
readonly billing: Billing;
|
|
3436
|
+
readonly blocklist: Blocklist;
|
|
3437
|
+
readonly cardIssuers: CardIssuers;
|
|
3438
|
+
readonly fees: Fees;
|
|
3439
|
+
readonly gsm: Gsm;
|
|
3440
|
+
readonly merchantAccounts: MerchantAccounts;
|
|
3441
|
+
readonly projects: Projects;
|
|
3442
|
+
readonly relay: Relay;
|
|
3443
|
+
readonly stripeConnect: StripeConnect;
|
|
3444
|
+
readonly threeDsRules: ThreeDsRules;
|
|
3445
|
+
readonly subscriptions: Subscriptions;
|
|
3446
|
+
readonly files: Files;
|
|
3447
|
+
readonly export: Export;
|
|
3448
|
+
readonly forex: Forex;
|
|
3449
|
+
readonly regions: Regions;
|
|
3450
|
+
readonly analytics: Analytics;
|
|
3451
|
+
readonly analyticsDashboard: AnalyticsDashboard;
|
|
3452
|
+
readonly featureMatrix: FeatureMatrix;
|
|
3453
|
+
readonly cards: Cards;
|
|
3454
|
+
readonly configs: Configs;
|
|
3455
|
+
readonly cache: Cache;
|
|
3456
|
+
/**
|
|
3457
|
+
* Create a new Delopay client.
|
|
3458
|
+
*
|
|
3459
|
+
* @param apiKey - Your Delopay API key (e.g. `sk_live_...` or `sk_test_...`).
|
|
3460
|
+
* @param options - Optional configuration (sandbox mode, base URL override, timeout).
|
|
3461
|
+
* @throws {Error} When `apiKey` is empty or not provided.
|
|
3462
|
+
*/
|
|
3463
|
+
constructor(apiKey: string, options?: DelopayOptions);
|
|
3464
|
+
/**
|
|
3465
|
+
* Set a JWT token for subsequent requests.
|
|
3466
|
+
* When set, requests use `Authorization: Bearer <token>` instead of `api-key`.
|
|
3467
|
+
* Useful after `users.signIn()` returns a JWT for dashboard operations.
|
|
3468
|
+
*/
|
|
3469
|
+
setJwtToken(token: string): void;
|
|
3470
|
+
/**
|
|
3471
|
+
* Clear the JWT token, reverting to API key authentication.
|
|
3472
|
+
*/
|
|
3473
|
+
clearJwtToken(): void;
|
|
3474
|
+
/**
|
|
3475
|
+
* Make a raw HTTP request to the Delopay API.
|
|
3476
|
+
*
|
|
3477
|
+
* You rarely need to call this directly — prefer the typed resource methods.
|
|
3478
|
+
* Use it only for endpoints not yet covered by a resource class.
|
|
3479
|
+
*
|
|
3480
|
+
* @param method - HTTP method (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`).
|
|
3481
|
+
* @param path - API path starting with `/` (e.g. `/payments`).
|
|
3482
|
+
* @param options - Optional body, query parameters, and headers.
|
|
3483
|
+
* @returns Parsed JSON response body typed as `T`.
|
|
3484
|
+
* @throws {DelopayAuthenticationError} On 401 responses.
|
|
3485
|
+
* @throws {DelopayError} On all other non-2xx responses, timeouts, and network errors.
|
|
3486
|
+
*/
|
|
3487
|
+
request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
|
|
3488
|
+
/**
|
|
3489
|
+
* Auto-paginate a list endpoint. Yields items one by one, fetching
|
|
3490
|
+
* the next page automatically when the current one is exhausted.
|
|
3491
|
+
*
|
|
3492
|
+
* @param listFn - A function that takes `{ limit, offset }` and returns `{ data: T[] }` or `T[]`.
|
|
3493
|
+
* @param params - Additional parameters to pass to every page request.
|
|
3494
|
+
* @param pageSize - Number of items per page. Defaults to `50`.
|
|
3495
|
+
*
|
|
3496
|
+
* @example
|
|
3497
|
+
* ```typescript
|
|
3498
|
+
* for await (const payment of delopay.paginate(
|
|
3499
|
+
* (p) => delopay.payments.list(p),
|
|
3500
|
+
* )) {
|
|
3501
|
+
* console.log(payment.payment_id);
|
|
3502
|
+
* }
|
|
3503
|
+
* ```
|
|
3504
|
+
*/
|
|
3505
|
+
paginate<T, P extends Record<string, unknown>>(listFn: (params: P & {
|
|
3506
|
+
limit: number;
|
|
3507
|
+
offset: number;
|
|
3508
|
+
}) => Promise<{
|
|
3509
|
+
data: T[];
|
|
3510
|
+
} | T[]>, params?: P, pageSize?: number): AsyncGenerator<T>;
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
/**
|
|
3514
|
+
* Error thrown when the Delopay API returns a non-2xx response, or when a
|
|
3515
|
+
* timeout or network error occurs.
|
|
3516
|
+
*
|
|
3517
|
+
* @example
|
|
3518
|
+
* ```typescript
|
|
3519
|
+
* try {
|
|
3520
|
+
* await delopay.payments.create({ amount: 5000, currency: 'EUR' });
|
|
3521
|
+
* } catch (e) {
|
|
3522
|
+
* if (e instanceof DelopayError) {
|
|
3523
|
+
* console.error(e.status, e.code, e.message);
|
|
3524
|
+
* }
|
|
3525
|
+
* }
|
|
3526
|
+
* ```
|
|
3527
|
+
*/
|
|
3528
|
+
declare class DelopayError extends Error {
|
|
3529
|
+
/** HTTP status code returned by the API, or `0` for timeout/network errors. */
|
|
3530
|
+
readonly status: number;
|
|
3531
|
+
/** Machine-readable error code returned by the API (e.g. `'HE_00'`). */
|
|
3532
|
+
readonly code: string;
|
|
3533
|
+
/** Error category (e.g. `'invalid_request'`, `'timeout_error'`). */
|
|
3534
|
+
readonly type: string;
|
|
3535
|
+
constructor(message: string, options: {
|
|
3536
|
+
status: number;
|
|
3537
|
+
code: string;
|
|
3538
|
+
type: string;
|
|
3539
|
+
});
|
|
3540
|
+
}
|
|
3541
|
+
/**
|
|
3542
|
+
* Thrown when the API key is missing, invalid, or revoked (HTTP 401).
|
|
3543
|
+
*
|
|
3544
|
+
* @example
|
|
3545
|
+
* ```typescript
|
|
3546
|
+
* if (e instanceof DelopayAuthenticationError) {
|
|
3547
|
+
* // Prompt user to re-enter their API key.
|
|
3548
|
+
* }
|
|
3549
|
+
* ```
|
|
3550
|
+
*/
|
|
3551
|
+
declare class DelopayAuthenticationError extends DelopayError {
|
|
3552
|
+
constructor(message?: string);
|
|
3553
|
+
}
|
|
3554
|
+
|
|
3555
|
+
/**
|
|
3556
|
+
* A parsed and verified Delopay webhook event.
|
|
3557
|
+
*
|
|
3558
|
+
* The `type` field identifies the event (e.g. `'payment.succeeded'`).
|
|
3559
|
+
* Specific event payload shapes are nested under `data`.
|
|
3560
|
+
*/
|
|
3561
|
+
interface WebhookEvent {
|
|
3562
|
+
/** Event type identifier, e.g. `'payment.succeeded'` or `'refund.created'`. */
|
|
3563
|
+
type: string;
|
|
3564
|
+
/** Event payload. Shape depends on `type`. */
|
|
3565
|
+
data: Record<string, unknown>;
|
|
3566
|
+
[key: string]: unknown;
|
|
3567
|
+
}
|
|
3568
|
+
/**
|
|
3569
|
+
* Options for webhook signature verification.
|
|
3570
|
+
*/
|
|
3571
|
+
interface VerifyOptions {
|
|
3572
|
+
/**
|
|
3573
|
+
* Maximum age of the webhook timestamp in seconds before the event is rejected.
|
|
3574
|
+
* Defaults to `300` (5 minutes). Prevents replay attacks.
|
|
3575
|
+
*/
|
|
3576
|
+
tolerance?: number;
|
|
3577
|
+
}
|
|
3578
|
+
declare const Webhooks: {
|
|
3579
|
+
/**
|
|
3580
|
+
* Verify the signature of an incoming Delopay webhook and return the parsed event.
|
|
3581
|
+
*
|
|
3582
|
+
* This method is available as a static property on the `Delopay` class
|
|
3583
|
+
* (`Delopay.webhooks.verify`) and does not require a client instance.
|
|
3584
|
+
*
|
|
3585
|
+
* @param rawBody - The raw request body string (do **not** parse it before passing).
|
|
3586
|
+
* @param signatureHeader - The value of the `delopay-signature` HTTP header.
|
|
3587
|
+
* @param secret - Your webhook signing secret from the Delopay dashboard.
|
|
3588
|
+
* @param options - Optional verification settings (replay tolerance).
|
|
3589
|
+
* @returns The parsed webhook event.
|
|
3590
|
+
* @throws {Error} When the signature is invalid, the timestamp is missing, or the event is too old.
|
|
3591
|
+
*
|
|
3592
|
+
* @example
|
|
3593
|
+
* ```typescript
|
|
3594
|
+
* // Express example
|
|
3595
|
+
* app.post('/webhook', express.raw({ type: 'application/json' }), (req, res) => {
|
|
3596
|
+
* const event = Delopay.webhooks.verify(
|
|
3597
|
+
* req.body.toString(),
|
|
3598
|
+
* req.headers['delopay-signature'] as string,
|
|
3599
|
+
* process.env.DELOPAY_WEBHOOK_SECRET!,
|
|
3600
|
+
* );
|
|
3601
|
+
* console.log(event.type, event.data);
|
|
3602
|
+
* res.sendStatus(200);
|
|
3603
|
+
* });
|
|
3604
|
+
* ```
|
|
3605
|
+
*/
|
|
3606
|
+
verify(rawBody: string, signatureHeader: string, secret: string, options?: VerifyOptions): WebhookEvent;
|
|
3607
|
+
};
|
|
3608
|
+
|
|
3609
|
+
export { type Address, type AddressDetails, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, type AdminSignInRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, Cache, type CaptureMethod, type CardDetail, type CardDetailFromLocker, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, Cards, type ChangePasswordRequest, Configs, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerSummary, type CustomerUpdateRequest, type CustomerUser, type DashboardMetadataResponse, Delopay, DelopayAuthenticationError, DelopayError, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeType, Files, Forex, type ForgotPasswordRequest, type GatewayConnectRequest, type GatewayResponse, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type LedgerEntry, type LedgerListParams, type LedgerResponse, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentStat, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformAnalyticsResponse, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestFn, type RequestOptions, type ResetPasswordRequest, type RoutingConfigCreateRequest, type RoutingConfigResponse, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantRequest, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionCreateRequest, type SubscriptionListParams, type SubscriptionListResponse, type SubscriptionResponse, type SubscriptionUpdateRequest, Subscriptions, type SwitchMerchantRequest, type SwitchProfileRequest, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type UpdateUserDetailsRequest, type UserResponse, type VerifyOptions, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks };
|