@spritz-finance/api-client 0.18.1 → 0.18.2
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 +2 -0
- package/dist/spritz-api-client.d.ts +60 -36
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1047,6 +1047,8 @@ const deposit = await client.deposit.create(
|
|
|
1047
1047
|
|
|
1048
1048
|
To move submission onto the customer's device, pass `clientNetwork: { ipAddresses: [req.ip] }` to `prepare` and forward the returned `submissionToken` to that client. The client then calls `POST /v1/deposits/direct` itself with `Authorization: Bearer ach_submit_...` as its only credential — no user API key, no integrator key, no HMAC headers — plus the `Idempotency-Key` header and a body of just `{ preparationId }`. This SDK signs every REST call with integrator HMAC, so that request should not go through it; see the [ACH Onramp Integration Guide](docs/ach-onramp-guide.md) for the full request.
|
|
1049
1049
|
|
|
1050
|
+
`prepare` also accepts an optional `customerContext` object (at most 8192 encoded UTF-8 bytes) carrying partner-side context for later fraud analysis. Its field mapping is agreed privately per integration; missing, unknown or invalid fields never block preparation. Never send credentials or bank data in it.
|
|
1051
|
+
|
|
1050
1052
|
If risk checks block the create step, the API returns 409 before any ACH debit is pulled. Prepare a new quote before retrying; blocked create attempts consume the original `preparationId`.
|
|
1051
1053
|
|
|
1052
1054
|
For a complete walkthrough with code examples, request/response schemas, and deposit lifecycle documentation, see the **[ACH Onramp Integration Guide](docs/ach-onramp-guide.md)**.
|
|
@@ -3983,7 +3983,7 @@ interface operations {
|
|
|
3983
3983
|
/**
|
|
3984
3984
|
* Format: date-time
|
|
3985
3985
|
* @description Creation timestamp
|
|
3986
|
-
* @example 2026-09-
|
|
3986
|
+
* @example 2026-09-23T08:12:57.990Z
|
|
3987
3987
|
*/
|
|
3988
3988
|
createdAt?: string;
|
|
3989
3989
|
}[];
|
|
@@ -4148,7 +4148,7 @@ interface operations {
|
|
|
4148
4148
|
"application/json": {
|
|
4149
4149
|
/**
|
|
4150
4150
|
* @description Destination account ID
|
|
4151
|
-
* @example
|
|
4151
|
+
* @example 6ab38a093ae8393c020db77f
|
|
4152
4152
|
*/
|
|
4153
4153
|
accountId: string;
|
|
4154
4154
|
/**
|
|
@@ -4176,7 +4176,7 @@ interface operations {
|
|
|
4176
4176
|
"application/x-www-form-urlencoded": {
|
|
4177
4177
|
/**
|
|
4178
4178
|
* @description Destination account ID
|
|
4179
|
-
* @example
|
|
4179
|
+
* @example 6ab38a093ae8393c020db77f
|
|
4180
4180
|
*/
|
|
4181
4181
|
accountId: string;
|
|
4182
4182
|
/**
|
|
@@ -4204,7 +4204,7 @@ interface operations {
|
|
|
4204
4204
|
"multipart/form-data": {
|
|
4205
4205
|
/**
|
|
4206
4206
|
* @description Destination account ID
|
|
4207
|
-
* @example
|
|
4207
|
+
* @example 6ab38a093ae8393c020db77f
|
|
4208
4208
|
*/
|
|
4209
4209
|
accountId: string;
|
|
4210
4210
|
/**
|
|
@@ -4251,7 +4251,7 @@ interface operations {
|
|
|
4251
4251
|
/**
|
|
4252
4252
|
* Format: date-time
|
|
4253
4253
|
* @description When the quote was created
|
|
4254
|
-
* @example 2026-09-
|
|
4254
|
+
* @example 2026-09-23T08:12:57.968Z
|
|
4255
4255
|
*/
|
|
4256
4256
|
createdAt: string;
|
|
4257
4257
|
/** @description Exact USD value collected by Spritz and the token route used to fund it. The exact token quantity is returned by the transaction endpoint. */
|
|
@@ -4290,7 +4290,7 @@ interface operations {
|
|
|
4290
4290
|
rail: "ach_standard" | "ach_same_day" | "rtp" | "wire" | "eft" | "sepa" | "faster_payments" | "push_to_card" | "bill_pay" | "card_deposit";
|
|
4291
4291
|
/**
|
|
4292
4292
|
* @description Destination account ID
|
|
4293
|
-
* @example
|
|
4293
|
+
* @example 6ab38a093ae8393c020db780
|
|
4294
4294
|
*/
|
|
4295
4295
|
accountId: string;
|
|
4296
4296
|
/** @description True when this quote does not lock the destination amount. EUR quotes remain estimates; actual settlement is reported by the off-ramp resource. */
|
|
@@ -4547,7 +4547,7 @@ interface operations {
|
|
|
4547
4547
|
/**
|
|
4548
4548
|
* Format: date-time
|
|
4549
4549
|
* @description When the quote was created
|
|
4550
|
-
* @example 2026-09-
|
|
4550
|
+
* @example 2026-09-23T08:12:57.968Z
|
|
4551
4551
|
*/
|
|
4552
4552
|
createdAt: string;
|
|
4553
4553
|
/** @description Exact USD value collected by Spritz and the token route used to fund it. The exact token quantity is returned by the transaction endpoint. */
|
|
@@ -4586,7 +4586,7 @@ interface operations {
|
|
|
4586
4586
|
rail: "ach_standard" | "ach_same_day" | "rtp" | "wire" | "eft" | "sepa" | "faster_payments" | "push_to_card" | "bill_pay" | "card_deposit";
|
|
4587
4587
|
/**
|
|
4588
4588
|
* @description Destination account ID
|
|
4589
|
-
* @example
|
|
4589
|
+
* @example 6ab38a093ae8393c020db780
|
|
4590
4590
|
*/
|
|
4591
4591
|
accountId: string;
|
|
4592
4592
|
/** @description True when this quote does not lock the destination amount. EUR quotes remain estimates; actual settlement is reported by the off-ramp resource. */
|
|
@@ -5182,7 +5182,7 @@ interface operations {
|
|
|
5182
5182
|
/**
|
|
5183
5183
|
* Format: date-time
|
|
5184
5184
|
* @description When the quote was created
|
|
5185
|
-
* @example 2026-09-
|
|
5185
|
+
* @example 2026-09-23T08:12:57.968Z
|
|
5186
5186
|
*/
|
|
5187
5187
|
createdAt: string;
|
|
5188
5188
|
/** @description Exact USD value collected by Spritz and the token route used to fund it. The exact token quantity is returned by the transaction endpoint. */
|
|
@@ -5221,7 +5221,7 @@ interface operations {
|
|
|
5221
5221
|
rail: "ach_standard" | "ach_same_day" | "rtp" | "wire" | "eft" | "sepa" | "faster_payments" | "push_to_card" | "bill_pay" | "card_deposit";
|
|
5222
5222
|
/**
|
|
5223
5223
|
* @description Destination account ID
|
|
5224
|
-
* @example
|
|
5224
|
+
* @example 6ab38a093ae8393c020db780
|
|
5225
5225
|
*/
|
|
5226
5226
|
accountId: string;
|
|
5227
5227
|
/** @description True when this quote does not lock the destination amount. EUR quotes remain estimates; actual settlement is reported by the off-ramp resource. */
|
|
@@ -5524,7 +5524,7 @@ interface operations {
|
|
|
5524
5524
|
currency: string;
|
|
5525
5525
|
/**
|
|
5526
5526
|
* @description Destination account ID
|
|
5527
|
-
* @example
|
|
5527
|
+
* @example 6ab38a093ae8393c020db781
|
|
5528
5528
|
*/
|
|
5529
5529
|
accountId: string;
|
|
5530
5530
|
/**
|
|
@@ -5815,7 +5815,7 @@ interface operations {
|
|
|
5815
5815
|
currency: string;
|
|
5816
5816
|
/**
|
|
5817
5817
|
* @description Destination account ID
|
|
5818
|
-
* @example
|
|
5818
|
+
* @example 6ab38a093ae8393c020db781
|
|
5819
5819
|
*/
|
|
5820
5820
|
accountId: string;
|
|
5821
5821
|
/**
|
|
@@ -6056,7 +6056,7 @@ interface operations {
|
|
|
6056
6056
|
method: "account";
|
|
6057
6057
|
/**
|
|
6058
6058
|
* @description Destination account to reissue the payout to. Omit to reuse the off-ramp's original destination account.
|
|
6059
|
-
* @example
|
|
6059
|
+
* @example 6ab38a093ae8393c020db782
|
|
6060
6060
|
*/
|
|
6061
6061
|
accountId?: string;
|
|
6062
6062
|
};
|
|
@@ -6074,7 +6074,7 @@ interface operations {
|
|
|
6074
6074
|
method: "account";
|
|
6075
6075
|
/**
|
|
6076
6076
|
* @description Destination account to reissue the payout to. Omit to reuse the off-ramp's original destination account.
|
|
6077
|
-
* @example
|
|
6077
|
+
* @example 6ab38a093ae8393c020db782
|
|
6078
6078
|
*/
|
|
6079
6079
|
accountId?: string;
|
|
6080
6080
|
};
|
|
@@ -6092,7 +6092,7 @@ interface operations {
|
|
|
6092
6092
|
method: "account";
|
|
6093
6093
|
/**
|
|
6094
6094
|
* @description Destination account to reissue the payout to. Omit to reuse the off-ramp's original destination account.
|
|
6095
|
-
* @example
|
|
6095
|
+
* @example 6ab38a093ae8393c020db782
|
|
6096
6096
|
*/
|
|
6097
6097
|
accountId?: string;
|
|
6098
6098
|
};
|
|
@@ -6158,7 +6158,7 @@ interface operations {
|
|
|
6158
6158
|
currency: string;
|
|
6159
6159
|
/**
|
|
6160
6160
|
* @description Destination account ID
|
|
6161
|
-
* @example
|
|
6161
|
+
* @example 6ab38a093ae8393c020db781
|
|
6162
6162
|
*/
|
|
6163
6163
|
accountId: string;
|
|
6164
6164
|
/**
|
|
@@ -11723,6 +11723,10 @@ interface operations {
|
|
|
11723
11723
|
requestBody: {
|
|
11724
11724
|
content: {
|
|
11725
11725
|
"application/json": {
|
|
11726
|
+
/** @description Optional partner-provided customer context. Maximum 8192 encoded UTF-8 bytes. Missing, unrecognized or unsupported fields do not block preparation. Do not send credentials or bank data. */
|
|
11727
|
+
customerContext?: {
|
|
11728
|
+
[key: string]: unknown;
|
|
11729
|
+
};
|
|
11726
11730
|
/**
|
|
11727
11731
|
* @description Opaque public funding source identifier
|
|
11728
11732
|
* @example fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X
|
|
@@ -11766,6 +11770,10 @@ interface operations {
|
|
|
11766
11770
|
};
|
|
11767
11771
|
};
|
|
11768
11772
|
"application/x-www-form-urlencoded": {
|
|
11773
|
+
/** @description Optional partner-provided customer context. Maximum 8192 encoded UTF-8 bytes. Missing, unrecognized or unsupported fields do not block preparation. Do not send credentials or bank data. */
|
|
11774
|
+
customerContext?: {
|
|
11775
|
+
[key: string]: unknown;
|
|
11776
|
+
};
|
|
11769
11777
|
/**
|
|
11770
11778
|
* @description Opaque public funding source identifier
|
|
11771
11779
|
* @example fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X
|
|
@@ -11809,6 +11817,10 @@ interface operations {
|
|
|
11809
11817
|
};
|
|
11810
11818
|
};
|
|
11811
11819
|
"multipart/form-data": {
|
|
11820
|
+
/** @description Optional partner-provided customer context. Maximum 8192 encoded UTF-8 bytes. Missing, unrecognized or unsupported fields do not block preparation. Do not send credentials or bank data. */
|
|
11821
|
+
customerContext?: {
|
|
11822
|
+
[key: string]: unknown;
|
|
11823
|
+
};
|
|
11812
11824
|
/**
|
|
11813
11825
|
* @description Opaque public funding source identifier
|
|
11814
11826
|
* @example fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X
|
|
@@ -17917,7 +17929,7 @@ interface operations {
|
|
|
17917
17929
|
data: {
|
|
17918
17930
|
/**
|
|
17919
17931
|
* @description Unique identifier for the debit card
|
|
17920
|
-
* @example
|
|
17932
|
+
* @example 6ab38a093ae8393c020db786
|
|
17921
17933
|
*/
|
|
17922
17934
|
id: string;
|
|
17923
17935
|
/** @enum {string} */
|
|
@@ -18365,7 +18377,7 @@ interface operations {
|
|
|
18365
18377
|
"application/json": {
|
|
18366
18378
|
/**
|
|
18367
18379
|
* @description Unique identifier for the debit card
|
|
18368
|
-
* @example
|
|
18380
|
+
* @example 6ab38a093ae8393c020db786
|
|
18369
18381
|
*/
|
|
18370
18382
|
id: string;
|
|
18371
18383
|
/** @enum {string} */
|
|
@@ -18582,7 +18594,7 @@ interface operations {
|
|
|
18582
18594
|
"application/json": {
|
|
18583
18595
|
/**
|
|
18584
18596
|
* @description Unique identifier for the debit card
|
|
18585
|
-
* @example
|
|
18597
|
+
* @example 6ab38a093ae8393c020db786
|
|
18586
18598
|
*/
|
|
18587
18599
|
id: string;
|
|
18588
18600
|
/** @enum {string} */
|
|
@@ -19103,7 +19115,7 @@ interface operations {
|
|
|
19103
19115
|
"application/json": {
|
|
19104
19116
|
/**
|
|
19105
19117
|
* @description Unique identifier for the debit card
|
|
19106
|
-
* @example
|
|
19118
|
+
* @example 6ab38a093ae8393c020db786
|
|
19107
19119
|
*/
|
|
19108
19120
|
id: string;
|
|
19109
19121
|
/** @enum {string} */
|
|
@@ -20286,7 +20298,7 @@ interface operations {
|
|
|
20286
20298
|
accessToken: string;
|
|
20287
20299
|
/**
|
|
20288
20300
|
* @description The internal ID of the authorized user
|
|
20289
|
-
* @example
|
|
20301
|
+
* @example 6ab38a0a3ae8393c020db78a
|
|
20290
20302
|
*/
|
|
20291
20303
|
userId: string;
|
|
20292
20304
|
/**
|
|
@@ -20302,7 +20314,7 @@ interface operations {
|
|
|
20302
20314
|
/**
|
|
20303
20315
|
* Format: date-time
|
|
20304
20316
|
* @description ISO 8601 timestamp when token expires
|
|
20305
|
-
* @example 2026-09-
|
|
20317
|
+
* @example 2026-09-23T09:12:58.281Z
|
|
20306
20318
|
*/
|
|
20307
20319
|
expiresAt: string;
|
|
20308
20320
|
};
|
|
@@ -20501,7 +20513,7 @@ interface operations {
|
|
|
20501
20513
|
/**
|
|
20502
20514
|
* Format: date-time
|
|
20503
20515
|
* @description ISO 8601 timestamp of when the integrator was created
|
|
20504
|
-
* @example 2026-09-
|
|
20516
|
+
* @example 2026-09-23T08:12:58.280Z
|
|
20505
20517
|
*/
|
|
20506
20518
|
createdAt: string;
|
|
20507
20519
|
};
|
|
@@ -20714,7 +20726,7 @@ interface operations {
|
|
|
20714
20726
|
"application/json": {
|
|
20715
20727
|
/**
|
|
20716
20728
|
* @description The internal ID of the newly created user
|
|
20717
|
-
* @example
|
|
20729
|
+
* @example 6ab38a0a3ae8393c020db78c
|
|
20718
20730
|
*/
|
|
20719
20731
|
userId: string;
|
|
20720
20732
|
/**
|
|
@@ -21058,7 +21070,7 @@ interface operations {
|
|
|
21058
21070
|
depositId: string;
|
|
21059
21071
|
/**
|
|
21060
21072
|
* @description Spritz user ID associated with the returned deposit
|
|
21061
|
-
* @example
|
|
21073
|
+
* @example 6ab38a0a3ae8393c020db789
|
|
21062
21074
|
*/
|
|
21063
21075
|
userId: string;
|
|
21064
21076
|
/**
|
|
@@ -21270,7 +21282,7 @@ interface operations {
|
|
|
21270
21282
|
depositId: string;
|
|
21271
21283
|
/**
|
|
21272
21284
|
* @description Spritz user ID associated with the returned deposit
|
|
21273
|
-
* @example
|
|
21285
|
+
* @example 6ab38a0a3ae8393c020db789
|
|
21274
21286
|
*/
|
|
21275
21287
|
userId: string;
|
|
21276
21288
|
/**
|
|
@@ -21463,7 +21475,7 @@ interface operations {
|
|
|
21463
21475
|
"application/json": {
|
|
21464
21476
|
/**
|
|
21465
21477
|
* @description Unique identifier for the webhook
|
|
21466
|
-
* @example
|
|
21478
|
+
* @example 6ab38a0a3ae8393c020db78b
|
|
21467
21479
|
*/
|
|
21468
21480
|
id: string;
|
|
21469
21481
|
/** @description List of event types this webhook is subscribed to */
|
|
@@ -21694,7 +21706,7 @@ interface operations {
|
|
|
21694
21706
|
"application/json": {
|
|
21695
21707
|
/**
|
|
21696
21708
|
* @description Unique identifier for the webhook
|
|
21697
|
-
* @example
|
|
21709
|
+
* @example 6ab38a0a3ae8393c020db78b
|
|
21698
21710
|
*/
|
|
21699
21711
|
id: string;
|
|
21700
21712
|
/** @description List of event types this webhook is subscribed to */
|
|
@@ -23662,7 +23674,7 @@ interface operations {
|
|
|
23662
23674
|
"application/json": {
|
|
23663
23675
|
/**
|
|
23664
23676
|
* @description Unique identifier for the webhook
|
|
23665
|
-
* @example
|
|
23677
|
+
* @example 6ab38a0a3ae8393c020db78b
|
|
23666
23678
|
*/
|
|
23667
23679
|
id: string;
|
|
23668
23680
|
/** @description List of event types this webhook is subscribed to */
|
|
@@ -24079,7 +24091,7 @@ interface operations {
|
|
|
24079
24091
|
/**
|
|
24080
24092
|
* Format: date-time
|
|
24081
24093
|
* @description ISO 8601 timestamp when the old secret will expire. Only present if a grace period was specified.
|
|
24082
|
-
* @example 2026-09-
|
|
24094
|
+
* @example 2026-09-23T08:17:58.281Z
|
|
24083
24095
|
*/
|
|
24084
24096
|
oldSecretExpiresAt?: string;
|
|
24085
24097
|
};
|
|
@@ -24250,7 +24262,7 @@ interface operations {
|
|
|
24250
24262
|
"application/json": {
|
|
24251
24263
|
/**
|
|
24252
24264
|
* @description Unique identifier for the user
|
|
24253
|
-
* @example
|
|
24265
|
+
* @example 6ab38a0a3ae8393c020db787
|
|
24254
24266
|
*/
|
|
24255
24267
|
id: string;
|
|
24256
24268
|
/**
|
|
@@ -24267,7 +24279,7 @@ interface operations {
|
|
|
24267
24279
|
/**
|
|
24268
24280
|
* Format: date-time
|
|
24269
24281
|
* @description ISO 8601 timestamp of when the user was created
|
|
24270
|
-
* @example 2026-09-
|
|
24282
|
+
* @example 2026-09-23T08:12:58.271Z
|
|
24271
24283
|
*/
|
|
24272
24284
|
signedUpAt: string;
|
|
24273
24285
|
/**
|
|
@@ -24639,7 +24651,7 @@ interface operations {
|
|
|
24639
24651
|
"application/json": {
|
|
24640
24652
|
/**
|
|
24641
24653
|
* @description Unique identifier for the user
|
|
24642
|
-
* @example
|
|
24654
|
+
* @example 6ab38a0a3ae8393c020db787
|
|
24643
24655
|
*/
|
|
24644
24656
|
id: string;
|
|
24645
24657
|
/**
|
|
@@ -24656,7 +24668,7 @@ interface operations {
|
|
|
24656
24668
|
/**
|
|
24657
24669
|
* Format: date-time
|
|
24658
24670
|
* @description ISO 8601 timestamp of when the user was created
|
|
24659
|
-
* @example 2026-09-
|
|
24671
|
+
* @example 2026-09-23T08:12:58.271Z
|
|
24660
24672
|
*/
|
|
24661
24673
|
signedUpAt: string;
|
|
24662
24674
|
/**
|
|
@@ -25128,7 +25140,7 @@ interface operations {
|
|
|
25128
25140
|
"application/json": {
|
|
25129
25141
|
/**
|
|
25130
25142
|
* @description Unique identifier for the user
|
|
25131
|
-
* @example
|
|
25143
|
+
* @example 6ab38a0a3ae8393c020db787
|
|
25132
25144
|
*/
|
|
25133
25145
|
id: string;
|
|
25134
25146
|
/**
|
|
@@ -25145,7 +25157,7 @@ interface operations {
|
|
|
25145
25157
|
/**
|
|
25146
25158
|
* Format: date-time
|
|
25147
25159
|
* @description ISO 8601 timestamp of when the user was created
|
|
25148
|
-
* @example 2026-09-
|
|
25160
|
+
* @example 2026-09-23T08:12:58.271Z
|
|
25149
25161
|
*/
|
|
25150
25162
|
signedUpAt: string;
|
|
25151
25163
|
/**
|
|
@@ -35336,6 +35348,10 @@ interface operations {
|
|
|
35336
35348
|
requestBody: {
|
|
35337
35349
|
content: {
|
|
35338
35350
|
"application/json": {
|
|
35351
|
+
/** @description Optional partner-provided customer context. Maximum 8192 encoded UTF-8 bytes. Missing, unrecognized or unsupported fields do not block preparation. Do not send credentials or bank data. */
|
|
35352
|
+
customerContext?: {
|
|
35353
|
+
[key: string]: unknown;
|
|
35354
|
+
};
|
|
35339
35355
|
/**
|
|
35340
35356
|
* @description Opaque public funding source identifier
|
|
35341
35357
|
* @example fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X
|
|
@@ -35388,6 +35404,10 @@ interface operations {
|
|
|
35388
35404
|
};
|
|
35389
35405
|
};
|
|
35390
35406
|
"application/x-www-form-urlencoded": {
|
|
35407
|
+
/** @description Optional partner-provided customer context. Maximum 8192 encoded UTF-8 bytes. Missing, unrecognized or unsupported fields do not block preparation. Do not send credentials or bank data. */
|
|
35408
|
+
customerContext?: {
|
|
35409
|
+
[key: string]: unknown;
|
|
35410
|
+
};
|
|
35391
35411
|
/**
|
|
35392
35412
|
* @description Opaque public funding source identifier
|
|
35393
35413
|
* @example fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X
|
|
@@ -35440,6 +35460,10 @@ interface operations {
|
|
|
35440
35460
|
};
|
|
35441
35461
|
};
|
|
35442
35462
|
"multipart/form-data": {
|
|
35463
|
+
/** @description Optional partner-provided customer context. Maximum 8192 encoded UTF-8 bytes. Missing, unrecognized or unsupported fields do not block preparation. Do not send credentials or bank data. */
|
|
35464
|
+
customerContext?: {
|
|
35465
|
+
[key: string]: unknown;
|
|
35466
|
+
};
|
|
35443
35467
|
/**
|
|
35444
35468
|
* @description Opaque public funding source identifier
|
|
35445
35469
|
* @example fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X
|