@delopay/sdk 0.280.0 → 0.289.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.
@@ -2782,6 +2782,29 @@ var Payments = class {
2782
2782
  body: params ?? {}
2783
2783
  });
2784
2784
  }
2785
+ /**
2786
+ * Mark a payment as an integration test, or remove the mark.
2787
+ *
2788
+ * A marked payment stays live or test as it was; only analytics leave it
2789
+ * out, from their next refresh on. Every change is recorded in the
2790
+ * payment's status history with the person who made it. Needs a dashboard
2791
+ * JWT with write access to transactions. Asking for the mark the payment
2792
+ * already carries changes nothing (`changed: false`).
2793
+ *
2794
+ * `POST /payments/{paymentId}/integration-test`
2795
+ *
2796
+ * @example
2797
+ * ```typescript
2798
+ * const { is_integration_test } = await delopay.payments.setIntegrationTest('pay_123', {
2799
+ * is_integration_test: true,
2800
+ * });
2801
+ * ```
2802
+ */
2803
+ async setIntegrationTest(paymentId, params) {
2804
+ return this.request("POST", `/payments/${encodeURIComponent(paymentId)}/integration-test`, {
2805
+ body: params
2806
+ });
2807
+ }
2785
2808
  /**
2786
2809
  * List payment intents, optionally filtered by customer or date range.
2787
2810
  *
@@ -4945,6 +4968,49 @@ var Users = class {
4945
4968
  body: params
4946
4969
  });
4947
4970
  }
4971
+ /**
4972
+ * A member's permission overrides in your merchant: every area that can be
4973
+ * overridden at their level, with what their roles give, the level set for
4974
+ * them, and what they have. `GET /user/employees/{user_id}/permission-overrides`
4975
+ *
4976
+ * Needs the *Users* read permission, and answers only for a member
4977
+ * `listUsersInLineage` shows you (any other id is a 404 `UR_68`).
4978
+ * `can_edit`, `can_raise` and each area's `grantable_level` say what you
4979
+ * may change.
4980
+ */
4981
+ async getMemberPermissionOverrides(userId) {
4982
+ return this.request(
4983
+ "GET",
4984
+ `/user/employees/${encodeURIComponent(userId)}/permission-overrides`
4985
+ );
4986
+ }
4987
+ /**
4988
+ * Replace a member's permission overrides. An area left out goes back to
4989
+ * what their roles give. `PUT /user/employees/{user_id}/permission-overrides`
4990
+ *
4991
+ * Needs the *Users* write permission and a member within your reach, other
4992
+ * than yourself. Keeping or lowering is always allowed; a gain must stay
4993
+ * within what you hold in that area, and a gain above the member's roles
4994
+ * needs `can_raise`. The change is audited and applies to the member's next
4995
+ * request. A refusal is a `UR_68` whose `data` is
4996
+ * `{ reason: 'permission_overrides', refusal }` (see
4997
+ * {@link PermissionOverrideRefusal}).
4998
+ */
4999
+ async updateMemberPermissionOverrides(userId, params) {
5000
+ return this.request(
5001
+ "PUT",
5002
+ `/user/employees/${encodeURIComponent(userId)}/permission-overrides`,
5003
+ { body: params }
5004
+ );
5005
+ }
5006
+ /**
5007
+ * The permission overrides your own session acts under, sorted by area.
5008
+ * An area named here has exactly that level, whatever a broader legacy area
5009
+ * of the role would suggest. `GET /user/role/permission-overrides`
5010
+ */
5011
+ async getOwnPermissionOverrides() {
5012
+ return this.request("GET", "/user/role/permission-overrides");
5013
+ }
4948
5014
  /** Sign in via OIDC. `POST /user/oidc` */
4949
5015
  async signInOidc(params) {
4950
5016
  return this.request("POST", "/user/oidc", { body: params });
@@ -5139,6 +5205,150 @@ var Verification = class {
5139
5205
  }
5140
5206
  };
5141
5207
 
5208
+ // src/resources/identityVerifications.ts
5209
+ var IdentityVerifications = class {
5210
+ constructor(request) {
5211
+ this.request = request;
5212
+ }
5213
+ /**
5214
+ * Start a verification of a person or a business. The provider-side
5215
+ * workflow decides the checks. With a `return_url`, the provider's session
5216
+ * is created at once and its page returned in `verification_url`. With a
5217
+ * `payment_id` and no `return_url`, the payment's checkout starts it.
5218
+ *
5219
+ * `POST /identity-verifications`
5220
+ */
5221
+ async create(params, options) {
5222
+ return this.request("POST", "/identity-verifications", { body: params, ...options });
5223
+ }
5224
+ /**
5225
+ * The merchant's verifications, newest first. A caller limited to one shop
5226
+ * sees that shop's only.
5227
+ *
5228
+ * `GET /identity-verifications`
5229
+ */
5230
+ async list(query, options) {
5231
+ return this.request("GET", "/identity-verifications", {
5232
+ query,
5233
+ ...options
5234
+ });
5235
+ }
5236
+ /**
5237
+ * One verification. With `force_sync: true`, a verification the provider
5238
+ * can still change (pending or in review, or a subject under ongoing AML
5239
+ * monitoring) is read from the provider first.
5240
+ *
5241
+ * `GET /identity-verifications/{verification_id}`
5242
+ */
5243
+ async retrieve(verificationId, query, options) {
5244
+ return this.request("GET", `/identity-verifications/${encodeURIComponent(verificationId)}`, {
5245
+ query,
5246
+ ...options
5247
+ });
5248
+ }
5249
+ /**
5250
+ * A subject's latest verification in one environment (live unless
5251
+ * `test_mode: true`), with its checks, and the subject's verification under
5252
+ * ongoing AML monitoring. This is what risk rules read. `verification` and
5253
+ * `aml_monitoring` are `null` when the subject has none.
5254
+ *
5255
+ * `GET /identity-verifications/subjects/{subject_reference}`
5256
+ */
5257
+ async subject(subjectReference, query, options) {
5258
+ return this.request(
5259
+ "GET",
5260
+ `/identity-verifications/subjects/${encodeURIComponent(subjectReference)}`,
5261
+ { query, ...options }
5262
+ );
5263
+ }
5264
+ /**
5265
+ * The provider-side workflows an account can run in one environment, read
5266
+ * from the provider with that environment's credentials. Pass a `flow_id`
5267
+ * as `provider_flow_id` to {@link IdentityVerifications.create}.
5268
+ *
5269
+ * `GET /identity-verifications/accounts/{merchant_connector_id}/flows`
5270
+ */
5271
+ async flows(merchantConnectorId, query, options) {
5272
+ return this.request(
5273
+ "GET",
5274
+ `/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/flows`,
5275
+ { query, ...options }
5276
+ );
5277
+ }
5278
+ /**
5279
+ * Switch ongoing AML monitoring of a verification's subject. The provider
5280
+ * then keeps re-screening the subject against sanctions, PEP and
5281
+ * adverse-media lists, and every change it reports is recorded. Only a
5282
+ * verified person or business can be enrolled; monitoring can be switched
5283
+ * off at any time. Needs permission to edit customers.
5284
+ *
5285
+ * `POST /identity-verifications/{verification_id}/aml-monitoring`
5286
+ */
5287
+ async setAmlMonitoring(verificationId, params, options) {
5288
+ return this.request(
5289
+ "POST",
5290
+ `/identity-verifications/${encodeURIComponent(verificationId)}/aml-monitoring`,
5291
+ { body: params, ...options }
5292
+ );
5293
+ }
5294
+ /**
5295
+ * Every change of the subject's AML result the provider reported while the
5296
+ * subject was monitored, newest first, at most 100.
5297
+ *
5298
+ * `GET /identity-verifications/{verification_id}/aml-events`
5299
+ */
5300
+ async amlEvents(verificationId, options) {
5301
+ return this.request(
5302
+ "GET",
5303
+ `/identity-verifications/${encodeURIComponent(verificationId)}/aml-events`,
5304
+ options
5305
+ );
5306
+ }
5307
+ /**
5308
+ * A payment's screening by the transaction monitoring of the shop's
5309
+ * screening account. Recorded only: it never holds or refuses the payment.
5310
+ * Answers 404 when the payment has no screening. Needs permission to read
5311
+ * payments.
5312
+ *
5313
+ * `GET /identity-verifications/payment-screenings/{payment_id}`
5314
+ */
5315
+ async paymentScreening(paymentId, options) {
5316
+ return this.request(
5317
+ "GET",
5318
+ `/identity-verifications/payment-screenings/${encodeURIComponent(paymentId)}`,
5319
+ options
5320
+ );
5321
+ }
5322
+ /**
5323
+ * Whether an account screens its shop's payments. Needs permission to read
5324
+ * connectors.
5325
+ *
5326
+ * `GET /identity-verifications/accounts/{merchant_connector_id}/payment-screening`
5327
+ */
5328
+ async paymentScreeningSetting(merchantConnectorId, options) {
5329
+ return this.request(
5330
+ "GET",
5331
+ `/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/payment-screening`,
5332
+ options
5333
+ );
5334
+ }
5335
+ /**
5336
+ * Switch screening of the account's shop's payments. Switched on, every
5337
+ * payment of the shop that succeeds from then on is screened shortly after,
5338
+ * in the payment's own environment. A shop has at most one screening
5339
+ * account. Needs permission to edit connectors.
5340
+ *
5341
+ * `PUT /identity-verifications/accounts/{merchant_connector_id}/payment-screening`
5342
+ */
5343
+ async updatePaymentScreeningSetting(merchantConnectorId, params, options) {
5344
+ return this.request(
5345
+ "PUT",
5346
+ `/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/payment-screening`,
5347
+ { body: params, ...options }
5348
+ );
5349
+ }
5350
+ };
5351
+
5142
5352
  // src/resources/webhooks.ts
5143
5353
  function isSubscriptionLifecycleWebhook(object) {
5144
5354
  return typeof object.transition_id === "string";
@@ -5875,6 +6085,110 @@ var ShopLabels = class {
5875
6085
  }
5876
6086
  };
5877
6087
 
6088
+ // src/resources/checkoutTemplates.ts
6089
+ var CheckoutTemplates = class {
6090
+ constructor(request) {
6091
+ this.request = request;
6092
+ }
6093
+ /**
6094
+ * The merchant's templates, each with the shops on it and whether each
6095
+ * runs the template's current settings.
6096
+ * `GET /checkout-templates/{merchantId}`
6097
+ */
6098
+ async list(merchantId) {
6099
+ return this.request("GET", `/checkout-templates/${encodeURIComponent(merchantId)}`);
6100
+ }
6101
+ /**
6102
+ * Create a template, empty or copied from a shop's current settings. The
6103
+ * shop copied from is not changed.
6104
+ * `POST /checkout-templates/{merchantId}`
6105
+ */
6106
+ async create(merchantId, params) {
6107
+ return this.request("POST", `/checkout-templates/${encodeURIComponent(merchantId)}`, {
6108
+ body: params
6109
+ });
6110
+ }
6111
+ /** `GET /checkout-templates/{merchantId}/{templateId}` */
6112
+ async retrieve(merchantId, templateId) {
6113
+ return this.request(
6114
+ "GET",
6115
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
6116
+ );
6117
+ }
6118
+ /**
6119
+ * Rename a template. A name another template of the merchant holds is
6120
+ * refused.
6121
+ * `POST /checkout-templates/{merchantId}/{templateId}`
6122
+ */
6123
+ async rename(merchantId, templateId, params) {
6124
+ return this.request(
6125
+ "POST",
6126
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`,
6127
+ { body: params }
6128
+ );
6129
+ }
6130
+ /**
6131
+ * Delete a template. Refused while a shop is on it.
6132
+ * `DELETE /checkout-templates/{merchantId}/{templateId}`
6133
+ */
6134
+ async delete(merchantId, templateId) {
6135
+ return this.request(
6136
+ "DELETE",
6137
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}`
6138
+ );
6139
+ }
6140
+ /**
6141
+ * Put shops on the template and copy its settings into them; a shop on
6142
+ * another template moves. Each shop is reported on its own: one with
6143
+ * `blockers` is left unchanged. `dry_run` changes nothing and reports what
6144
+ * would change.
6145
+ * `POST /checkout-templates/{merchantId}/{templateId}/shops`
6146
+ */
6147
+ async assign(merchantId, templateId, params) {
6148
+ return this.request(
6149
+ "POST",
6150
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops`,
6151
+ {
6152
+ body: params
6153
+ }
6154
+ );
6155
+ }
6156
+ /**
6157
+ * Take a shop off the template. It keeps every setting it has, as its own.
6158
+ * `DELETE /checkout-templates/{merchantId}/{templateId}/shops/{profileId}`
6159
+ */
6160
+ async unassign(merchantId, templateId, profileId) {
6161
+ return this.request(
6162
+ "DELETE",
6163
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/shops/${encodeURIComponent(profileId)}`
6164
+ );
6165
+ }
6166
+ /**
6167
+ * Copy the template's current settings into its shops, all or the ones
6168
+ * named.
6169
+ * `POST /checkout-templates/{merchantId}/{templateId}/apply`
6170
+ */
6171
+ async apply(merchantId, templateId, params = {}) {
6172
+ return this.request(
6173
+ "POST",
6174
+ `/checkout-templates/${encodeURIComponent(merchantId)}/${encodeURIComponent(templateId)}/apply`,
6175
+ {
6176
+ body: params
6177
+ }
6178
+ );
6179
+ }
6180
+ /**
6181
+ * The template a shop is on, if any. Readable by the shop's own members.
6182
+ * `GET /checkout-templates/{merchantId}/shops/{profileId}`
6183
+ */
6184
+ async ofShop(merchantId, profileId) {
6185
+ return this.request(
6186
+ "GET",
6187
+ `/checkout-templates/${encodeURIComponent(merchantId)}/shops/${encodeURIComponent(profileId)}`
6188
+ );
6189
+ }
6190
+ };
6191
+
5878
6192
  // src/resources/buyerConversations.ts
5879
6193
  var BuyerConversations = class {
5880
6194
  constructor(request) {
@@ -7328,7 +7642,48 @@ var CheckoutMethods = class {
7328
7642
  query: { merchant_id: merchantId }
7329
7643
  });
7330
7644
  }
7645
+ /**
7646
+ * The shop's checkout entries: separate ways into the hosted checkout of
7647
+ * one payment (`?entry=<key>`), such as a card form embedded in the shop's
7648
+ * page, a "Pay with crypto" checkout and an "Other payment methods"
7649
+ * checkout, each in its own named look. Live's by default; `environment:
7650
+ * 'test'` reads the Test checkout's, used by payments with `test_mode: true`.
7651
+ * Refused (403) to a caller that may not see or change every method.
7652
+ * `GET /checkout-methods/{profile_id}/entries` (`/test/entries`)
7653
+ */
7654
+ async entries(merchantId, profileId, params = {}) {
7655
+ return this.request("GET", entriesPath(profileId, params.environment), {
7656
+ query: { merchant_id: merchantId }
7657
+ });
7658
+ }
7659
+ /**
7660
+ * Replace the shop's entries of one environment. Refused when a key is
7661
+ * malformed or used twice, when an entry lists a method, group or card form
7662
+ * that environment's layout does not place, or when a card entry's
7663
+ * `other_entry` is not another `methods` entry.
7664
+ * `PUT /checkout-methods/{profile_id}/entries` (`/test/entries`)
7665
+ */
7666
+ async updateEntries(merchantId, profileId, body, params = {}) {
7667
+ return this.request("PUT", entriesPath(profileId, params.environment), {
7668
+ query: { merchant_id: merchantId },
7669
+ body
7670
+ });
7671
+ }
7672
+ /**
7673
+ * Delete every entry of one environment. A link that still names an entry
7674
+ * then offers nothing.
7675
+ * `DELETE /checkout-methods/{profile_id}/entries` (`/test/entries`)
7676
+ */
7677
+ async clearEntries(merchantId, profileId, params = {}) {
7678
+ return this.request("DELETE", entriesPath(profileId, params.environment), {
7679
+ query: { merchant_id: merchantId }
7680
+ });
7681
+ }
7331
7682
  };
7683
+ function entriesPath(profileId, environment) {
7684
+ const shop = `/checkout-methods/${encodeURIComponent(profileId)}`;
7685
+ return environment === "test" ? `${shop}/test/entries` : `${shop}/entries`;
7686
+ }
7332
7687
 
7333
7688
  // src/resources/subscriptions.ts
7334
7689
  var Subscriptions = class {
@@ -9085,6 +9440,41 @@ var Live = class {
9085
9440
  }
9086
9441
  };
9087
9442
 
9443
+ // src/resources/deploymentBranding.ts
9444
+ function brandingAssetPath(asset, version) {
9445
+ const path = `/branding/assets/${encodeURIComponent(asset)}`;
9446
+ return version ? `${path}?v=${encodeURIComponent(version)}` : path;
9447
+ }
9448
+ var Branding = class {
9449
+ constructor(request, baseUrl) {
9450
+ this.request = request;
9451
+ this.baseUrl = baseUrl;
9452
+ }
9453
+ /**
9454
+ * The saved branding. A `null` field means "keep your own default".
9455
+ *
9456
+ * Branding is cosmetic, so treat any failure as "nothing saved": routers
9457
+ * from before this route answer 404, and a page must never wait long for
9458
+ * it. Pass a `signal` (e.g. `AbortSignal.timeout(2500)`) to bound the call
9459
+ * including its retries; a `timeout` alone applies to each attempt.
9460
+ *
9461
+ * `GET /branding`
9462
+ */
9463
+ async retrieve(options) {
9464
+ return this.request("GET", "/branding", { ...options });
9465
+ }
9466
+ /**
9467
+ * The address of one branding image or font file on this client's base
9468
+ * URL, for an `<img src>` or a `@font-face` `src`. See
9469
+ * {@link brandingAssetPath}.
9470
+ *
9471
+ * `GET /branding/assets/{asset}`
9472
+ */
9473
+ assetUrl(asset, version) {
9474
+ return `${this.baseUrl}${brandingAssetPath(asset, version)}`;
9475
+ }
9476
+ };
9477
+
9088
9478
  // src/client.ts
9089
9479
  var PRODUCTION_URL = "https://api.delopay.net";
9090
9480
  var SANDBOX_URL = "https://sandbox.delopay.net";
@@ -9346,6 +9736,7 @@ var Delopay = class {
9346
9736
  this.profileAcquirers = new ProfileAcquirers(request);
9347
9737
  this.authentication = new Authentication(request);
9348
9738
  this.verification = new Verification(request);
9739
+ this.identityVerifications = new IdentityVerifications(request);
9349
9740
  this.users = new Users(request);
9350
9741
  this.apiKeys = new ApiKeys(request);
9351
9742
  this.billing = new Billing(request);
@@ -9363,6 +9754,7 @@ var Delopay = class {
9363
9754
  this.messageTemplates = new MessageTemplates(request);
9364
9755
  this.risk = new Risk(request);
9365
9756
  this.live = new Live(request, openStream);
9757
+ this.branding = new Branding(request, this.baseUrl);
9366
9758
  this.subscriptions = new Subscriptions(request);
9367
9759
  this.buyerPortal = new BuyerPortal(request);
9368
9760
  this.buyerAccount = new BuyerAccount(request);
@@ -9374,6 +9766,7 @@ var Delopay = class {
9374
9766
  this.sellToRestrictions = new SellToRestrictions(request);
9375
9767
  this.buyerBlocklist = new BuyerBlocklist(request);
9376
9768
  this.shopLabels = new ShopLabels(request);
9769
+ this.checkoutTemplates = new CheckoutTemplates(request);
9377
9770
  this.buyerConversations = new BuyerConversations(request);
9378
9771
  this.buyerEvidence = new BuyerEvidenceReviews(request);
9379
9772
  this.checkoutRecovery = new CheckoutRecovery(request);
@@ -13207,6 +13600,10 @@ var CheckoutSession = class {
13207
13600
  * `cardAccount` name that form's connector and account; absent or blank
13208
13601
  * matches any.
13209
13602
  *
13603
+ * `entry` opens one of the shop's checkout entries (`?entry=`): the layout
13604
+ * holds only that entry's methods and is drawn in its named look, and
13605
+ * `entry` on the answer says whether it had anything to offer.
13606
+ *
13210
13607
  * `GET /payment-link/data/{merchantId}/{paymentId}`
13211
13608
  */
13212
13609
  async fetchCheckoutData(params, options) {
@@ -13220,7 +13617,8 @@ var CheckoutSession = class {
13220
13617
  country: country || void 0,
13221
13618
  card_only: params?.cardOnly || void 0,
13222
13619
  card_provider: params?.cardOnly ? params.cardProvider?.trim() || void 0 : void 0,
13223
- card_account: params?.cardOnly ? params.cardAccount?.trim() || void 0 : void 0
13620
+ card_account: params?.cardOnly ? params.cardAccount?.trim() || void 0 : void 0,
13621
+ entry: params?.entry?.trim() || void 0
13224
13622
  },
13225
13623
  ...options,
13226
13624
  headers: {
@@ -13640,6 +14038,25 @@ var CheckoutSession = class {
13640
14038
  headers: this.bearerHeaders(options?.headers)
13641
14039
  });
13642
14040
  }
14041
+ /**
14042
+ * Reserve this payment attempt before a hosted card form contacts Stripe,
14043
+ * Airwallex, or NomuPay. Send the provider object rendered to this checkout
14044
+ * and retain the same `flow_id` across retries and any 3-D Secure step.
14045
+ *
14046
+ * Only `authorized: true` permits the form to contact its processor. A
14047
+ * competing flow receives `false` and must reload; an unresolved provider
14048
+ * outcome stays reserved, regardless of elapsed time. A buyer-blocklist
14049
+ * refusal throws a `DelopayError` with code `DE_14`.
14050
+ *
14051
+ * `POST /payment-link/{merchantId}/{paymentId}/browser-card-claim`
14052
+ */
14053
+ async claimBrowserCard(params, options) {
14054
+ return this.client.request("POST", `${this.linkBase}/browser-card-claim`, {
14055
+ body: params,
14056
+ ...options,
14057
+ headers: this.bearerHeaders(options?.headers)
14058
+ });
14059
+ }
13643
14060
  /**
13644
14061
  * Confirm the Stripe card form's PaymentIntent through the router, for a
13645
14062
  * checkout payload with `card_connector_server_confirm: true`. Stripe refuses
@@ -13661,6 +14078,10 @@ var CheckoutSession = class {
13661
14078
  * and that secret confirms nothing without the secret key — then call this
13662
14079
  * again without a payment method to finalize.
13663
14080
  *
14081
+ * Reserve the attempt with {@link claimBrowserCard} first. Send its granted
14082
+ * `flow_id` as `browser_flow_id` on both the initial and post-action confirm;
14083
+ * an omitted, null or nonholder flow is refused with `400` and code `IR_16`.
14084
+ *
13664
14085
  * A PaymentMethod rules out what `stripe.createPaymentMethod` cannot
13665
14086
  * produce: Stripe names Amazon Pay and Klarna in the Express Checkout
13666
14087
  * Element, which need `stripe.createConfirmationToken` instead. Neither can
@@ -13701,6 +14122,43 @@ var CheckoutSession = class {
13701
14122
  headers: this.bearerHeaders(options?.headers)
13702
14123
  });
13703
14124
  }
14125
+ /**
14126
+ * The payment's identity verification step: whether the payment asked for
14127
+ * one, its outcome, and the provider's page while it is pending. A pending
14128
+ * verification is read from the provider first, so call this when the buyer
14129
+ * comes back from the provider's page.
14130
+ *
14131
+ * `required` is `false` when the payment asked for no verification.
14132
+ * `can_retry` is `true` after an expired or abandoned attempt; start a new
14133
+ * one with {@link CheckoutSession.startIdentityVerification}.
14134
+ *
14135
+ * `GET /payment-link/{merchantId}/{paymentId}/identity-verification`
14136
+ */
14137
+ async identityVerification(options) {
14138
+ return this.client.request("GET", `${this.linkBase}/identity-verification`, {
14139
+ ...options,
14140
+ headers: this.bearerHeaders(options?.headers)
14141
+ });
14142
+ }
14143
+ /**
14144
+ * Resume the payment's pending identity verification, start it, or start a
14145
+ * new attempt after an expired or abandoned one. Send the buyer to the
14146
+ * returned `verification_url`; the provider sends them back to `return_url`,
14147
+ * which must be on the payment's checkout origin.
14148
+ *
14149
+ * Refusals throw a `DelopayError`: `400` when the return URL is not on the
14150
+ * payment's checkout or the verification is already decided, `404` when the
14151
+ * payment asked for no verification.
14152
+ *
14153
+ * `POST /payment-link/{merchantId}/{paymentId}/identity-verification`
14154
+ */
14155
+ async startIdentityVerification(params, options) {
14156
+ return this.client.request("POST", `${this.linkBase}/identity-verification`, {
14157
+ body: params,
14158
+ ...options,
14159
+ headers: this.bearerHeaders(options?.headers)
14160
+ });
14161
+ }
13704
14162
  /**
13705
14163
  * Ask whether NomuPay's COPYandPAY widget may submit a card, from the
13706
14164
  * form's pre-submit hook.
@@ -14423,6 +14881,20 @@ function focusedCheckoutUrl(params) {
14423
14881
  if (params.customFieldsCollected) query.set("cf", "1");
14424
14882
  return `${path}?${query.toString()}`;
14425
14883
  }
14884
+ function checkoutEntryUrl(params) {
14885
+ const base = params.checkoutBaseUrl.replace(/\/+$/, "");
14886
+ const path = params.paymentLinkId && OPAQUE_PAYMENT_LINK_ID.test(params.paymentLinkId) ? `${base}/pay/${params.paymentLinkId}` : `${base}/pay/${encodeURIComponent(params.merchantId)}/${encodeURIComponent(
14887
+ params.paymentId
14888
+ )}`;
14889
+ const query = new URLSearchParams({ entry: params.entry.trim() });
14890
+ if (params.locale) query.set("locale", params.locale);
14891
+ return `${path}?${query.toString()}`;
14892
+ }
14893
+ function isCheckoutOpenEntryMessage(data) {
14894
+ if (typeof data !== "object" || data === null) return false;
14895
+ const message = data;
14896
+ return message.type === "open_entry" && typeof message.source === "string" && typeof message.payment_id === "string" && typeof message.entry === "string" && typeof message.url === "string";
14897
+ }
14426
14898
  var CHECKOUT_EVENT_KINDS = [
14427
14899
  "native_pane_selected",
14428
14900
  "native_pane_tab_opened",
@@ -14457,6 +14929,7 @@ export {
14457
14929
  PaypalDisputes,
14458
14930
  WhopResolutionCases,
14459
14931
  Search,
14932
+ IdentityVerifications,
14460
14933
  isSubscriptionLifecycleWebhook,
14461
14934
  isSubscriptionDisputeWebhook,
14462
14935
  Webhooks,
@@ -14472,6 +14945,7 @@ export {
14472
14945
  SellToRestrictions,
14473
14946
  BuyerBlocklist,
14474
14947
  ShopLabels,
14948
+ CheckoutTemplates,
14475
14949
  BuyerConversations,
14476
14950
  BuyerEvidenceReviews,
14477
14951
  CheckoutRecovery,
@@ -14492,6 +14966,8 @@ export {
14492
14966
  LiveEventStream,
14493
14967
  openLiveStream,
14494
14968
  Live,
14969
+ brandingAssetPath,
14970
+ Branding,
14495
14971
  Delopay,
14496
14972
  leaf,
14497
14973
  allOf,
@@ -14698,6 +15174,8 @@ export {
14698
15174
  decodePanes,
14699
15175
  encodePanes,
14700
15176
  focusedCheckoutUrl,
15177
+ checkoutEntryUrl,
15178
+ isCheckoutOpenEntryMessage,
14701
15179
  CHECKOUT_EVENT_KINDS,
14702
15180
  STRIPE_NATIVE_PANE_METHODS,
14703
15181
  NATIVE_PANE_ICON_KEYS,
@@ -14709,4 +15187,4 @@ export {
14709
15187
  decodeNativePanes,
14710
15188
  encodeNativePanes
14711
15189
  };
14712
- //# sourceMappingURL=chunk-3CHJT5YW.js.map
15190
+ //# sourceMappingURL=chunk-ZZEGL45P.js.map