@spritz-finance/api-client 0.12.0 → 0.14.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.
@@ -1642,8 +1642,8 @@ interface paths {
1642
1642
  get?: never;
1643
1643
  put?: never;
1644
1644
  /**
1645
- * Create or refresh an enhanced verification session
1646
- * @description Creates or resumes the authenticated user's interactive enhanced identity verification session. Verification URLs and provider tokens are retrieved just in time because they may expire or need to be regenerated.
1645
+ * Create, resume, or retry an identity verification session
1646
+ * @description Creates or resumes the authenticated user's Persona identity verification session without requesting an implicit enhanced upgrade, or starts a new inquiry when a failed verification is retryable. Check GET /v1/users/me: verification.status=retry and identity_verification requirements with retryable=true indicate eligibility. Overlapping REST session requests for the same user return 409 Conflict while a request is in progress. Retry the same POST after the first request completes. Temporary provider unavailability returns 503 VERIFICATION_TEMPORARILY_UNAVAILABLE with retryAfter (seconds). URLs and tokens may expire and are retrieved just in time. Returns 409 VERIFICATION_NOT_RETRYABLE for a permanent failure, VERIFICATION_UNDER_REVIEW while review is pending, VERIFICATION_ALREADY_VERIFIED when verified with no pending verification, or VERIFICATION_SESSION_UNAVAILABLE when unavailable. An existing pending step-up remains resumable; this call does not initiate a new step-up for an already verified user.
1647
1647
  */
1648
1648
  post: operations["postV1UsersMeVerification-sessions"];
1649
1649
  delete?: never;
@@ -2309,7 +2309,7 @@ interface paths {
2309
2309
  * Bypass KYC (sandbox only)
2310
2310
  * @description Simulate KYC verification for testing purposes. **Only available in sandbox environments** — returns 403 in production.
2311
2311
  *
2312
- * To simulate a successful verification, pass a `country` — the capability group to verify the user into. To simulate a failed check, pass `failed: true`. Exactly one of the two is required; an empty body is a 400.
2312
+ * To simulate a successful verification, pass a `country` — the capability group to verify the user into. To simulate a failed check, pass `failed: true`. Exactly one of the two is required; an empty body is a 400. Add `retryable: true` with `failed: true` to simulate a retryable documentary failure, then POST /v1/users/me/verification-sessions to obtain a new Persona sandbox session.
2313
2313
  *
2314
2314
  * `US` and `EU` can be simulated today. `CA` and `GB` are real capability groups with no sandbox fixture yet and return **501**, which is distinct from the **400** an unrecognised value gets.
2315
2315
  */
@@ -3943,7 +3943,7 @@ interface operations {
3943
3943
  /**
3944
3944
  * Format: date-time
3945
3945
  * @description Creation timestamp
3946
- * @example 2026-09-14T17:41:50.986Z
3946
+ * @example 2026-09-14T21:03:08.629Z
3947
3947
  */
3948
3948
  createdAt?: string;
3949
3949
  }[];
@@ -4108,7 +4108,7 @@ interface operations {
4108
4108
  "application/json": {
4109
4109
  /**
4110
4110
  * @description Destination account ID
4111
- * @example 6aa831de18ffc49a16151fc7
4111
+ * @example 6aa8610c7b1776d095a9389b
4112
4112
  */
4113
4113
  accountId: string;
4114
4114
  /**
@@ -4136,7 +4136,7 @@ interface operations {
4136
4136
  "application/x-www-form-urlencoded": {
4137
4137
  /**
4138
4138
  * @description Destination account ID
4139
- * @example 6aa831de18ffc49a16151fc7
4139
+ * @example 6aa8610c7b1776d095a9389b
4140
4140
  */
4141
4141
  accountId: string;
4142
4142
  /**
@@ -4164,7 +4164,7 @@ interface operations {
4164
4164
  "multipart/form-data": {
4165
4165
  /**
4166
4166
  * @description Destination account ID
4167
- * @example 6aa831de18ffc49a16151fc7
4167
+ * @example 6aa8610c7b1776d095a9389b
4168
4168
  */
4169
4169
  accountId: string;
4170
4170
  /**
@@ -4211,7 +4211,7 @@ interface operations {
4211
4211
  /**
4212
4212
  * Format: date-time
4213
4213
  * @description When the quote was created
4214
- * @example 2026-09-14T17:41:50.908Z
4214
+ * @example 2026-09-14T21:03:08.611Z
4215
4215
  */
4216
4216
  createdAt: string;
4217
4217
  /** @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. */
@@ -4250,7 +4250,7 @@ interface operations {
4250
4250
  rail: "ach_standard" | "ach_same_day" | "rtp" | "wire" | "eft" | "sepa" | "faster_payments" | "push_to_card" | "bill_pay" | "card_deposit";
4251
4251
  /**
4252
4252
  * @description Destination account ID
4253
- * @example 6aa831de18ffc49a16151fc8
4253
+ * @example 6aa8610c7b1776d095a9389c
4254
4254
  */
4255
4255
  accountId: string;
4256
4256
  /** @description True when this quote does not lock the destination amount. EUR quotes remain estimates; actual settlement is reported by the off-ramp resource. */
@@ -4507,7 +4507,7 @@ interface operations {
4507
4507
  /**
4508
4508
  * Format: date-time
4509
4509
  * @description When the quote was created
4510
- * @example 2026-09-14T17:41:50.908Z
4510
+ * @example 2026-09-14T21:03:08.611Z
4511
4511
  */
4512
4512
  createdAt: string;
4513
4513
  /** @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. */
@@ -4546,7 +4546,7 @@ interface operations {
4546
4546
  rail: "ach_standard" | "ach_same_day" | "rtp" | "wire" | "eft" | "sepa" | "faster_payments" | "push_to_card" | "bill_pay" | "card_deposit";
4547
4547
  /**
4548
4548
  * @description Destination account ID
4549
- * @example 6aa831de18ffc49a16151fc8
4549
+ * @example 6aa8610c7b1776d095a9389c
4550
4550
  */
4551
4551
  accountId: string;
4552
4552
  /** @description True when this quote does not lock the destination amount. EUR quotes remain estimates; actual settlement is reported by the off-ramp resource. */
@@ -5142,7 +5142,7 @@ interface operations {
5142
5142
  /**
5143
5143
  * Format: date-time
5144
5144
  * @description When the quote was created
5145
- * @example 2026-09-14T17:41:50.908Z
5145
+ * @example 2026-09-14T21:03:08.611Z
5146
5146
  */
5147
5147
  createdAt: string;
5148
5148
  /** @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. */
@@ -5181,7 +5181,7 @@ interface operations {
5181
5181
  rail: "ach_standard" | "ach_same_day" | "rtp" | "wire" | "eft" | "sepa" | "faster_payments" | "push_to_card" | "bill_pay" | "card_deposit";
5182
5182
  /**
5183
5183
  * @description Destination account ID
5184
- * @example 6aa831de18ffc49a16151fc8
5184
+ * @example 6aa8610c7b1776d095a9389c
5185
5185
  */
5186
5186
  accountId: string;
5187
5187
  /** @description True when this quote does not lock the destination amount. EUR quotes remain estimates; actual settlement is reported by the off-ramp resource. */
@@ -5484,7 +5484,7 @@ interface operations {
5484
5484
  currency: string;
5485
5485
  /**
5486
5486
  * @description Destination account ID
5487
- * @example 6aa831de18ffc49a16151fc9
5487
+ * @example 6aa8610c7b1776d095a9389d
5488
5488
  */
5489
5489
  accountId: string;
5490
5490
  /**
@@ -5775,7 +5775,7 @@ interface operations {
5775
5775
  currency: string;
5776
5776
  /**
5777
5777
  * @description Destination account ID
5778
- * @example 6aa831de18ffc49a16151fc9
5778
+ * @example 6aa8610c7b1776d095a9389d
5779
5779
  */
5780
5780
  accountId: string;
5781
5781
  /**
@@ -6016,7 +6016,7 @@ interface operations {
6016
6016
  method: "account";
6017
6017
  /**
6018
6018
  * @description Destination account to reissue the payout to. Omit to reuse the off-ramp's original destination account.
6019
- * @example 6aa831de18ffc49a16151fca
6019
+ * @example 6aa8610c7b1776d095a9389e
6020
6020
  */
6021
6021
  accountId?: string;
6022
6022
  };
@@ -6034,7 +6034,7 @@ interface operations {
6034
6034
  method: "account";
6035
6035
  /**
6036
6036
  * @description Destination account to reissue the payout to. Omit to reuse the off-ramp's original destination account.
6037
- * @example 6aa831de18ffc49a16151fca
6037
+ * @example 6aa8610c7b1776d095a9389e
6038
6038
  */
6039
6039
  accountId?: string;
6040
6040
  };
@@ -6052,7 +6052,7 @@ interface operations {
6052
6052
  method: "account";
6053
6053
  /**
6054
6054
  * @description Destination account to reissue the payout to. Omit to reuse the off-ramp's original destination account.
6055
- * @example 6aa831de18ffc49a16151fca
6055
+ * @example 6aa8610c7b1776d095a9389e
6056
6056
  */
6057
6057
  accountId?: string;
6058
6058
  };
@@ -6118,7 +6118,7 @@ interface operations {
6118
6118
  currency: string;
6119
6119
  /**
6120
6120
  * @description Destination account ID
6121
- * @example 6aa831de18ffc49a16151fc9
6121
+ * @example 6aa8610c7b1776d095a9389d
6122
6122
  */
6123
6123
  accountId: string;
6124
6124
  /**
@@ -17575,7 +17575,7 @@ interface operations {
17575
17575
  data: {
17576
17576
  /**
17577
17577
  * @description Unique identifier for the debit card
17578
- * @example 6aa831de18ffc49a16151fce
17578
+ * @example 6aa8610c7b1776d095a938a2
17579
17579
  */
17580
17580
  id: string;
17581
17581
  /** @enum {string} */
@@ -18023,7 +18023,7 @@ interface operations {
18023
18023
  "application/json": {
18024
18024
  /**
18025
18025
  * @description Unique identifier for the debit card
18026
- * @example 6aa831de18ffc49a16151fce
18026
+ * @example 6aa8610c7b1776d095a938a2
18027
18027
  */
18028
18028
  id: string;
18029
18029
  /** @enum {string} */
@@ -18240,7 +18240,7 @@ interface operations {
18240
18240
  "application/json": {
18241
18241
  /**
18242
18242
  * @description Unique identifier for the debit card
18243
- * @example 6aa831de18ffc49a16151fce
18243
+ * @example 6aa8610c7b1776d095a938a2
18244
18244
  */
18245
18245
  id: string;
18246
18246
  /** @enum {string} */
@@ -18761,7 +18761,7 @@ interface operations {
18761
18761
  "application/json": {
18762
18762
  /**
18763
18763
  * @description Unique identifier for the debit card
18764
- * @example 6aa831de18ffc49a16151fce
18764
+ * @example 6aa8610c7b1776d095a938a2
18765
18765
  */
18766
18766
  id: string;
18767
18767
  /** @enum {string} */
@@ -19683,7 +19683,7 @@ interface operations {
19683
19683
  accessToken: string;
19684
19684
  /**
19685
19685
  * @description The internal ID of the authorized user
19686
- * @example 6aa831df18ffc49a16151fd2
19686
+ * @example 6aa8610c7b1776d095a938a6
19687
19687
  */
19688
19688
  userId: string;
19689
19689
  /**
@@ -19699,7 +19699,7 @@ interface operations {
19699
19699
  /**
19700
19700
  * Format: date-time
19701
19701
  * @description ISO 8601 timestamp when token expires
19702
- * @example 2026-09-14T18:41:51.268Z
19702
+ * @example 2026-09-14T22:03:08.919Z
19703
19703
  */
19704
19704
  expiresAt: string;
19705
19705
  };
@@ -19898,7 +19898,7 @@ interface operations {
19898
19898
  /**
19899
19899
  * Format: date-time
19900
19900
  * @description ISO 8601 timestamp of when the integrator was created
19901
- * @example 2026-09-14T17:41:51.267Z
19901
+ * @example 2026-09-14T21:03:08.919Z
19902
19902
  */
19903
19903
  createdAt: string;
19904
19904
  };
@@ -20111,7 +20111,7 @@ interface operations {
20111
20111
  "application/json": {
20112
20112
  /**
20113
20113
  * @description The internal ID of the newly created user
20114
- * @example 6aa831df18ffc49a16151fd4
20114
+ * @example 6aa8610c7b1776d095a938a8
20115
20115
  */
20116
20116
  userId: string;
20117
20117
  /**
@@ -20386,7 +20386,7 @@ interface operations {
20386
20386
  depositId: string;
20387
20387
  /**
20388
20388
  * @description Spritz user ID associated with the returned deposit
20389
- * @example 6aa831df18ffc49a16151fd1
20389
+ * @example 6aa8610c7b1776d095a938a5
20390
20390
  */
20391
20391
  userId: string;
20392
20392
  /**
@@ -20598,7 +20598,7 @@ interface operations {
20598
20598
  depositId: string;
20599
20599
  /**
20600
20600
  * @description Spritz user ID associated with the returned deposit
20601
- * @example 6aa831df18ffc49a16151fd1
20601
+ * @example 6aa8610c7b1776d095a938a5
20602
20602
  */
20603
20603
  userId: string;
20604
20604
  /**
@@ -20791,7 +20791,7 @@ interface operations {
20791
20791
  "application/json": {
20792
20792
  /**
20793
20793
  * @description Unique identifier for the webhook
20794
- * @example 6aa831df18ffc49a16151fd3
20794
+ * @example 6aa8610c7b1776d095a938a7
20795
20795
  */
20796
20796
  id: string;
20797
20797
  /** @description List of event types this webhook is subscribed to */
@@ -21022,7 +21022,7 @@ interface operations {
21022
21022
  "application/json": {
21023
21023
  /**
21024
21024
  * @description Unique identifier for the webhook
21025
- * @example 6aa831df18ffc49a16151fd3
21025
+ * @example 6aa8610c7b1776d095a938a7
21026
21026
  */
21027
21027
  id: string;
21028
21028
  /** @description List of event types this webhook is subscribed to */
@@ -22990,7 +22990,7 @@ interface operations {
22990
22990
  "application/json": {
22991
22991
  /**
22992
22992
  * @description Unique identifier for the webhook
22993
- * @example 6aa831df18ffc49a16151fd3
22993
+ * @example 6aa8610c7b1776d095a938a7
22994
22994
  */
22995
22995
  id: string;
22996
22996
  /** @description List of event types this webhook is subscribed to */
@@ -23407,7 +23407,7 @@ interface operations {
23407
23407
  /**
23408
23408
  * Format: date-time
23409
23409
  * @description ISO 8601 timestamp when the old secret will expire. Only present if a grace period was specified.
23410
- * @example 2026-09-14T17:46:51.269Z
23410
+ * @example 2026-09-14T21:08:08.920Z
23411
23411
  */
23412
23412
  oldSecretExpiresAt?: string;
23413
23413
  };
@@ -23578,7 +23578,7 @@ interface operations {
23578
23578
  "application/json": {
23579
23579
  /**
23580
23580
  * @description Unique identifier for the user
23581
- * @example 6aa831df18ffc49a16151fcf
23581
+ * @example 6aa8610c7b1776d095a938a3
23582
23582
  */
23583
23583
  id: string;
23584
23584
  /**
@@ -23595,7 +23595,7 @@ interface operations {
23595
23595
  /**
23596
23596
  * Format: date-time
23597
23597
  * @description ISO 8601 timestamp of when the user was created
23598
- * @example 2026-09-14T17:41:51.209Z
23598
+ * @example 2026-09-14T21:03:08.911Z
23599
23599
  */
23600
23600
  signedUpAt: string;
23601
23601
  /**
@@ -23618,10 +23618,14 @@ interface operations {
23618
23618
  */
23619
23619
  mobile: boolean;
23620
23620
  }[];
23621
- /** @description User's identity verification status and any pending requirements */
23622
23621
  verification: {
23623
23622
  /** @enum {string} */
23624
- status: "not_started" | "verified" | "failed" | "disabled" | "retry";
23623
+ status: "not_started" | "verified" | "failed" | "disabled" | "retry" | "under_review";
23624
+ /**
23625
+ * @description Failure reason for failed, retry, or under_review identity verification; null otherwise. A pending re-verification never downgrades a verified identity or exposes its failure reason here.
23626
+ * @enum {string|null}
23627
+ */
23628
+ failureReason: "verify_sms" | "documentary_verification" | "risk_check" | "kyc_check" | "address_invalid" | "selfie_check" | "watchlist_screening" | "vpn_detected" | "duplicate_identity" | null;
23625
23629
  /**
23626
23630
  * @description ISO 3166-1 alpha-2 country code where user was verified
23627
23631
  * @example US
@@ -23649,6 +23653,8 @@ interface operations {
23649
23653
  /** @enum {string} */
23650
23654
  status: "not_started" | "pending" | "completed" | "failed";
23651
23655
  };
23656
+ /** @enum {string} */
23657
+ provider: "persona" | "plaid";
23652
23658
  };
23653
23659
  /** @description User's available capabilities and their requirements */
23654
23660
  capabilities: {
@@ -23961,7 +23967,7 @@ interface operations {
23961
23967
  "application/json": {
23962
23968
  /**
23963
23969
  * @description Unique identifier for the user
23964
- * @example 6aa831df18ffc49a16151fcf
23970
+ * @example 6aa8610c7b1776d095a938a3
23965
23971
  */
23966
23972
  id: string;
23967
23973
  /**
@@ -23978,7 +23984,7 @@ interface operations {
23978
23984
  /**
23979
23985
  * Format: date-time
23980
23986
  * @description ISO 8601 timestamp of when the user was created
23981
- * @example 2026-09-14T17:41:51.209Z
23987
+ * @example 2026-09-14T21:03:08.911Z
23982
23988
  */
23983
23989
  signedUpAt: string;
23984
23990
  /**
@@ -24004,7 +24010,12 @@ interface operations {
24004
24010
  /** @description User's identity verification status and any pending requirements */
24005
24011
  verification: {
24006
24012
  /** @enum {string} */
24007
- status: "not_started" | "verified" | "failed" | "disabled" | "retry";
24013
+ status: "not_started" | "verified" | "failed" | "disabled" | "retry" | "under_review";
24014
+ /**
24015
+ * @description Failure reason for failed, retry, or under_review identity verification; null otherwise. A pending re-verification never downgrades a verified identity or exposes its failure reason here.
24016
+ * @enum {string|null}
24017
+ */
24018
+ failureReason: "verify_sms" | "documentary_verification" | "risk_check" | "kyc_check" | "address_invalid" | "selfie_check" | "watchlist_screening" | "vpn_detected" | "duplicate_identity" | null;
24008
24019
  /**
24009
24020
  * @description ISO 3166-1 alpha-2 country code where user was verified
24010
24021
  * @example US
@@ -24445,7 +24456,7 @@ interface operations {
24445
24456
  "application/json": {
24446
24457
  /**
24447
24458
  * @description Unique identifier for the user
24448
- * @example 6aa831df18ffc49a16151fcf
24459
+ * @example 6aa8610c7b1776d095a938a3
24449
24460
  */
24450
24461
  id: string;
24451
24462
  /**
@@ -24462,7 +24473,7 @@ interface operations {
24462
24473
  /**
24463
24474
  * Format: date-time
24464
24475
  * @description ISO 8601 timestamp of when the user was created
24465
- * @example 2026-09-14T17:41:51.209Z
24476
+ * @example 2026-09-14T21:03:08.911Z
24466
24477
  */
24467
24478
  signedUpAt: string;
24468
24479
  /**
@@ -24488,7 +24499,12 @@ interface operations {
24488
24499
  /** @description User's identity verification status and any pending requirements */
24489
24500
  verification: {
24490
24501
  /** @enum {string} */
24491
- status: "not_started" | "verified" | "failed" | "disabled" | "retry";
24502
+ status: "not_started" | "verified" | "failed" | "disabled" | "retry" | "under_review";
24503
+ /**
24504
+ * @description Failure reason for failed, retry, or under_review identity verification; null otherwise. A pending re-verification never downgrades a verified identity or exposes its failure reason here.
24505
+ * @enum {string|null}
24506
+ */
24507
+ failureReason: "verify_sms" | "documentary_verification" | "risk_check" | "kyc_check" | "address_invalid" | "selfie_check" | "watchlist_screening" | "vpn_detected" | "duplicate_identity" | null;
24492
24508
  /**
24493
24509
  * @description ISO 3166-1 alpha-2 country code where user was verified
24494
24510
  * @example US
@@ -34183,6 +34199,8 @@ interface operations {
34183
34199
  * @enum {string}
34184
34200
  */
34185
34201
  country?: "US" | "CA" | "EU" | "GB";
34202
+ /** @description With failed=true, allow retry through POST /v1/users/me/verification-sessions. Defaults to false. */
34203
+ retryable?: boolean;
34186
34204
  /** @description Set to true to simulate a failed KYC check */
34187
34205
  failed?: boolean;
34188
34206
  };
@@ -34200,6 +34218,8 @@ interface operations {
34200
34218
  * @enum {string}
34201
34219
  */
34202
34220
  country?: "US" | "CA" | "EU" | "GB";
34221
+ /** @description With failed=true, allow retry through POST /v1/users/me/verification-sessions. Defaults to false. */
34222
+ retryable?: boolean;
34203
34223
  /** @description Set to true to simulate a failed KYC check */
34204
34224
  failed?: boolean;
34205
34225
  };
@@ -34217,6 +34237,8 @@ interface operations {
34217
34237
  * @enum {string}
34218
34238
  */
34219
34239
  country?: "US" | "CA" | "EU" | "GB";
34240
+ /** @description With failed=true, allow retry through POST /v1/users/me/verification-sessions. Defaults to false. */
34241
+ retryable?: boolean;
34220
34242
  /** @description Set to true to simulate a failed KYC check */
34221
34243
  failed?: boolean;
34222
34244
  };
@@ -39208,11 +39230,13 @@ type PathParams<P extends RestPath, M extends RestMethod<P>> = paths[P][M] exten
39208
39230
 
39209
39231
  type RestQueryValue = string | number | boolean | undefined;
39210
39232
  type RestQuery = Record<string, RestQueryValue>;
39233
+ type RestHeaders = Record<string, string>;
39211
39234
  type RestRoute<P extends RestPath = RestPath, M extends RestMethod<P> = RestMethod<P>> = {
39212
39235
  method: M;
39213
39236
  path: string;
39214
39237
  body?: PathRequestBody<P, M>;
39215
39238
  query?: RestQuery;
39239
+ headers?: RestHeaders;
39216
39240
  };
39217
39241
 
39218
39242
  type GraphQLVariables = Record<string, unknown>;
@@ -39243,11 +39267,12 @@ declare class SpritzClient {
39243
39267
  body?: Request | undefined;
39244
39268
  }): Promise<Response>;
39245
39269
  restApi<P extends RestPath, M extends RestMethod<P>>(route: RestRoute<P, M>): Promise<PathResponse<P, M>>;
39246
- restApi<Response, Request = unknown>({ method, path, body, query, }: {
39270
+ restApi<Response, Request = unknown>({ method, path, body, query, headers, }: {
39247
39271
  method: HttpMethod;
39248
39272
  path: string;
39249
39273
  body?: Request | undefined;
39250
39274
  query?: RestQuery;
39275
+ headers?: RestHeaders;
39251
39276
  }): Promise<Response>;
39252
39277
  sendQuery({ query: documentNodeQuery, variables: inputVariables, }: QueryParams<GraphQLVariables>): Promise<{
39253
39278
  response: Response;
@@ -39269,11 +39294,12 @@ declare class SpritzClient {
39269
39294
  requestId: string | null;
39270
39295
  };
39271
39296
  }>;
39272
- sendRestApiRequest({ method, path, body, query, }: {
39297
+ sendRestApiRequest({ method, path, body, query, headers, }: {
39273
39298
  method: HttpMethod;
39274
39299
  path: string;
39275
39300
  body: unknown | undefined;
39276
39301
  query?: RestQuery;
39302
+ headers?: RestHeaders;
39277
39303
  }): Promise<{
39278
39304
  response: Response;
39279
39305
  controller: AbortController;
@@ -41137,6 +41163,15 @@ type PrepareDepositRequest = PathRequestBody<'/v1/deposits/direct/prepare', 'pos
41137
41163
  type PrepareDepositResponse = PathResponse<'/v1/deposits/direct/prepare', 'post'>;
41138
41164
  type CreateDepositRequest = PathRequestBody<'/v1/deposits/direct', 'post'>;
41139
41165
  type Deposit = PathResponse<'/v1/deposits/direct', 'post'>;
41166
+ /**
41167
+ * `idempotencyKey` is required by `POST /v1/deposits/direct`: persist one
41168
+ * unique key per deposit intent before calling `create`, and reuse the exact
41169
+ * same key and body to recover the original response after a timeout or lost
41170
+ * reply instead of authorizing a second debit.
41171
+ */
41172
+ type CreateDepositOptions = {
41173
+ idempotencyKey: string;
41174
+ };
41140
41175
  declare class DepositService {
41141
41176
  private client;
41142
41177
  constructor(client: SpritzClient);
@@ -41176,7 +41211,7 @@ declare class DepositService {
41176
41211
  destinationAddress: string;
41177
41212
  };
41178
41213
  }>;
41179
- create(input: CreateDepositRequest): Promise<{
41214
+ create(input: CreateDepositRequest, options: CreateDepositOptions): Promise<{
41180
41215
  id: string;
41181
41216
  sourceId: string;
41182
41217
  onRampId: string | null;
@@ -41317,9 +41352,12 @@ declare class SandboxService {
41317
41352
  * receiving account. The deposit settles into the `returned` lifecycle with
41318
41353
  * the supplied NACHA `code` so end-to-end return handling can be tested.
41319
41354
  *
41355
+ * Like `deposit.create`, `POST /v1/sandbox/deposits/direct` requires an
41356
+ * `idempotency-key`; reuse the same key and body to replay after a timeout.
41357
+ *
41320
41358
  * Only available in sandbox environments — returns 403 in production.
41321
41359
  */
41322
- createDepositWithReturn(input: CreateDepositWithReturnRequest): Promise<{
41360
+ createDepositWithReturn(input: CreateDepositWithReturnRequest, options: CreateDepositOptions): Promise<{
41323
41361
  id: string;
41324
41362
  sourceId: string;
41325
41363
  onRampId: string | null;
@@ -41813,7 +41851,8 @@ declare class UserService {
41813
41851
  mobile: boolean;
41814
41852
  }[];
41815
41853
  verification: {
41816
- status: "not_started" | "verified" | "failed" | "disabled" | "retry";
41854
+ status: "not_started" | "verified" | "failed" | "disabled" | "retry" | "under_review";
41855
+ failureReason: "verify_sms" | "documentary_verification" | "risk_check" | "kyc_check" | "address_invalid" | "selfie_check" | "watchlist_screening" | "vpn_detected" | "duplicate_identity" | null;
41817
41856
  country: string | null;
41818
41857
  requirement?: {
41819
41858
  type: "identity_verification" | "terms_acceptance" | "additional_verification" | "document_submission" | "region_restriction" | "regional_compliance";
@@ -41822,6 +41861,7 @@ declare class UserService {
41822
41861
  retryable?: boolean;
41823
41862
  status: "not_started" | "pending" | "completed" | "failed";
41824
41863
  };
41864
+ provider: "persona" | "plaid";
41825
41865
  };
41826
41866
  capabilities: {
41827
41867
  product: "fiat_to_crypto" | "crypto_to_fiat" | "bill_pay" | "crypto_card";
@@ -42137,4 +42177,4 @@ declare class InternalServerError extends APIError {
42137
42177
  }
42138
42178
 
42139
42179
  export { APIConnectionError, APIConnectionTimeoutError, APIError, APIUserAbortError, AmountMode, AuthenticationError, BadRequestError, BankAccountSubType, BankAccountType, BillType, CardFeatureType, ConflictError, DebitCardNetwork, Environment, InternalServerError, NotFoundError, OfframpFeatureType, OnrampFeatureType, PayableAccountType, PaymentDeliveryMethod, PaymentNetwork, DirectPaymentStatus as PaymentRequestStatus, PaymentStatus, PermissionDeniedError, RateLimitError, RequirementType, SpritzApiClient, SpritzApiError, UnprocessableEntityError, VirtualCardType, onrampSupportedTokens };
42140
- export type { AccountPayments, AccountPaymentsVariables, AccountPayments_paymentsForAccount, AccountPayments_paymentsForAccount_transaction, AchDebitReturn, AchDebitReturnListQuery, AchDebitReturnListResponse, BankAccount, BankAccountFragment, BankAccountFragment_bankAccountDetails, BankAccountFragment_bankAccountDetails_CanadianBankAccountDetails, BankAccountFragment_bankAccountDetails_USBankAccountDetails, BankAccountFragment_institution, BankAccountFragment_paymentAddresses, BankAccountInput, BankAccountList, BillFragment, BillFragment_billAccountDetails, BillFragment_dataSync, BillFragment_institution, BillFragment_paymentAddresses, BypassKycRequest, CategoryAccess, ClientOptions, CompleteLinkingRequest, CompleteLinkingResponse, CreateBankAccountInput, CreateBankAccountResponse, CreateDepositRequest, CreateDepositWithReturnRequest, CreateDepositWithReturnResponse, CreateDirectPaymentInput, CreateOnrampPaymentInput, CreatePaymentRequestInput, CreateVirtualAccountInput, CreateWebhookParams, CurrentUser, CurrentUser_me, CurrentUser_verification, CurrentUser_verification_identity, CurrentUser_verification_identity_verificationMetadata, CurrentUser_verification_identity_verificationMetadata_details, DebitCardFragment, DebitCardInput, DeleteBankAccountResponse, DeleteFundingSourceResponse, Deposit, FullBridgeUser, FundingSource, FundingSourceDepositLimits, GetSolanaPayParams, GetSolanaPayParamsVariables, GetSolanaPayParams_solanaParams, GetSpritzPayParams, GetSpritzPayParamsVariables, GetSpritzPayParams_spritzPayParams, IntegratorWebhook, KycStatus, LinkTokenResponse, OffRampRefundRequest, OffRampRefundResponse, OnRamp, OnRampDetail, OnRampListQuery, OnRampListResponse, OnrampPaymentFragment, OnrampPaymentFragment_depositInstructions, OnrampPayments, OnrampPayments_onrampPayments, OnrampPayments_onrampPayments_depositInstructions, PathParams, PathQuery, PathRequestBody, PathResponse, PayableAccountFragment, PayableAccountFragment_BankAccount, PayableAccountFragment_BankAccount_bankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_CanadianBankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_USBankAccountDetails, PayableAccountFragment_BankAccount_dataSync, PayableAccountFragment_BankAccount_institution, PayableAccountFragment_Bill, PayableAccountFragment_Bill_billAccountDetails, PayableAccountFragment_Bill_dataSync, PayableAccountFragment_Bill_institution, PayableAccountFragment_DebitCard, PayableAccountFragment_DebitCard_dataSync, PayableAccountFragment_DebitCard_institution, PayableAccountFragment_VirtualCard, PayableAccountFragment_VirtualCard_billingInfo, PayableAccountFragment_VirtualCard_billingInfo_address, PayableAccountFragment_VirtualCard_dataSync, PayableAccountFragment_VirtualCard_institution, PayableAccountInstitutionFragment, Payment, PaymentFragment, PaymentFragment_transaction, PaymentLimits, PaymentLimitsResponse, PaymentLimitsVariables, PaymentLimits_paymentLimits, PaymentRequestFragment, PaymentRequestPayment, PaymentRequestPaymentVariables, PaymentRequestPayment_paymentForPaymentRequest, PaymentRequestPayment_paymentForPaymentRequest_transaction, PaymentVariables, Payment_payment, Payment_payment_transaction, PopularBillInstitutions, PopularBillInstitutionsVariables, PopularBillInstitutions_popularUSBillInstitutions, PrepareDepositRequest, PrepareDepositResponse, Requirement, operations as RestApiOperations, paths as RestApiPaths, SearchUSBillInstitutions, SearchUSBillInstitutionsVariables, SearchUSBillInstitutions_searchUSBillInstitutions, TokenBalanceFragment, UpdateWebhookParams, UpdateWebhookSecretResponse, UserAccess, UserAccessCapabilities, UserAccess_bridgeUser, UserAccess_me, UserAccess_verification, UserAccess_verification_identity, UserAccess_verification_identity_verificationMetadata, UserAccess_verification_identity_verificationMetadata_details, UserBankAccounts, UserBankAccounts_bankAccounts, UserBankAccounts_bankAccounts_bankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_CanadianBankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_USBankAccountDetails, UserBankAccounts_bankAccounts_institution, UserBankAccounts_bankAccounts_paymentAddresses, UserBills, UserBills_bills, UserBills_bills_billAccountDetails, UserBills_bills_dataSync, UserBills_bills_institution, UserBills_bills_paymentAddresses, UserDebitCards, UserDebitCards_debitCards, UserFragment, UserPayableAccounts, UserPayableAccounts_payableAccounts, UserPayableAccounts_payableAccounts_BankAccount, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_CanadianBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_USBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_dataSync, UserPayableAccounts_payableAccounts_BankAccount_institution, UserPayableAccounts_payableAccounts_Bill, UserPayableAccounts_payableAccounts_Bill_billAccountDetails, UserPayableAccounts_payableAccounts_Bill_dataSync, UserPayableAccounts_payableAccounts_Bill_institution, UserPayableAccounts_payableAccounts_DebitCard, UserPayableAccounts_payableAccounts_DebitCard_dataSync, UserPayableAccounts_payableAccounts_DebitCard_institution, UserPayableAccounts_payableAccounts_VirtualCard, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo_address, UserPayableAccounts_payableAccounts_VirtualCard_dataSync, UserPayableAccounts_payableAccounts_VirtualCard_institution, UserProfile, UserVerification, UserVerification_verification, UserVerification_verification_identity, UserVerification_verification_identity_user, UserVerification_verification_identity_verificationMetadata, UserVerification_verification_identity_verificationMetadata_details, UserVirtualDebitCard, UserVirtualDebitCard_virtualDebitCard, UserVirtualDebitCard_virtualDebitCard_billingInfo, UserVirtualDebitCard_virtualDebitCard_billingInfo_address, UserVirtualDebitCard_virtualDebitCard_paymentAddresses, VerificationFragment, VerificationFragment_identity, VerificationFragment_identity_verificationMetadata, VerificationFragment_identity_verificationMetadata_details, VerificationSession, VirtualAccountFragment, VirtualAccountFragment_depositInstructions, VirtualAccounts, VirtualAccounts_virtualAccounts, VirtualAccounts_virtualAccounts_depositInstructions, VirtualDebitCardFragment, VirtualDebitCardFragment_billingInfo, VirtualDebitCardFragment_billingInfo_address, VirtualDebitCardFragment_paymentAddresses, WalletTokenBalances, WalletTokenBalancesVariables, WalletTokenBalances_tokenBalances, WebhookEvent };
42180
+ export type { AccountPayments, AccountPaymentsVariables, AccountPayments_paymentsForAccount, AccountPayments_paymentsForAccount_transaction, AchDebitReturn, AchDebitReturnListQuery, AchDebitReturnListResponse, BankAccount, BankAccountFragment, BankAccountFragment_bankAccountDetails, BankAccountFragment_bankAccountDetails_CanadianBankAccountDetails, BankAccountFragment_bankAccountDetails_USBankAccountDetails, BankAccountFragment_institution, BankAccountFragment_paymentAddresses, BankAccountInput, BankAccountList, BillFragment, BillFragment_billAccountDetails, BillFragment_dataSync, BillFragment_institution, BillFragment_paymentAddresses, BypassKycRequest, CategoryAccess, ClientOptions, CompleteLinkingRequest, CompleteLinkingResponse, CreateBankAccountInput, CreateBankAccountResponse, CreateDepositOptions, CreateDepositRequest, CreateDepositWithReturnRequest, CreateDepositWithReturnResponse, CreateDirectPaymentInput, CreateOnrampPaymentInput, CreatePaymentRequestInput, CreateVirtualAccountInput, CreateWebhookParams, CurrentUser, CurrentUser_me, CurrentUser_verification, CurrentUser_verification_identity, CurrentUser_verification_identity_verificationMetadata, CurrentUser_verification_identity_verificationMetadata_details, DebitCardFragment, DebitCardInput, DeleteBankAccountResponse, DeleteFundingSourceResponse, Deposit, FullBridgeUser, FundingSource, FundingSourceDepositLimits, GetSolanaPayParams, GetSolanaPayParamsVariables, GetSolanaPayParams_solanaParams, GetSpritzPayParams, GetSpritzPayParamsVariables, GetSpritzPayParams_spritzPayParams, IntegratorWebhook, KycStatus, LinkTokenResponse, OffRampRefundRequest, OffRampRefundResponse, OnRamp, OnRampDetail, OnRampListQuery, OnRampListResponse, OnrampPaymentFragment, OnrampPaymentFragment_depositInstructions, OnrampPayments, OnrampPayments_onrampPayments, OnrampPayments_onrampPayments_depositInstructions, PathParams, PathQuery, PathRequestBody, PathResponse, PayableAccountFragment, PayableAccountFragment_BankAccount, PayableAccountFragment_BankAccount_bankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_CanadianBankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_USBankAccountDetails, PayableAccountFragment_BankAccount_dataSync, PayableAccountFragment_BankAccount_institution, PayableAccountFragment_Bill, PayableAccountFragment_Bill_billAccountDetails, PayableAccountFragment_Bill_dataSync, PayableAccountFragment_Bill_institution, PayableAccountFragment_DebitCard, PayableAccountFragment_DebitCard_dataSync, PayableAccountFragment_DebitCard_institution, PayableAccountFragment_VirtualCard, PayableAccountFragment_VirtualCard_billingInfo, PayableAccountFragment_VirtualCard_billingInfo_address, PayableAccountFragment_VirtualCard_dataSync, PayableAccountFragment_VirtualCard_institution, PayableAccountInstitutionFragment, Payment, PaymentFragment, PaymentFragment_transaction, PaymentLimits, PaymentLimitsResponse, PaymentLimitsVariables, PaymentLimits_paymentLimits, PaymentRequestFragment, PaymentRequestPayment, PaymentRequestPaymentVariables, PaymentRequestPayment_paymentForPaymentRequest, PaymentRequestPayment_paymentForPaymentRequest_transaction, PaymentVariables, Payment_payment, Payment_payment_transaction, PopularBillInstitutions, PopularBillInstitutionsVariables, PopularBillInstitutions_popularUSBillInstitutions, PrepareDepositRequest, PrepareDepositResponse, Requirement, operations as RestApiOperations, paths as RestApiPaths, SearchUSBillInstitutions, SearchUSBillInstitutionsVariables, SearchUSBillInstitutions_searchUSBillInstitutions, TokenBalanceFragment, UpdateWebhookParams, UpdateWebhookSecretResponse, UserAccess, UserAccessCapabilities, UserAccess_bridgeUser, UserAccess_me, UserAccess_verification, UserAccess_verification_identity, UserAccess_verification_identity_verificationMetadata, UserAccess_verification_identity_verificationMetadata_details, UserBankAccounts, UserBankAccounts_bankAccounts, UserBankAccounts_bankAccounts_bankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_CanadianBankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_USBankAccountDetails, UserBankAccounts_bankAccounts_institution, UserBankAccounts_bankAccounts_paymentAddresses, UserBills, UserBills_bills, UserBills_bills_billAccountDetails, UserBills_bills_dataSync, UserBills_bills_institution, UserBills_bills_paymentAddresses, UserDebitCards, UserDebitCards_debitCards, UserFragment, UserPayableAccounts, UserPayableAccounts_payableAccounts, UserPayableAccounts_payableAccounts_BankAccount, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_CanadianBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_USBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_dataSync, UserPayableAccounts_payableAccounts_BankAccount_institution, UserPayableAccounts_payableAccounts_Bill, UserPayableAccounts_payableAccounts_Bill_billAccountDetails, UserPayableAccounts_payableAccounts_Bill_dataSync, UserPayableAccounts_payableAccounts_Bill_institution, UserPayableAccounts_payableAccounts_DebitCard, UserPayableAccounts_payableAccounts_DebitCard_dataSync, UserPayableAccounts_payableAccounts_DebitCard_institution, UserPayableAccounts_payableAccounts_VirtualCard, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo_address, UserPayableAccounts_payableAccounts_VirtualCard_dataSync, UserPayableAccounts_payableAccounts_VirtualCard_institution, UserProfile, UserVerification, UserVerification_verification, UserVerification_verification_identity, UserVerification_verification_identity_user, UserVerification_verification_identity_verificationMetadata, UserVerification_verification_identity_verificationMetadata_details, UserVirtualDebitCard, UserVirtualDebitCard_virtualDebitCard, UserVirtualDebitCard_virtualDebitCard_billingInfo, UserVirtualDebitCard_virtualDebitCard_billingInfo_address, UserVirtualDebitCard_virtualDebitCard_paymentAddresses, VerificationFragment, VerificationFragment_identity, VerificationFragment_identity_verificationMetadata, VerificationFragment_identity_verificationMetadata_details, VerificationSession, VirtualAccountFragment, VirtualAccountFragment_depositInstructions, VirtualAccounts, VirtualAccounts_virtualAccounts, VirtualAccounts_virtualAccounts_depositInstructions, VirtualDebitCardFragment, VirtualDebitCardFragment_billingInfo, VirtualDebitCardFragment_billingInfo_address, VirtualDebitCardFragment_paymentAddresses, WalletTokenBalances, WalletTokenBalancesVariables, WalletTokenBalances_tokenBalances, WebhookEvent };