@getivy/node-sdk 2.6.0 → 2.20.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.
Files changed (232) hide show
  1. package/CHANGELOG.md +164 -0
  2. package/README.md +2 -2
  3. package/api-promise.d.mts +1 -0
  4. package/api-promise.d.mts.map +1 -1
  5. package/api-promise.d.ts +1 -0
  6. package/api-promise.d.ts.map +1 -1
  7. package/api-promise.mjs +1 -0
  8. package/api-promise.mjs.map +1 -1
  9. package/bin/migration-config.json +1 -1
  10. package/client.d.mts +10 -4
  11. package/client.d.mts.map +1 -1
  12. package/client.d.ts +10 -4
  13. package/client.d.ts.map +1 -1
  14. package/client.js +21 -7
  15. package/client.js.map +1 -1
  16. package/client.mjs +21 -7
  17. package/client.mjs.map +1 -1
  18. package/core/api-promise.d.mts.map +1 -1
  19. package/core/api-promise.d.ts.map +1 -1
  20. package/core/api-promise.mjs.map +1 -1
  21. package/core/error.mjs.map +1 -1
  22. package/core/resource.d.mts.map +1 -1
  23. package/core/resource.d.ts.map +1 -1
  24. package/core/uploads.d.mts.map +1 -1
  25. package/core/uploads.d.ts.map +1 -1
  26. package/core/uploads.mjs.map +1 -1
  27. package/error.d.mts +1 -0
  28. package/error.d.mts.map +1 -1
  29. package/error.d.ts +1 -0
  30. package/error.d.ts.map +1 -1
  31. package/error.mjs +1 -0
  32. package/error.mjs.map +1 -1
  33. package/index.d.mts.map +1 -1
  34. package/index.d.ts.map +1 -1
  35. package/index.mjs.map +1 -1
  36. package/internal/detect-platform.mjs.map +1 -1
  37. package/internal/headers.mjs.map +1 -1
  38. package/internal/parse.d.mts.map +1 -1
  39. package/internal/parse.d.ts.map +1 -1
  40. package/internal/parse.mjs.map +1 -1
  41. package/internal/request-options.d.mts.map +1 -1
  42. package/internal/request-options.d.ts.map +1 -1
  43. package/internal/shims.d.mts +6 -0
  44. package/internal/shims.d.mts.map +1 -1
  45. package/internal/shims.d.ts +6 -0
  46. package/internal/shims.d.ts.map +1 -1
  47. package/internal/to-file.d.mts.map +1 -1
  48. package/internal/to-file.d.ts.map +1 -1
  49. package/internal/to-file.mjs.map +1 -1
  50. package/internal/tslib.js +17 -17
  51. package/internal/types.d.mts +4 -4
  52. package/internal/types.d.mts.map +1 -1
  53. package/internal/types.d.ts +4 -4
  54. package/internal/types.d.ts.map +1 -1
  55. package/internal/uploads.d.mts.map +1 -1
  56. package/internal/uploads.d.ts.map +1 -1
  57. package/internal/uploads.mjs.map +1 -1
  58. package/internal/utils/base64.mjs.map +1 -1
  59. package/internal/utils/log.d.mts.map +1 -1
  60. package/internal/utils/log.d.ts.map +1 -1
  61. package/internal/utils/log.js +4 -1
  62. package/internal/utils/log.js.map +1 -1
  63. package/internal/utils/log.mjs +4 -1
  64. package/internal/utils/log.mjs.map +1 -1
  65. package/internal/utils/path.mjs.map +1 -1
  66. package/internal/utils/query.mjs.map +1 -1
  67. package/internal/utils/values.mjs.map +1 -1
  68. package/internal/utils.d.mts.map +1 -1
  69. package/internal/utils.d.ts.map +1 -1
  70. package/internal/utils.mjs.map +1 -1
  71. package/lib/request-signing.d.mts +6 -0
  72. package/lib/request-signing.d.mts.map +1 -0
  73. package/lib/request-signing.d.ts +6 -0
  74. package/lib/request-signing.d.ts.map +1 -0
  75. package/lib/request-signing.js +113 -0
  76. package/lib/request-signing.js.map +1 -0
  77. package/lib/request-signing.mjs +109 -0
  78. package/lib/request-signing.mjs.map +1 -0
  79. package/package.json +16 -4
  80. package/resource.d.mts +1 -0
  81. package/resource.d.mts.map +1 -1
  82. package/resource.d.ts +1 -0
  83. package/resource.d.ts.map +1 -1
  84. package/resource.mjs +1 -0
  85. package/resource.mjs.map +1 -1
  86. package/resources/balance.d.mts.map +1 -1
  87. package/resources/balance.d.ts.map +1 -1
  88. package/resources/balance.mjs.map +1 -1
  89. package/resources/banks.d.mts +12 -14
  90. package/resources/banks.d.mts.map +1 -1
  91. package/resources/banks.d.ts +12 -14
  92. package/resources/banks.d.ts.map +1 -1
  93. package/resources/banks.mjs.map +1 -1
  94. package/resources/beneficiary-payouts.d.mts +2 -2
  95. package/resources/beneficiary-payouts.d.mts.map +1 -1
  96. package/resources/beneficiary-payouts.d.ts +2 -2
  97. package/resources/beneficiary-payouts.d.ts.map +1 -1
  98. package/resources/beneficiary-payouts.mjs.map +1 -1
  99. package/resources/capabilities.d.mts +8 -1
  100. package/resources/capabilities.d.mts.map +1 -1
  101. package/resources/capabilities.d.ts +8 -1
  102. package/resources/capabilities.d.ts.map +1 -1
  103. package/resources/capabilities.js +7 -0
  104. package/resources/capabilities.js.map +1 -1
  105. package/resources/capabilities.mjs +7 -0
  106. package/resources/capabilities.mjs.map +1 -1
  107. package/resources/checkoutsession.d.mts +18 -10
  108. package/resources/checkoutsession.d.mts.map +1 -1
  109. package/resources/checkoutsession.d.ts +18 -10
  110. package/resources/checkoutsession.d.ts.map +1 -1
  111. package/resources/checkoutsession.js +3 -2
  112. package/resources/checkoutsession.js.map +1 -1
  113. package/resources/checkoutsession.mjs +3 -2
  114. package/resources/checkoutsession.mjs.map +1 -1
  115. package/resources/counterparties.d.mts +956 -0
  116. package/resources/counterparties.d.mts.map +1 -0
  117. package/resources/counterparties.d.ts +956 -0
  118. package/resources/counterparties.d.ts.map +1 -0
  119. package/resources/counterparties.js +41 -0
  120. package/resources/counterparties.js.map +1 -0
  121. package/resources/counterparties.mjs +37 -0
  122. package/resources/counterparties.mjs.map +1 -0
  123. package/resources/customers.d.mts +6 -6
  124. package/resources/customers.d.mts.map +1 -1
  125. package/resources/customers.d.ts +6 -6
  126. package/resources/customers.d.ts.map +1 -1
  127. package/resources/customers.mjs.map +1 -1
  128. package/resources/deposits.d.mts +21 -7
  129. package/resources/deposits.d.mts.map +1 -1
  130. package/resources/deposits.d.ts +21 -7
  131. package/resources/deposits.d.ts.map +1 -1
  132. package/resources/deposits.mjs.map +1 -1
  133. package/resources/index.d.mts +1 -1
  134. package/resources/index.d.mts.map +1 -1
  135. package/resources/index.d.ts +1 -1
  136. package/resources/index.d.ts.map +1 -1
  137. package/resources/index.js +3 -3
  138. package/resources/index.js.map +1 -1
  139. package/resources/index.mjs +1 -1
  140. package/resources/index.mjs.map +1 -1
  141. package/resources/orders.d.mts +102 -39
  142. package/resources/orders.d.mts.map +1 -1
  143. package/resources/orders.d.ts +102 -39
  144. package/resources/orders.d.ts.map +1 -1
  145. package/resources/orders.mjs.map +1 -1
  146. package/resources/payee.d.mts.map +1 -1
  147. package/resources/payee.d.ts.map +1 -1
  148. package/resources/payee.mjs.map +1 -1
  149. package/resources/payouts.d.mts +82 -21
  150. package/resources/payouts.d.mts.map +1 -1
  151. package/resources/payouts.d.ts +82 -21
  152. package/resources/payouts.d.ts.map +1 -1
  153. package/resources/payouts.mjs.map +1 -1
  154. package/resources/refunds.d.mts +1 -1
  155. package/resources/refunds.d.mts.map +1 -1
  156. package/resources/refunds.d.ts +1 -1
  157. package/resources/refunds.d.ts.map +1 -1
  158. package/resources/refunds.mjs.map +1 -1
  159. package/resources/returns.d.mts +2 -2
  160. package/resources/returns.d.mts.map +1 -1
  161. package/resources/returns.d.ts +2 -2
  162. package/resources/returns.d.ts.map +1 -1
  163. package/resources/returns.mjs.map +1 -1
  164. package/resources/subaccounts.d.mts +4 -4
  165. package/resources/subaccounts.d.mts.map +1 -1
  166. package/resources/subaccounts.d.ts +4 -4
  167. package/resources/subaccounts.d.ts.map +1 -1
  168. package/resources/subaccounts.mjs.map +1 -1
  169. package/resources/transactions.d.mts +3 -3
  170. package/resources/transactions.d.mts.map +1 -1
  171. package/resources/transactions.d.ts +3 -3
  172. package/resources/transactions.d.ts.map +1 -1
  173. package/resources/transactions.mjs.map +1 -1
  174. package/resources/webhook/index.d.mts.map +1 -1
  175. package/resources/webhook/index.d.ts.map +1 -1
  176. package/resources/webhook/index.mjs.map +1 -1
  177. package/resources/webhook/subscription.d.mts +12 -12
  178. package/resources/webhook/subscription.d.mts.map +1 -1
  179. package/resources/webhook/subscription.d.ts +12 -12
  180. package/resources/webhook/subscription.d.ts.map +1 -1
  181. package/resources/webhook/subscription.mjs.map +1 -1
  182. package/resources/webhook/webhook.d.mts.map +1 -1
  183. package/resources/webhook/webhook.d.ts.map +1 -1
  184. package/resources/webhook/webhook.mjs.map +1 -1
  185. package/resources/webhook.d.mts.map +1 -1
  186. package/resources/webhook.d.ts.map +1 -1
  187. package/resources/webhook.mjs.map +1 -1
  188. package/resources.d.mts.map +1 -1
  189. package/resources.d.ts.map +1 -1
  190. package/resources.mjs.map +1 -1
  191. package/src/client.ts +51 -22
  192. package/src/internal/utils/log.ts +3 -0
  193. package/src/lib/request-signing.ts +139 -0
  194. package/src/resources/banks.ts +21 -11
  195. package/src/resources/beneficiary-payouts.ts +2 -2
  196. package/src/resources/capabilities.ts +8 -1
  197. package/src/resources/checkoutsession.ts +31 -10
  198. package/src/resources/counterparties.ts +3073 -0
  199. package/src/resources/customers.ts +3509 -3509
  200. package/src/resources/deposits.ts +52 -6
  201. package/src/resources/index.ts +13 -9
  202. package/src/resources/orders.ts +222 -36
  203. package/src/resources/payouts.ts +396 -17
  204. package/src/resources/refunds.ts +1 -1
  205. package/src/resources/returns.ts +2 -2
  206. package/src/resources/subaccounts.ts +4 -4
  207. package/src/resources/transactions.ts +5 -2
  208. package/src/resources/webhook/subscription.ts +37 -12
  209. package/src/version.ts +1 -1
  210. package/uploads.d.mts +1 -0
  211. package/uploads.d.mts.map +1 -1
  212. package/uploads.d.ts +1 -0
  213. package/uploads.d.ts.map +1 -1
  214. package/uploads.mjs +1 -0
  215. package/uploads.mjs.map +1 -1
  216. package/version.d.mts +1 -1
  217. package/version.d.mts.map +1 -1
  218. package/version.d.ts +1 -1
  219. package/version.d.ts.map +1 -1
  220. package/version.js +1 -1
  221. package/version.js.map +1 -1
  222. package/version.mjs +1 -1
  223. package/version.mjs.map +1 -1
  224. package/resources/fx.d.mts +0 -155
  225. package/resources/fx.d.mts.map +0 -1
  226. package/resources/fx.d.ts +0 -155
  227. package/resources/fx.d.ts.map +0 -1
  228. package/resources/fx.js +0 -28
  229. package/resources/fx.js.map +0 -1
  230. package/resources/fx.mjs +0 -24
  231. package/resources/fx.mjs.map +0 -1
  232. package/src/resources/fx.ts +0 -195
@@ -0,0 +1,139 @@
1
+ import { appendSignature, createSignature, type Signer } from 'http-message-sig';
2
+
3
+ type SigningKey = Awaited<ReturnType<typeof globalThis.crypto.subtle.importKey>>;
4
+
5
+ type SigningCredentials = {
6
+ keyId: string;
7
+ signer: Signer;
8
+ };
9
+
10
+ function base64(bytes: Uint8Array): string {
11
+ return btoa(Array.from(bytes, (byte) => String.fromCharCode(byte)).join(''));
12
+ }
13
+
14
+ function base64url(bytes: Uint8Array): string {
15
+ return base64(bytes).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
16
+ }
17
+
18
+ async function importPrivateKey(bytes: Uint8Array<ArrayBuffer>): Promise<SigningKey> {
19
+ try {
20
+ return await crypto.subtle.importKey('pkcs8', bytes, 'Ed25519', true, ['sign']);
21
+ } catch {
22
+ return crypto.subtle.importKey('pkcs8', bytes, { name: 'ECDSA', namedCurve: 'P-256' }, true, ['sign']);
23
+ }
24
+ }
25
+
26
+ async function signingCredentials(pem: string): Promise<SigningCredentials> {
27
+ if (!globalThis.crypto?.subtle) {
28
+ throw new Error('Request signing requires Web Crypto support.');
29
+ }
30
+
31
+ const match = /^-----BEGIN PRIVATE KEY-----\s+([A-Za-z0-9+/=\s]+)-----END PRIVATE KEY-----$/.exec(
32
+ pem.trim(),
33
+ );
34
+ const encoded = match?.[1];
35
+ if (!encoded) {
36
+ throw new Error('Request signing requires an unencrypted PKCS#8 Ed25519 or P-256 private PEM key.');
37
+ }
38
+
39
+ let key: SigningKey;
40
+ try {
41
+ const bytes = Uint8Array.from(atob(encoded.replace(/\s/g, '')), (character) => character.charCodeAt(0));
42
+ key = await importPrivateKey(bytes);
43
+ } catch {
44
+ throw new Error(
45
+ 'Request signing requires a valid Ed25519 or P-256 private key. Check that this runtime supports the key algorithm in Web Crypto.',
46
+ );
47
+ }
48
+
49
+ const jwk = await crypto.subtle.exportKey('jwk', key);
50
+ const isEd25519 = key.algorithm.name === 'Ed25519';
51
+ const members =
52
+ isEd25519 ? { crv: jwk.crv, kty: jwk.kty, x: jwk.x } : { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y };
53
+ const digest = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(JSON.stringify(members)));
54
+
55
+ const algorithm = isEd25519 ? { name: 'Ed25519' } : { name: 'ECDSA', hash: 'SHA-256' };
56
+ return {
57
+ keyId: base64url(new Uint8Array(digest)),
58
+ signer: {
59
+ algorithm: isEd25519 ? 'ed25519' : 'ecdsa-p256-sha256',
60
+ async sign(bytes) {
61
+ return new Uint8Array(await crypto.subtle.sign(algorithm, key, new Uint8Array(bytes)));
62
+ },
63
+ },
64
+ };
65
+ }
66
+
67
+ export class RequestSigner {
68
+ #privateKey: string;
69
+ #credentials: Promise<SigningCredentials> | undefined;
70
+
71
+ constructor(privateKey: string) {
72
+ this.#privateKey = privateKey;
73
+ }
74
+
75
+ async sign(
76
+ request: RequestInit,
77
+ url: string,
78
+ authorizationHeader: 'authorization' | 'x-ivy-api-key',
79
+ ): Promise<void> {
80
+ const target = new URL(url);
81
+ if (target.hash || target.username || target.password || !['http:', 'https:'].includes(target.protocol)) {
82
+ throw new Error('Request signing requires an HTTP URL without credentials or a fragment.');
83
+ }
84
+ if (request.body != null && typeof request.body !== 'string') {
85
+ throw new Error('Request signing supports only serialized JSON request bodies.');
86
+ }
87
+
88
+ const headers = new Headers(request.headers);
89
+ const contentType = headers.get('content-type');
90
+ if (
91
+ (contentType !== null && !/^application\/json\s*(;|$)/i.test(contentType.trim())) ||
92
+ (request.body && !contentType)
93
+ ) {
94
+ throw new Error('Request signing requires application/json for requests with a body.');
95
+ }
96
+ const encoding = headers.get('content-encoding');
97
+ if (encoding !== null && encoding.trim().toLowerCase() !== 'identity') {
98
+ throw new Error('Request signing does not support encoded request bodies.');
99
+ }
100
+ if (!headers.get(authorizationHeader)?.trim()) {
101
+ throw new Error('Request signing requires the API authentication header.');
102
+ }
103
+
104
+ const credentials = await (this.#credentials ??= signingCredentials(this.#privateKey));
105
+ const body = new TextEncoder().encode(request.body ?? '');
106
+ const digest = await crypto.subtle.digest('SHA-256', body);
107
+ headers.set('content-digest', `sha-256=:${base64(new Uint8Array(digest))}:`);
108
+
109
+ const components = ['@method', '@target-uri', authorizationHeader];
110
+ for (const name of ['content-type', 'content-digest', 'idempotency-key', 'api-version']) {
111
+ if (headers.has(name)) components.push(name);
112
+ }
113
+
114
+ headers.delete('signature');
115
+ headers.delete('signature-input');
116
+ const fields = await createSignature(
117
+ {
118
+ kind: 'request',
119
+ method: (request.method ?? 'GET').toUpperCase(),
120
+ targetUri: target.href,
121
+ fields: Array.from(headers, ([name, value]) => ({ name, value })),
122
+ },
123
+ {
124
+ label: 'sig1',
125
+ components,
126
+ parameters: {
127
+ created: Math.floor(Date.now() / 1000),
128
+ nonce: base64url(crypto.getRandomValues(new Uint8Array(24))),
129
+ keyid: credentials.keyId,
130
+ tag: 'api-request',
131
+ },
132
+ signer: credentials.signer,
133
+ },
134
+ );
135
+
136
+ request.headers = appendSignature(headers, fields);
137
+ request.redirect = 'error';
138
+ }
139
+ }
@@ -316,6 +316,10 @@ export interface BankRetrieveResponse {
316
316
  | 'SWIFT'
317
317
  | 'INTERNAL'
318
318
  | 'TARGET'
319
+ | 'ACH'
320
+ | 'FEDWIRE'
321
+ | 'FEDNOW'
322
+ | 'RTP'
319
323
  >;
320
324
 
321
325
  /**
@@ -326,7 +330,7 @@ export interface BankRetrieveResponse {
326
330
  /**
327
331
  * The capabilities of the bank.
328
332
  */
329
- capabilities?: Array<'ais' | 'pis'>;
333
+ capabilities?: Array<'pis'>;
330
334
 
331
335
  group?: string;
332
336
 
@@ -650,6 +654,10 @@ export namespace BankListResponse {
650
654
  | 'SWIFT'
651
655
  | 'INTERNAL'
652
656
  | 'TARGET'
657
+ | 'ACH'
658
+ | 'FEDWIRE'
659
+ | 'FEDNOW'
660
+ | 'RTP'
653
661
  >;
654
662
 
655
663
  /**
@@ -660,7 +668,7 @@ export namespace BankListResponse {
660
668
  /**
661
669
  * The capabilities of the bank.
662
670
  */
663
- capabilities?: Array<'ais' | 'pis'>;
671
+ capabilities?: Array<'pis'>;
664
672
 
665
673
  group?: string;
666
674
 
@@ -985,6 +993,10 @@ export namespace BankSearchResponse {
985
993
  | 'SWIFT'
986
994
  | 'INTERNAL'
987
995
  | 'TARGET'
996
+ | 'ACH'
997
+ | 'FEDWIRE'
998
+ | 'FEDNOW'
999
+ | 'RTP'
988
1000
  >;
989
1001
 
990
1002
  /**
@@ -995,7 +1007,7 @@ export namespace BankSearchResponse {
995
1007
  /**
996
1008
  * The capabilities of the bank.
997
1009
  */
998
- capabilities?: Array<'ais' | 'pis'>;
1010
+ capabilities?: Array<'pis'>;
999
1011
 
1000
1012
  group?: string;
1001
1013
 
@@ -1020,10 +1032,9 @@ export interface BankRetrieveParams {
1020
1032
 
1021
1033
  export interface BankListParams {
1022
1034
  /**
1023
- * Filter banks with provided capability only. `ais` for data products, `pis` for
1024
- * payment products.
1035
+ * Filter banks with the provided payment capability.
1025
1036
  */
1026
- capability?: 'ais' | 'pis';
1037
+ capability?: 'pis';
1027
1038
 
1028
1039
  /**
1029
1040
  * ISO 4217 currency code. Filter banks with provided currency only.
@@ -1299,7 +1310,7 @@ export interface BankListParams {
1299
1310
  /**
1300
1311
  * The internal checkout session id. For internal use only.
1301
1312
  */
1302
- sessionId?: unknown;
1313
+ sessionId?: string;
1303
1314
 
1304
1315
  /**
1305
1316
  * The number of banks to skip
@@ -1309,10 +1320,9 @@ export interface BankListParams {
1309
1320
 
1310
1321
  export interface BankSearchParams {
1311
1322
  /**
1312
- * Filter banks with provided capability only. `ais` for data products, `pis` for
1313
- * payment products.
1323
+ * Filter banks with the provided payment capability.
1314
1324
  */
1315
- capability?: 'ais' | 'pis';
1325
+ capability?: 'pis';
1316
1326
 
1317
1327
  /**
1318
1328
  * ISO 4217 currency code. Filter banks with provided currency only.
@@ -1595,7 +1605,7 @@ export interface BankSearchParams {
1595
1605
  /**
1596
1606
  * The internal checkout session id. For internal use only.
1597
1607
  */
1598
- sessionId?: unknown;
1608
+ sessionId?: string;
1599
1609
 
1600
1610
  /**
1601
1611
  * The number of banks to skip
@@ -36,7 +36,7 @@ export namespace BeneficiaryPayoutCreateResponse {
36
36
  /**
37
37
  * The creation timestamp of the payout
38
38
  */
39
- createdAt: unknown;
39
+ createdAt: string;
40
40
 
41
41
  /**
42
42
  * The currency of the balance which was settled to the beneficiary bank account or
@@ -67,7 +67,7 @@ export namespace BeneficiaryPayoutCreateResponse {
67
67
  /**
68
68
  * The current status of the payout
69
69
  */
70
- status: 'paid' | 'pending' | 'in_transit' | 'failed' | 'canceled';
70
+ status: 'paid' | 'pending' | 'in_transit' | 'failed' | 'returned' | 'canceled';
71
71
 
72
72
  /**
73
73
  * The type of payout
@@ -8,6 +8,13 @@ export class Capabilities extends APIResource {
8
8
  /**
9
9
  * Retrieve the capabilities of your Ivy account. The capabilities are broken down
10
10
  * by market and by product.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const capability = await client.capabilities.retrieve({
15
+ * market: 'DE',
16
+ * });
17
+ * ```
11
18
  */
12
19
  retrieve(body: CapabilityRetrieveParams, options?: RequestOptions): APIPromise<CapabilityRetrieveResponse> {
13
20
  return this._client.post('/api/service/merchant/capabilities/details', { body, ...options });
@@ -15,7 +22,7 @@ export class Capabilities extends APIResource {
15
22
  }
16
23
 
17
24
  export interface CapabilityRetrieveResponse {
18
- capabilities?: Array<'ais' | 'pis'>;
25
+ capabilities?: Array<'pis'>;
19
26
  }
20
27
 
21
28
  export interface CapabilityRetrieveParams {
@@ -7,8 +7,9 @@ import { RequestOptions } from '../internal/request-options';
7
7
  export class Checkoutsession extends APIResource {
8
8
  /**
9
9
  * Creates a Checkout Session for the merchant corresponding to the given API key.
10
- * See [the guide](https://docs.getivy.de/docs/payment-integration) for more
11
- * information.
10
+ * See
11
+ * [the guide](https://docs.augustus.com/docs/pay-by-bank/instant-bank-transfer)
12
+ * for more information.
12
13
  */
13
14
  create(
14
15
  body: CheckoutsessionCreateParams,
@@ -329,7 +330,7 @@ export interface CheckoutsessionCreateResponse {
329
330
 
330
331
  completeCallbackUrl?: string;
331
332
 
332
- createdAt?: unknown;
333
+ createdAt?: string;
333
334
 
334
335
  customer?: CheckoutsessionCreateResponse.Customer;
335
336
 
@@ -627,7 +628,7 @@ export interface CheckoutsessionCreateResponse {
627
628
 
628
629
  subaccountId?: string;
629
630
 
630
- updatedAt?: unknown;
631
+ updatedAt?: string;
631
632
  }
632
633
 
633
634
  export namespace CheckoutsessionCreateResponse {
@@ -1818,7 +1819,7 @@ export interface CheckoutsessionRetrieveResponse {
1818
1819
 
1819
1820
  completeCallbackUrl?: string;
1820
1821
 
1821
- createdAt?: unknown;
1822
+ createdAt?: string;
1822
1823
 
1823
1824
  customer?: CheckoutsessionRetrieveResponse.Customer;
1824
1825
 
@@ -2116,7 +2117,7 @@ export interface CheckoutsessionRetrieveResponse {
2116
2117
 
2117
2118
  subaccountId?: string;
2118
2119
 
2119
- updatedAt?: unknown;
2120
+ updatedAt?: string;
2120
2121
  }
2121
2122
 
2122
2123
  export namespace CheckoutsessionRetrieveResponse {
@@ -3307,7 +3308,7 @@ export interface CheckoutsessionExpireResponse {
3307
3308
 
3308
3309
  completeCallbackUrl?: string;
3309
3310
 
3310
- createdAt?: unknown;
3311
+ createdAt?: string;
3311
3312
 
3312
3313
  customer?: CheckoutsessionExpireResponse.Customer;
3313
3314
 
@@ -3605,7 +3606,7 @@ export interface CheckoutsessionExpireResponse {
3605
3606
 
3606
3607
  subaccountId?: string;
3607
3608
 
3608
- updatedAt?: unknown;
3609
+ updatedAt?: string;
3609
3610
  }
3610
3611
 
3611
3612
  export namespace CheckoutsessionExpireResponse {
@@ -5511,7 +5512,7 @@ export namespace CheckoutsessionCreateParams {
5511
5512
  }
5512
5513
 
5513
5514
  export interface FinancialAddress {
5514
- type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet' | 'aba';
5515
+ type: 'iban' | 'sort_code' | 'bank_code' | 'bban' | 'wallet' | 'aba' | 'bic';
5515
5516
 
5516
5517
  aba?: FinancialAddress.Aba;
5517
5518
 
@@ -5519,6 +5520,8 @@ export namespace CheckoutsessionCreateParams {
5519
5520
 
5520
5521
  bban?: FinancialAddress.Bban;
5521
5522
 
5523
+ bic?: FinancialAddress.Bic;
5524
+
5522
5525
  iban?: FinancialAddress.Iban;
5523
5526
 
5524
5527
  sortCode?: FinancialAddress.SortCode;
@@ -5551,6 +5554,16 @@ export namespace CheckoutsessionCreateParams {
5551
5554
  bic?: string;
5552
5555
  }
5553
5556
 
5557
+ export interface Bic {
5558
+ accountHolderName: string;
5559
+
5560
+ accountNumber: string;
5561
+
5562
+ bic: string;
5563
+
5564
+ localBankCode?: string;
5565
+ }
5566
+
5554
5567
  export interface Iban {
5555
5568
  accountHolderName: string;
5556
5569
 
@@ -5576,7 +5589,15 @@ export namespace CheckoutsessionCreateParams {
5576
5589
  /**
5577
5590
  * The blockchain network
5578
5591
  */
5579
- blockchain: 'ETH' | 'ETH-SEPOLIA' | 'SOL' | 'SOL-DEVNET' | 'MATIC' | 'MATIC-AMOY';
5592
+ blockchain:
5593
+ | 'BTC'
5594
+ | 'BTC-TESTNET4'
5595
+ | 'ETH'
5596
+ | 'ETH-SEPOLIA'
5597
+ | 'SOL'
5598
+ | 'SOL-DEVNET'
5599
+ | 'MATIC'
5600
+ | 'MATIC-AMOY';
5580
5601
  }
5581
5602
  }
5582
5603
  }