@naturalpay/sdk 0.9.0 → 0.11.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/CHANGELOG.md +20 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents.d.mts +33 -26
- package/resources/agents.d.mts.map +1 -1
- package/resources/agents.d.ts +33 -26
- package/resources/agents.d.ts.map +1 -1
- package/resources/agents.js +1 -1
- package/resources/agents.mjs +1 -1
- package/resources/api-keys.d.mts +16 -16
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +16 -16
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/approvals.d.mts +16 -16
- package/resources/approvals.d.mts.map +1 -1
- package/resources/approvals.d.ts +16 -16
- package/resources/approvals.d.ts.map +1 -1
- package/resources/counterparties.d.mts +1 -1
- package/resources/counterparties.d.mts.map +1 -1
- package/resources/counterparties.d.ts +1 -1
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/customers.d.mts +6 -6
- package/resources/customers.d.mts.map +1 -1
- package/resources/customers.d.ts +6 -6
- package/resources/customers.d.ts.map +1 -1
- package/resources/external-accounts.d.mts +4 -4
- package/resources/external-accounts.d.mts.map +1 -1
- package/resources/external-accounts.d.ts +4 -4
- package/resources/external-accounts.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invitations.d.mts +3 -3
- package/resources/invitations.d.mts.map +1 -1
- package/resources/invitations.d.ts +3 -3
- package/resources/invitations.d.ts.map +1 -1
- package/resources/parties.d.mts +4 -4
- package/resources/parties.d.mts.map +1 -1
- package/resources/parties.d.ts +4 -4
- package/resources/parties.d.ts.map +1 -1
- package/resources/payment-requests.d.mts +374 -82
- package/resources/payment-requests.d.mts.map +1 -1
- package/resources/payment-requests.d.ts +374 -82
- package/resources/payment-requests.d.ts.map +1 -1
- package/resources/payment-requests.js +35 -48
- package/resources/payment-requests.js.map +1 -1
- package/resources/payment-requests.mjs +35 -48
- package/resources/payment-requests.mjs.map +1 -1
- package/resources/payments.d.mts +433 -44
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +433 -44
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +40 -22
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +40 -22
- package/resources/payments.mjs.map +1 -1
- package/resources/transactions.d.mts +26 -28
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +26 -28
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +6 -18
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +6 -18
- package/resources/transactions.mjs.map +1 -1
- package/resources/transfers.d.mts +64 -57
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +64 -57
- package/resources/transfers.d.ts.map +1 -1
- package/resources/transfers.js +20 -29
- package/resources/transfers.js.map +1 -1
- package/resources/transfers.mjs +20 -29
- package/resources/transfers.mjs.map +1 -1
- package/resources/wallet.d.mts +4 -4
- package/resources/wallet.d.mts.map +1 -1
- package/resources/wallet.d.ts +4 -4
- package/resources/wallet.d.ts.map +1 -1
- package/resources/webhooks.d.mts +12 -12
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +12 -12
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +4 -0
- package/src/resources/agents.ts +39 -26
- package/src/resources/api-keys.ts +16 -16
- package/src/resources/approvals.ts +16 -16
- package/src/resources/counterparties.ts +1 -1
- package/src/resources/customers.ts +6 -6
- package/src/resources/external-accounts.ts +4 -4
- package/src/resources/index.ts +2 -0
- package/src/resources/invitations.ts +3 -3
- package/src/resources/parties.ts +4 -4
- package/src/resources/payment-requests.ts +484 -126
- package/src/resources/payments.ts +531 -67
- package/src/resources/transactions.ts +32 -49
- package/src/resources/transfers.ts +72 -88
- package/src/resources/wallet.ts +4 -4
- package/src/resources/webhooks.ts +12 -12
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/payments.d.ts
CHANGED
|
@@ -13,10 +13,12 @@ export declare class Payments extends APIResource {
|
|
|
13
13
|
* const payment = await client.payments.create({
|
|
14
14
|
* amount: 1,
|
|
15
15
|
* counterparty: {
|
|
16
|
-
* type: '
|
|
16
|
+
* type: 'email',
|
|
17
17
|
* value: 'dev@stainless.com',
|
|
18
18
|
* },
|
|
19
19
|
* 'Idempotency-Key': 'Idempotency-Key',
|
|
20
|
+
* 'X-Agent-ID': 'X-Agent-ID',
|
|
21
|
+
* 'X-Instance-ID': 'X-Instance-ID',
|
|
20
22
|
* });
|
|
21
23
|
* ```
|
|
22
24
|
*/
|
|
@@ -26,10 +28,29 @@ export declare class Payments extends APIResource {
|
|
|
26
28
|
*
|
|
27
29
|
* @example
|
|
28
30
|
* ```ts
|
|
29
|
-
* const payments = await client.payments.list(
|
|
31
|
+
* const payments = await client.payments.list({
|
|
32
|
+
* 'X-Agent-ID': 'X-Agent-ID',
|
|
33
|
+
* 'X-Instance-ID': 'X-Instance-ID',
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
list(params: PaymentListParams, options?: RequestOptions): APIPromise<PaymentListResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Cancel a pending-claim payment before the recipient starts claiming it.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const response = await client.payments.cancel(
|
|
44
|
+
* 'pay_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
45
|
+
* {
|
|
46
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
47
|
+
* 'X-Agent-ID': 'X-Agent-ID',
|
|
48
|
+
* 'X-Instance-ID': 'X-Instance-ID',
|
|
49
|
+
* },
|
|
50
|
+
* );
|
|
30
51
|
* ```
|
|
31
52
|
*/
|
|
32
|
-
|
|
53
|
+
cancel(paymentID: string, params: PaymentCancelParams, options?: RequestOptions): APIPromise<PaymentCancelResponse>;
|
|
33
54
|
/**
|
|
34
55
|
* Get a payment initiated by the authenticated party.
|
|
35
56
|
*
|
|
@@ -37,10 +58,14 @@ export declare class Payments extends APIResource {
|
|
|
37
58
|
* ```ts
|
|
38
59
|
* const payment = await client.payments.get(
|
|
39
60
|
* 'pay_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
61
|
+
* {
|
|
62
|
+
* 'X-Agent-ID': 'X-Agent-ID',
|
|
63
|
+
* 'X-Instance-ID': 'X-Instance-ID',
|
|
64
|
+
* },
|
|
40
65
|
* );
|
|
41
66
|
* ```
|
|
42
67
|
*/
|
|
43
|
-
get(paymentID: string, params
|
|
68
|
+
get(paymentID: string, params: PaymentGetParams, options?: RequestOptions): APIPromise<PaymentGetResponse>;
|
|
44
69
|
}
|
|
45
70
|
export interface PaymentCreateResponse {
|
|
46
71
|
data: PaymentCreateResponse.Data;
|
|
@@ -56,7 +81,7 @@ export declare namespace PaymentCreateResponse {
|
|
|
56
81
|
* Resource relationships
|
|
57
82
|
*/
|
|
58
83
|
relationships: Data.Relationships;
|
|
59
|
-
type:
|
|
84
|
+
type: 'payment';
|
|
60
85
|
}
|
|
61
86
|
namespace Data {
|
|
62
87
|
/**
|
|
@@ -82,7 +107,7 @@ export declare namespace PaymentCreateResponse {
|
|
|
82
107
|
/**
|
|
83
108
|
* Payment status
|
|
84
109
|
*/
|
|
85
|
-
status: 'CREATED' | 'PROCESSING' | 'PENDING_CLAIM' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'APPROVAL_DENIED' | 'CANCELLED';
|
|
110
|
+
status: 'CREATED' | 'PROCESSING' | 'PENDING_CLAIM' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED' | 'APPROVAL_DENIED' | 'CANCELLED';
|
|
86
111
|
/**
|
|
87
112
|
* When this payment was last updated
|
|
88
113
|
*/
|
|
@@ -92,10 +117,19 @@ export declare namespace PaymentCreateResponse {
|
|
|
92
117
|
* Resource relationships
|
|
93
118
|
*/
|
|
94
119
|
interface Relationships {
|
|
120
|
+
/**
|
|
121
|
+
* Payment request that produced this payment, when applicable.
|
|
122
|
+
*/
|
|
123
|
+
paymentRequest: Relationships.PaymentRequest;
|
|
95
124
|
/**
|
|
96
125
|
* Recipient party for this payment, when known.
|
|
97
126
|
*/
|
|
98
127
|
recipient: Relationships.Recipient;
|
|
128
|
+
/**
|
|
129
|
+
* Recipient agent when the caller addressed an agent ID. Null otherwise, including
|
|
130
|
+
* when the recipient was addressed as an email, phone, or party ID.
|
|
131
|
+
*/
|
|
132
|
+
recipientAgent: Relationships.RecipientAgent;
|
|
99
133
|
/**
|
|
100
134
|
* Party that initiated the payment
|
|
101
135
|
*/
|
|
@@ -106,6 +140,27 @@ export declare namespace PaymentCreateResponse {
|
|
|
106
140
|
transaction: Relationships.Transaction;
|
|
107
141
|
}
|
|
108
142
|
namespace Relationships {
|
|
143
|
+
/**
|
|
144
|
+
* Payment request that produced this payment, when applicable.
|
|
145
|
+
*/
|
|
146
|
+
interface PaymentRequest {
|
|
147
|
+
/**
|
|
148
|
+
* Related resource identifier
|
|
149
|
+
*/
|
|
150
|
+
data: PaymentRequest.Data | null;
|
|
151
|
+
}
|
|
152
|
+
namespace PaymentRequest {
|
|
153
|
+
/**
|
|
154
|
+
* Related resource identifier
|
|
155
|
+
*/
|
|
156
|
+
interface Data {
|
|
157
|
+
id: string;
|
|
158
|
+
/**
|
|
159
|
+
* Resource type
|
|
160
|
+
*/
|
|
161
|
+
type: 'paymentRequest';
|
|
162
|
+
}
|
|
163
|
+
}
|
|
109
164
|
/**
|
|
110
165
|
* Recipient party for this payment, when known.
|
|
111
166
|
*/
|
|
@@ -124,7 +179,29 @@ export declare namespace PaymentCreateResponse {
|
|
|
124
179
|
/**
|
|
125
180
|
* Resource type
|
|
126
181
|
*/
|
|
127
|
-
type:
|
|
182
|
+
type: 'party';
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Recipient agent when the caller addressed an agent ID. Null otherwise, including
|
|
187
|
+
* when the recipient was addressed as an email, phone, or party ID.
|
|
188
|
+
*/
|
|
189
|
+
interface RecipientAgent {
|
|
190
|
+
/**
|
|
191
|
+
* Related resource identifier
|
|
192
|
+
*/
|
|
193
|
+
data: RecipientAgent.Data | null;
|
|
194
|
+
}
|
|
195
|
+
namespace RecipientAgent {
|
|
196
|
+
/**
|
|
197
|
+
* Related resource identifier
|
|
198
|
+
*/
|
|
199
|
+
interface Data {
|
|
200
|
+
id: string;
|
|
201
|
+
/**
|
|
202
|
+
* Resource type
|
|
203
|
+
*/
|
|
204
|
+
type: 'agent';
|
|
128
205
|
}
|
|
129
206
|
}
|
|
130
207
|
/**
|
|
@@ -145,7 +222,7 @@ export declare namespace PaymentCreateResponse {
|
|
|
145
222
|
/**
|
|
146
223
|
* Resource type
|
|
147
224
|
*/
|
|
148
|
-
type:
|
|
225
|
+
type: 'party';
|
|
149
226
|
}
|
|
150
227
|
}
|
|
151
228
|
/**
|
|
@@ -166,7 +243,7 @@ export declare namespace PaymentCreateResponse {
|
|
|
166
243
|
/**
|
|
167
244
|
* Resource type
|
|
168
245
|
*/
|
|
169
|
-
type:
|
|
246
|
+
type: 'transaction';
|
|
170
247
|
}
|
|
171
248
|
}
|
|
172
249
|
}
|
|
@@ -187,7 +264,7 @@ export declare namespace PaymentListResponse {
|
|
|
187
264
|
* Resource relationships
|
|
188
265
|
*/
|
|
189
266
|
relationships: Data.Relationships;
|
|
190
|
-
type:
|
|
267
|
+
type: 'payment';
|
|
191
268
|
}
|
|
192
269
|
namespace Data {
|
|
193
270
|
/**
|
|
@@ -213,7 +290,7 @@ export declare namespace PaymentListResponse {
|
|
|
213
290
|
/**
|
|
214
291
|
* Payment status
|
|
215
292
|
*/
|
|
216
|
-
status: 'CREATED' | 'PROCESSING' | 'PENDING_CLAIM' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'APPROVAL_DENIED' | 'CANCELLED';
|
|
293
|
+
status: 'CREATED' | 'PROCESSING' | 'PENDING_CLAIM' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED' | 'APPROVAL_DENIED' | 'CANCELLED';
|
|
217
294
|
/**
|
|
218
295
|
* When this payment was last updated
|
|
219
296
|
*/
|
|
@@ -223,10 +300,19 @@ export declare namespace PaymentListResponse {
|
|
|
223
300
|
* Resource relationships
|
|
224
301
|
*/
|
|
225
302
|
interface Relationships {
|
|
303
|
+
/**
|
|
304
|
+
* Payment request that produced this payment, when applicable.
|
|
305
|
+
*/
|
|
306
|
+
paymentRequest: Relationships.PaymentRequest;
|
|
226
307
|
/**
|
|
227
308
|
* Recipient party for this payment, when known.
|
|
228
309
|
*/
|
|
229
310
|
recipient: Relationships.Recipient;
|
|
311
|
+
/**
|
|
312
|
+
* Recipient agent when the caller addressed an agent ID. Null otherwise, including
|
|
313
|
+
* when the recipient was addressed as an email, phone, or party ID.
|
|
314
|
+
*/
|
|
315
|
+
recipientAgent: Relationships.RecipientAgent;
|
|
230
316
|
/**
|
|
231
317
|
* Party that initiated the payment
|
|
232
318
|
*/
|
|
@@ -237,6 +323,27 @@ export declare namespace PaymentListResponse {
|
|
|
237
323
|
transaction: Relationships.Transaction;
|
|
238
324
|
}
|
|
239
325
|
namespace Relationships {
|
|
326
|
+
/**
|
|
327
|
+
* Payment request that produced this payment, when applicable.
|
|
328
|
+
*/
|
|
329
|
+
interface PaymentRequest {
|
|
330
|
+
/**
|
|
331
|
+
* Related resource identifier
|
|
332
|
+
*/
|
|
333
|
+
data: PaymentRequest.Data | null;
|
|
334
|
+
}
|
|
335
|
+
namespace PaymentRequest {
|
|
336
|
+
/**
|
|
337
|
+
* Related resource identifier
|
|
338
|
+
*/
|
|
339
|
+
interface Data {
|
|
340
|
+
id: string;
|
|
341
|
+
/**
|
|
342
|
+
* Resource type
|
|
343
|
+
*/
|
|
344
|
+
type: 'paymentRequest';
|
|
345
|
+
}
|
|
346
|
+
}
|
|
240
347
|
/**
|
|
241
348
|
* Recipient party for this payment, when known.
|
|
242
349
|
*/
|
|
@@ -255,7 +362,29 @@ export declare namespace PaymentListResponse {
|
|
|
255
362
|
/**
|
|
256
363
|
* Resource type
|
|
257
364
|
*/
|
|
258
|
-
type:
|
|
365
|
+
type: 'party';
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Recipient agent when the caller addressed an agent ID. Null otherwise, including
|
|
370
|
+
* when the recipient was addressed as an email, phone, or party ID.
|
|
371
|
+
*/
|
|
372
|
+
interface RecipientAgent {
|
|
373
|
+
/**
|
|
374
|
+
* Related resource identifier
|
|
375
|
+
*/
|
|
376
|
+
data: RecipientAgent.Data | null;
|
|
377
|
+
}
|
|
378
|
+
namespace RecipientAgent {
|
|
379
|
+
/**
|
|
380
|
+
* Related resource identifier
|
|
381
|
+
*/
|
|
382
|
+
interface Data {
|
|
383
|
+
id: string;
|
|
384
|
+
/**
|
|
385
|
+
* Resource type
|
|
386
|
+
*/
|
|
387
|
+
type: 'agent';
|
|
259
388
|
}
|
|
260
389
|
}
|
|
261
390
|
/**
|
|
@@ -276,7 +405,7 @@ export declare namespace PaymentListResponse {
|
|
|
276
405
|
/**
|
|
277
406
|
* Resource type
|
|
278
407
|
*/
|
|
279
|
-
type:
|
|
408
|
+
type: 'party';
|
|
280
409
|
}
|
|
281
410
|
}
|
|
282
411
|
/**
|
|
@@ -297,7 +426,7 @@ export declare namespace PaymentListResponse {
|
|
|
297
426
|
/**
|
|
298
427
|
* Resource type
|
|
299
428
|
*/
|
|
300
|
-
type:
|
|
429
|
+
type: 'transaction';
|
|
301
430
|
}
|
|
302
431
|
}
|
|
303
432
|
}
|
|
@@ -312,6 +441,188 @@ export declare namespace PaymentListResponse {
|
|
|
312
441
|
}
|
|
313
442
|
}
|
|
314
443
|
}
|
|
444
|
+
export interface PaymentCancelResponse {
|
|
445
|
+
data: PaymentCancelResponse.Data;
|
|
446
|
+
}
|
|
447
|
+
export declare namespace PaymentCancelResponse {
|
|
448
|
+
interface Data {
|
|
449
|
+
id: string;
|
|
450
|
+
/**
|
|
451
|
+
* Resource attributes
|
|
452
|
+
*/
|
|
453
|
+
attributes: Data.Attributes;
|
|
454
|
+
/**
|
|
455
|
+
* Resource relationships
|
|
456
|
+
*/
|
|
457
|
+
relationships: Data.Relationships;
|
|
458
|
+
type: 'payment';
|
|
459
|
+
}
|
|
460
|
+
namespace Data {
|
|
461
|
+
/**
|
|
462
|
+
* Resource attributes
|
|
463
|
+
*/
|
|
464
|
+
interface Attributes {
|
|
465
|
+
/**
|
|
466
|
+
* Amount in cents
|
|
467
|
+
*/
|
|
468
|
+
amount: number;
|
|
469
|
+
/**
|
|
470
|
+
* When this payment was created
|
|
471
|
+
*/
|
|
472
|
+
createdAt: string;
|
|
473
|
+
/**
|
|
474
|
+
* Currency code
|
|
475
|
+
*/
|
|
476
|
+
currency: string;
|
|
477
|
+
/**
|
|
478
|
+
* Payment description
|
|
479
|
+
*/
|
|
480
|
+
description: string | null;
|
|
481
|
+
/**
|
|
482
|
+
* Payment status
|
|
483
|
+
*/
|
|
484
|
+
status: 'CREATED' | 'PROCESSING' | 'PENDING_CLAIM' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED' | 'APPROVAL_DENIED' | 'CANCELLED';
|
|
485
|
+
/**
|
|
486
|
+
* When this payment was last updated
|
|
487
|
+
*/
|
|
488
|
+
updatedAt: string | null;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Resource relationships
|
|
492
|
+
*/
|
|
493
|
+
interface Relationships {
|
|
494
|
+
/**
|
|
495
|
+
* Payment request that produced this payment, when applicable.
|
|
496
|
+
*/
|
|
497
|
+
paymentRequest: Relationships.PaymentRequest;
|
|
498
|
+
/**
|
|
499
|
+
* Recipient party for this payment, when known.
|
|
500
|
+
*/
|
|
501
|
+
recipient: Relationships.Recipient;
|
|
502
|
+
/**
|
|
503
|
+
* Recipient agent when the caller addressed an agent ID. Null otherwise, including
|
|
504
|
+
* when the recipient was addressed as an email, phone, or party ID.
|
|
505
|
+
*/
|
|
506
|
+
recipientAgent: Relationships.RecipientAgent;
|
|
507
|
+
/**
|
|
508
|
+
* Party that initiated the payment
|
|
509
|
+
*/
|
|
510
|
+
sender: Relationships.Sender;
|
|
511
|
+
/**
|
|
512
|
+
* Sender-side transaction row for this payment, when available.
|
|
513
|
+
*/
|
|
514
|
+
transaction: Relationships.Transaction;
|
|
515
|
+
}
|
|
516
|
+
namespace Relationships {
|
|
517
|
+
/**
|
|
518
|
+
* Payment request that produced this payment, when applicable.
|
|
519
|
+
*/
|
|
520
|
+
interface PaymentRequest {
|
|
521
|
+
/**
|
|
522
|
+
* Related resource identifier
|
|
523
|
+
*/
|
|
524
|
+
data: PaymentRequest.Data | null;
|
|
525
|
+
}
|
|
526
|
+
namespace PaymentRequest {
|
|
527
|
+
/**
|
|
528
|
+
* Related resource identifier
|
|
529
|
+
*/
|
|
530
|
+
interface Data {
|
|
531
|
+
id: string;
|
|
532
|
+
/**
|
|
533
|
+
* Resource type
|
|
534
|
+
*/
|
|
535
|
+
type: 'paymentRequest';
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Recipient party for this payment, when known.
|
|
540
|
+
*/
|
|
541
|
+
interface Recipient {
|
|
542
|
+
/**
|
|
543
|
+
* Related resource identifier
|
|
544
|
+
*/
|
|
545
|
+
data: Recipient.Data | null;
|
|
546
|
+
}
|
|
547
|
+
namespace Recipient {
|
|
548
|
+
/**
|
|
549
|
+
* Related resource identifier
|
|
550
|
+
*/
|
|
551
|
+
interface Data {
|
|
552
|
+
id: string;
|
|
553
|
+
/**
|
|
554
|
+
* Resource type
|
|
555
|
+
*/
|
|
556
|
+
type: 'party';
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Recipient agent when the caller addressed an agent ID. Null otherwise, including
|
|
561
|
+
* when the recipient was addressed as an email, phone, or party ID.
|
|
562
|
+
*/
|
|
563
|
+
interface RecipientAgent {
|
|
564
|
+
/**
|
|
565
|
+
* Related resource identifier
|
|
566
|
+
*/
|
|
567
|
+
data: RecipientAgent.Data | null;
|
|
568
|
+
}
|
|
569
|
+
namespace RecipientAgent {
|
|
570
|
+
/**
|
|
571
|
+
* Related resource identifier
|
|
572
|
+
*/
|
|
573
|
+
interface Data {
|
|
574
|
+
id: string;
|
|
575
|
+
/**
|
|
576
|
+
* Resource type
|
|
577
|
+
*/
|
|
578
|
+
type: 'agent';
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Party that initiated the payment
|
|
583
|
+
*/
|
|
584
|
+
interface Sender {
|
|
585
|
+
/**
|
|
586
|
+
* Related resource identifier
|
|
587
|
+
*/
|
|
588
|
+
data: Sender.Data;
|
|
589
|
+
}
|
|
590
|
+
namespace Sender {
|
|
591
|
+
/**
|
|
592
|
+
* Related resource identifier
|
|
593
|
+
*/
|
|
594
|
+
interface Data {
|
|
595
|
+
id: string;
|
|
596
|
+
/**
|
|
597
|
+
* Resource type
|
|
598
|
+
*/
|
|
599
|
+
type: 'party';
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Sender-side transaction row for this payment, when available.
|
|
604
|
+
*/
|
|
605
|
+
interface Transaction {
|
|
606
|
+
/**
|
|
607
|
+
* Related resource identifier
|
|
608
|
+
*/
|
|
609
|
+
data: Transaction.Data | null;
|
|
610
|
+
}
|
|
611
|
+
namespace Transaction {
|
|
612
|
+
/**
|
|
613
|
+
* Related resource identifier
|
|
614
|
+
*/
|
|
615
|
+
interface Data {
|
|
616
|
+
id: string;
|
|
617
|
+
/**
|
|
618
|
+
* Resource type
|
|
619
|
+
*/
|
|
620
|
+
type: 'transaction';
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
315
626
|
export interface PaymentGetResponse {
|
|
316
627
|
data: PaymentGetResponse.Data;
|
|
317
628
|
}
|
|
@@ -326,7 +637,7 @@ export declare namespace PaymentGetResponse {
|
|
|
326
637
|
* Resource relationships
|
|
327
638
|
*/
|
|
328
639
|
relationships: Data.Relationships;
|
|
329
|
-
type:
|
|
640
|
+
type: 'payment';
|
|
330
641
|
}
|
|
331
642
|
namespace Data {
|
|
332
643
|
/**
|
|
@@ -352,7 +663,7 @@ export declare namespace PaymentGetResponse {
|
|
|
352
663
|
/**
|
|
353
664
|
* Payment status
|
|
354
665
|
*/
|
|
355
|
-
status: 'CREATED' | 'PROCESSING' | 'PENDING_CLAIM' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'APPROVAL_DENIED' | 'CANCELLED';
|
|
666
|
+
status: 'CREATED' | 'PROCESSING' | 'PENDING_CLAIM' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED' | 'APPROVAL_DENIED' | 'CANCELLED';
|
|
356
667
|
/**
|
|
357
668
|
* When this payment was last updated
|
|
358
669
|
*/
|
|
@@ -362,10 +673,19 @@ export declare namespace PaymentGetResponse {
|
|
|
362
673
|
* Resource relationships
|
|
363
674
|
*/
|
|
364
675
|
interface Relationships {
|
|
676
|
+
/**
|
|
677
|
+
* Payment request that produced this payment, when applicable.
|
|
678
|
+
*/
|
|
679
|
+
paymentRequest: Relationships.PaymentRequest;
|
|
365
680
|
/**
|
|
366
681
|
* Recipient party for this payment, when known.
|
|
367
682
|
*/
|
|
368
683
|
recipient: Relationships.Recipient;
|
|
684
|
+
/**
|
|
685
|
+
* Recipient agent when the caller addressed an agent ID. Null otherwise, including
|
|
686
|
+
* when the recipient was addressed as an email, phone, or party ID.
|
|
687
|
+
*/
|
|
688
|
+
recipientAgent: Relationships.RecipientAgent;
|
|
369
689
|
/**
|
|
370
690
|
* Party that initiated the payment
|
|
371
691
|
*/
|
|
@@ -376,6 +696,27 @@ export declare namespace PaymentGetResponse {
|
|
|
376
696
|
transaction: Relationships.Transaction;
|
|
377
697
|
}
|
|
378
698
|
namespace Relationships {
|
|
699
|
+
/**
|
|
700
|
+
* Payment request that produced this payment, when applicable.
|
|
701
|
+
*/
|
|
702
|
+
interface PaymentRequest {
|
|
703
|
+
/**
|
|
704
|
+
* Related resource identifier
|
|
705
|
+
*/
|
|
706
|
+
data: PaymentRequest.Data | null;
|
|
707
|
+
}
|
|
708
|
+
namespace PaymentRequest {
|
|
709
|
+
/**
|
|
710
|
+
* Related resource identifier
|
|
711
|
+
*/
|
|
712
|
+
interface Data {
|
|
713
|
+
id: string;
|
|
714
|
+
/**
|
|
715
|
+
* Resource type
|
|
716
|
+
*/
|
|
717
|
+
type: 'paymentRequest';
|
|
718
|
+
}
|
|
719
|
+
}
|
|
379
720
|
/**
|
|
380
721
|
* Recipient party for this payment, when known.
|
|
381
722
|
*/
|
|
@@ -394,7 +735,29 @@ export declare namespace PaymentGetResponse {
|
|
|
394
735
|
/**
|
|
395
736
|
* Resource type
|
|
396
737
|
*/
|
|
397
|
-
type:
|
|
738
|
+
type: 'party';
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Recipient agent when the caller addressed an agent ID. Null otherwise, including
|
|
743
|
+
* when the recipient was addressed as an email, phone, or party ID.
|
|
744
|
+
*/
|
|
745
|
+
interface RecipientAgent {
|
|
746
|
+
/**
|
|
747
|
+
* Related resource identifier
|
|
748
|
+
*/
|
|
749
|
+
data: RecipientAgent.Data | null;
|
|
750
|
+
}
|
|
751
|
+
namespace RecipientAgent {
|
|
752
|
+
/**
|
|
753
|
+
* Related resource identifier
|
|
754
|
+
*/
|
|
755
|
+
interface Data {
|
|
756
|
+
id: string;
|
|
757
|
+
/**
|
|
758
|
+
* Resource type
|
|
759
|
+
*/
|
|
760
|
+
type: 'agent';
|
|
398
761
|
}
|
|
399
762
|
}
|
|
400
763
|
/**
|
|
@@ -415,7 +778,7 @@ export declare namespace PaymentGetResponse {
|
|
|
415
778
|
/**
|
|
416
779
|
* Resource type
|
|
417
780
|
*/
|
|
418
|
-
type:
|
|
781
|
+
type: 'party';
|
|
419
782
|
}
|
|
420
783
|
}
|
|
421
784
|
/**
|
|
@@ -436,7 +799,7 @@ export declare namespace PaymentGetResponse {
|
|
|
436
799
|
/**
|
|
437
800
|
* Resource type
|
|
438
801
|
*/
|
|
439
|
-
type:
|
|
802
|
+
type: 'transaction';
|
|
440
803
|
}
|
|
441
804
|
}
|
|
442
805
|
}
|
|
@@ -451,12 +814,20 @@ export interface PaymentCreateParams {
|
|
|
451
814
|
* Body param: Recipient identifier. Provide exactly one typed email, phone, party
|
|
452
815
|
* ID, or agent ID value.
|
|
453
816
|
*/
|
|
454
|
-
counterparty: PaymentCreateParams.UnionMember0 | PaymentCreateParams.UnionMember1;
|
|
817
|
+
counterparty: PaymentCreateParams.UnionMember0 | PaymentCreateParams.UnionMember1 | PaymentCreateParams.UnionMember2 | PaymentCreateParams.UnionMember3;
|
|
455
818
|
/**
|
|
456
819
|
* Header param: Unique key for idempotent request handling. If a request with the
|
|
457
820
|
* same key was already processed, the original response is returned.
|
|
458
821
|
*/
|
|
459
822
|
'Idempotency-Key': string;
|
|
823
|
+
/**
|
|
824
|
+
* Header param: Agent ID (agt_xxx) used for attribution and audit.
|
|
825
|
+
*/
|
|
826
|
+
'X-Agent-ID': string;
|
|
827
|
+
/**
|
|
828
|
+
* Header param: Stable run, session, or conversation ID for agent observability.
|
|
829
|
+
*/
|
|
830
|
+
'X-Instance-ID': string;
|
|
460
831
|
/**
|
|
461
832
|
* Body param: Currency code
|
|
462
833
|
*/
|
|
@@ -470,33 +841,46 @@ export interface PaymentCreateParams {
|
|
|
470
841
|
* Body param: Payment description. Maximum 500 characters.
|
|
471
842
|
*/
|
|
472
843
|
description?: string;
|
|
473
|
-
/**
|
|
474
|
-
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
475
|
-
*/
|
|
476
|
-
'X-Agent-ID'?: string;
|
|
477
|
-
/**
|
|
478
|
-
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
479
|
-
* for agent observability.
|
|
480
|
-
*/
|
|
481
|
-
'X-Instance-ID'?: string;
|
|
482
844
|
}
|
|
483
845
|
export declare namespace PaymentCreateParams {
|
|
484
846
|
interface UnionMember0 {
|
|
485
|
-
type:
|
|
847
|
+
type: 'email';
|
|
486
848
|
/**
|
|
487
849
|
* Email address
|
|
488
850
|
*/
|
|
489
851
|
value: string;
|
|
490
852
|
}
|
|
491
853
|
interface UnionMember1 {
|
|
492
|
-
type:
|
|
854
|
+
type: 'phone';
|
|
493
855
|
/**
|
|
494
856
|
* Phone number in E.164 format
|
|
495
857
|
*/
|
|
496
858
|
value: string;
|
|
497
859
|
}
|
|
860
|
+
interface UnionMember2 {
|
|
861
|
+
type: 'party_id';
|
|
862
|
+
/**
|
|
863
|
+
* Natural party ID (pty\_\*)
|
|
864
|
+
*/
|
|
865
|
+
value: string;
|
|
866
|
+
}
|
|
867
|
+
interface UnionMember3 {
|
|
868
|
+
type: 'agent_id';
|
|
869
|
+
/**
|
|
870
|
+
* Natural agent ID (agt\_\*)
|
|
871
|
+
*/
|
|
872
|
+
value: string;
|
|
873
|
+
}
|
|
498
874
|
}
|
|
499
875
|
export interface PaymentListParams {
|
|
876
|
+
/**
|
|
877
|
+
* Header param: Agent ID (agt_xxx) used for attribution and audit.
|
|
878
|
+
*/
|
|
879
|
+
'X-Agent-ID': string;
|
|
880
|
+
/**
|
|
881
|
+
* Header param: Stable run, session, or conversation ID for agent observability.
|
|
882
|
+
*/
|
|
883
|
+
'X-Instance-ID': string;
|
|
500
884
|
/**
|
|
501
885
|
* Query param: Pagination cursor from previous response
|
|
502
886
|
*/
|
|
@@ -509,32 +893,37 @@ export interface PaymentListParams {
|
|
|
509
893
|
* Query param: Party ID for delegated payment lookup
|
|
510
894
|
*/
|
|
511
895
|
partyId?: string;
|
|
896
|
+
}
|
|
897
|
+
export interface PaymentCancelParams {
|
|
898
|
+
/**
|
|
899
|
+
* Unique key for idempotent request handling. If a request with the same key was
|
|
900
|
+
* already processed, the original response is returned.
|
|
901
|
+
*/
|
|
902
|
+
'Idempotency-Key': string;
|
|
512
903
|
/**
|
|
513
|
-
*
|
|
904
|
+
* Agent ID (agt_xxx) used for attribution and audit.
|
|
514
905
|
*/
|
|
515
|
-
'X-Agent-ID'
|
|
906
|
+
'X-Agent-ID': string;
|
|
516
907
|
/**
|
|
517
|
-
*
|
|
518
|
-
* for agent observability.
|
|
908
|
+
* Stable run, session, or conversation ID for agent observability.
|
|
519
909
|
*/
|
|
520
|
-
'X-Instance-ID'
|
|
910
|
+
'X-Instance-ID': string;
|
|
521
911
|
}
|
|
522
912
|
export interface PaymentGetParams {
|
|
523
913
|
/**
|
|
524
|
-
*
|
|
914
|
+
* Header param: Agent ID (agt_xxx) used for attribution and audit.
|
|
525
915
|
*/
|
|
526
|
-
|
|
916
|
+
'X-Agent-ID': string;
|
|
527
917
|
/**
|
|
528
|
-
* Header param:
|
|
918
|
+
* Header param: Stable run, session, or conversation ID for agent observability.
|
|
529
919
|
*/
|
|
530
|
-
'X-
|
|
920
|
+
'X-Instance-ID': string;
|
|
531
921
|
/**
|
|
532
|
-
*
|
|
533
|
-
* for agent observability.
|
|
922
|
+
* Query param: Party ID for delegated payment lookup
|
|
534
923
|
*/
|
|
535
|
-
|
|
924
|
+
partyId?: string;
|
|
536
925
|
}
|
|
537
926
|
export declare namespace Payments {
|
|
538
|
-
export { type PaymentCreateResponse as PaymentCreateResponse, type PaymentListResponse as PaymentListResponse, type PaymentGetResponse as PaymentGetResponse, type PaymentCreateParams as PaymentCreateParams, type PaymentListParams as PaymentListParams, type PaymentGetParams as PaymentGetParams, };
|
|
927
|
+
export { type PaymentCreateResponse as PaymentCreateResponse, type PaymentListResponse as PaymentListResponse, type PaymentCancelResponse as PaymentCancelResponse, type PaymentGetResponse as PaymentGetResponse, type PaymentCreateParams as PaymentCreateParams, type PaymentListParams as PaymentListParams, type PaymentCancelParams as PaymentCancelParams, type PaymentGetParams as PaymentGetParams, };
|
|
539
928
|
}
|
|
540
929
|
//# sourceMappingURL=payments.d.ts.map
|