commerce-sdk-isomorphic 4.0.0-nightly-20251021080814 → 4.0.0-nightly-20251023080805

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 (49) hide show
  1. package/lib/helpers.cjs.js +1 -1
  2. package/lib/helpers.js +1 -1
  3. package/lib/index.cjs.d.ts +1034 -21
  4. package/lib/index.cjs.js +1 -1
  5. package/lib/index.esm.d.ts +1034 -21
  6. package/lib/index.esm.js +1 -1
  7. package/lib/shopperBaskets.cjs.js +1 -1
  8. package/lib/shopperBaskets.js +1 -1
  9. package/lib/shopperBasketsv2.cjs.d.ts +59 -1
  10. package/lib/shopperBasketsv2.cjs.js +1 -1
  11. package/lib/shopperBasketsv2.d.ts +59 -1
  12. package/lib/shopperBasketsv2.js +1 -1
  13. package/lib/shopperConfigurations.cjs.js +1 -1
  14. package/lib/shopperConfigurations.js +1 -1
  15. package/lib/shopperConsents.cjs.js +1 -1
  16. package/lib/shopperConsents.js +1 -1
  17. package/lib/shopperContext.cjs.js +1 -1
  18. package/lib/shopperContext.js +1 -1
  19. package/lib/shopperCustomers.cjs.js +1 -1
  20. package/lib/shopperCustomers.js +1 -1
  21. package/lib/shopperExperience.cjs.js +1 -1
  22. package/lib/shopperExperience.js +1 -1
  23. package/lib/shopperGiftCertificates.cjs.js +1 -1
  24. package/lib/shopperGiftCertificates.js +1 -1
  25. package/lib/shopperLogin.cjs.js +1 -1
  26. package/lib/shopperLogin.js +1 -1
  27. package/lib/shopperOrders.cjs.d.ts +59 -1
  28. package/lib/shopperOrders.cjs.js +1 -1
  29. package/lib/shopperOrders.d.ts +59 -1
  30. package/lib/shopperOrders.js +1 -1
  31. package/lib/shopperPayments.cjs.d.ts +1010 -0
  32. package/lib/shopperPayments.cjs.js +1 -0
  33. package/lib/shopperPayments.d.ts +1010 -0
  34. package/lib/shopperPayments.js +1 -0
  35. package/lib/shopperProducts.cjs.js +1 -1
  36. package/lib/shopperProducts.js +1 -1
  37. package/lib/shopperPromotions.cjs.js +1 -1
  38. package/lib/shopperPromotions.js +1 -1
  39. package/lib/shopperSearch.cjs.js +1 -1
  40. package/lib/shopperSearch.js +1 -1
  41. package/lib/shopperSeo.cjs.js +1 -1
  42. package/lib/shopperSeo.js +1 -1
  43. package/lib/shopperStores.cjs.js +1 -1
  44. package/lib/shopperStores.js +1 -1
  45. package/lib/version.cjs.d.ts +1 -1
  46. package/lib/version.cjs.js +1 -1
  47. package/lib/version.d.ts +1 -1
  48. package/lib/version.js +1 -1
  49. package/package.json +2 -2
@@ -11146,6 +11146,22 @@ type OrderPaymentCardRequest$0 = {
11146
11146
  } & {
11147
11147
  [key: string]: any;
11148
11148
  };
11149
+ /**
11150
+ * @type SalesforcePaymentsRequest: Document representing a Salesforce Payments request.
11151
+ *
11152
+ * @property paymentMethodType: The payment method type (for example: Visa).
11153
+ * - **Max Length:** 100
11154
+ *
11155
+ * @property zoneId: The zone ID.
11156
+ * - **Max Length:** 100
11157
+ *
11158
+ */
11159
+ type SalesforcePaymentsRequest = {
11160
+ paymentMethodType?: string;
11161
+ zoneId?: string;
11162
+ } & {
11163
+ [key: string]: any;
11164
+ };
11149
11165
  /**
11150
11166
  * @type BasketPaymentInstrumentRequest: Document representing a basket payment instrument request.
11151
11167
  *
@@ -11162,6 +11178,8 @@ type OrderPaymentCardRequest$0 = {
11162
11178
  * @property paymentMethodId: The payment method ID.
11163
11179
  * - **Max Length:** 256
11164
11180
  *
11181
+ * @property paymentReferenceRequest: The payment reference request used by Salesforce Payments.
11182
+ *
11165
11183
  */
11166
11184
  type BasketPaymentInstrumentRequest$0 = {
11167
11185
  amount?: number;
@@ -11169,6 +11187,7 @@ type BasketPaymentInstrumentRequest$0 = {
11169
11187
  giftCertificateCode?: string;
11170
11188
  paymentCard?: OrderPaymentCardRequest$0;
11171
11189
  paymentMethodId?: string;
11190
+ paymentReferenceRequest?: SalesforcePaymentsRequest;
11172
11191
  } & {
11173
11192
  [key: string]: any;
11174
11193
  };
@@ -15723,6 +15742,22 @@ declare namespace ShopperBasketsV2ApiTypes {
15723
15742
  } & {
15724
15743
  [key: string]: any;
15725
15744
  };
15745
+ /**
15746
+ * @type SalesforcePaymentsRequest: Document representing a Salesforce Payments request.
15747
+ *
15748
+ * @property paymentMethodType: The payment method type (for example: Visa).
15749
+ * - **Max Length:** 100
15750
+ *
15751
+ * @property zoneId: The zone ID.
15752
+ * - **Max Length:** 100
15753
+ *
15754
+ */
15755
+ type SalesforcePaymentsRequest = {
15756
+ paymentMethodType?: string;
15757
+ zoneId?: string;
15758
+ } & {
15759
+ [key: string]: any;
15760
+ };
15726
15761
  /**
15727
15762
  * @type BasketPaymentInstrumentRequest: Document representing a basket payment instrument request.
15728
15763
  *
@@ -15739,6 +15774,8 @@ declare namespace ShopperBasketsV2ApiTypes {
15739
15774
  * @property paymentMethodId: The payment method ID.
15740
15775
  * - **Max Length:** 256
15741
15776
  *
15777
+ * @property paymentReferenceRequest: The payment reference request used by Salesforce Payments.
15778
+ *
15742
15779
  */
15743
15780
  type BasketPaymentInstrumentRequest = {
15744
15781
  amount?: number;
@@ -15746,6 +15783,7 @@ declare namespace ShopperBasketsV2ApiTypes {
15746
15783
  giftCertificateCode?: string;
15747
15784
  paymentCard?: OrderPaymentCardRequest;
15748
15785
  paymentMethodId?: string;
15786
+ paymentReferenceRequest?: SalesforcePaymentsRequest;
15749
15787
  } & {
15750
15788
  [key: string]: any;
15751
15789
  };
@@ -20216,6 +20254,22 @@ declare namespace ShopperBasketsV2ModelTypes {
20216
20254
  } & {
20217
20255
  [key: string]: any;
20218
20256
  };
20257
+ /**
20258
+ * @type SalesforcePaymentsRequest: Document representing a Salesforce Payments request.
20259
+ *
20260
+ * @property paymentMethodType: The payment method type (for example: Visa).
20261
+ * - **Max Length:** 100
20262
+ *
20263
+ * @property zoneId: The zone ID.
20264
+ * - **Max Length:** 100
20265
+ *
20266
+ */
20267
+ type SalesforcePaymentsRequest = {
20268
+ paymentMethodType?: string;
20269
+ zoneId?: string;
20270
+ } & {
20271
+ [key: string]: any;
20272
+ };
20219
20273
  /**
20220
20274
  * @type BasketPaymentInstrumentRequest: Document representing a basket payment instrument request.
20221
20275
  *
@@ -20232,6 +20286,8 @@ declare namespace ShopperBasketsV2ModelTypes {
20232
20286
  * @property paymentMethodId: The payment method ID.
20233
20287
  * - **Max Length:** 256
20234
20288
  *
20289
+ * @property paymentReferenceRequest: The payment reference request used by Salesforce Payments.
20290
+ *
20235
20291
  */
20236
20292
  type BasketPaymentInstrumentRequest = {
20237
20293
  amount?: number;
@@ -20239,6 +20295,7 @@ declare namespace ShopperBasketsV2ModelTypes {
20239
20295
  giftCertificateCode?: string;
20240
20296
  paymentCard?: OrderPaymentCardRequest;
20241
20297
  paymentMethodId?: string;
20298
+ paymentReferenceRequest?: SalesforcePaymentsRequest;
20242
20299
  } & {
20243
20300
  [key: string]: any;
20244
20301
  };
@@ -20559,6 +20616,7 @@ declare namespace ShopperBasketsV2Types {
20559
20616
  type ProductListItemReferenceTypeEnum = ShopperBasketsV2ModelTypes.ProductListItemReferenceTypeEnum;
20560
20617
  type ProductListLink = ShopperBasketsV2ModelTypes.ProductListLink;
20561
20618
  type ProductListLinkTypeEnum = ShopperBasketsV2ModelTypes.ProductListLinkTypeEnum;
20619
+ type SalesforcePaymentsRequest = ShopperBasketsV2ModelTypes.SalesforcePaymentsRequest;
20562
20620
  type Shipment = ShopperBasketsV2ModelTypes.Shipment;
20563
20621
  type ShipmentShippingStatusEnum = ShopperBasketsV2ModelTypes.ShipmentShippingStatusEnum;
20564
20622
  type ShippingItem = ShopperBasketsV2ModelTypes.ShippingItem;
@@ -42100,6 +42158,22 @@ type OrderPaymentCardRequest$1 = {
42100
42158
  } & {
42101
42159
  [key: string]: any;
42102
42160
  };
42161
+ /**
42162
+ * @type SalesforcePaymentsRequest: Document representing a Salesforce Payments request.
42163
+ *
42164
+ * @property paymentMethodType: The payment method type (for example: Visa).
42165
+ * - **Max Length:** 100
42166
+ *
42167
+ * @property zoneId: The zone ID.
42168
+ * - **Max Length:** 100
42169
+ *
42170
+ */
42171
+ type SalesforcePaymentsRequest$0 = {
42172
+ paymentMethodType?: string;
42173
+ zoneId?: string;
42174
+ } & {
42175
+ [key: string]: any;
42176
+ };
42103
42177
  /**
42104
42178
  * @type OrderPaymentInstrumentRequest: Document representing an order payment instrument request.
42105
42179
  *
@@ -42116,6 +42190,8 @@ type OrderPaymentCardRequest$1 = {
42116
42190
  * @property paymentMethodId: The payment method ID.
42117
42191
  * - **Max Length:** 256
42118
42192
  *
42193
+ * @property paymentReferenceRequest: The payment reference request used by Salesforce Payments.
42194
+ *
42119
42195
  */
42120
42196
  type OrderPaymentInstrumentRequest = {
42121
42197
  amount?: number;
@@ -42123,6 +42199,7 @@ type OrderPaymentInstrumentRequest = {
42123
42199
  giftCertificateCode?: string;
42124
42200
  paymentCard?: OrderPaymentCardRequest$1;
42125
42201
  paymentMethodId?: string;
42202
+ paymentReferenceRequest?: SalesforcePaymentsRequest$0;
42126
42203
  } & {
42127
42204
  [key: string]: any;
42128
42205
  };
@@ -44148,6 +44225,12 @@ declare namespace ShopperOrdersApiTypes {
44148
44225
  } & {
44149
44226
  [key: string]: any;
44150
44227
  };
44228
+ type SalesforcePaymentsRequest = {
44229
+ paymentMethodType?: string;
44230
+ zoneId?: string;
44231
+ } & {
44232
+ [key: string]: any;
44233
+ };
44151
44234
  /**
44152
44235
  * @type OrderPaymentInstrumentRequest: Document representing an order payment instrument request.
44153
44236
  *
@@ -44164,6 +44247,8 @@ declare namespace ShopperOrdersApiTypes {
44164
44247
  * @property paymentMethodId: The payment method ID.
44165
44248
  * - **Max Length:** 256
44166
44249
  *
44250
+ * @property paymentReferenceRequest: The payment reference request used by Salesforce Payments.
44251
+ *
44167
44252
  */
44168
44253
  type OrderPaymentInstrumentRequest = {
44169
44254
  amount?: number;
@@ -44171,6 +44256,7 @@ declare namespace ShopperOrdersApiTypes {
44171
44256
  giftCertificateCode?: string;
44172
44257
  paymentCard?: OrderPaymentCardRequest;
44173
44258
  paymentMethodId?: string;
44259
+ paymentReferenceRequest?: SalesforcePaymentsRequest;
44174
44260
  } & {
44175
44261
  [key: string]: any;
44176
44262
  };
@@ -46089,6 +46175,12 @@ declare namespace ShopperOrdersModelTypes {
46089
46175
  } & {
46090
46176
  [key: string]: any;
46091
46177
  };
46178
+ type SalesforcePaymentsRequest = {
46179
+ paymentMethodType?: string;
46180
+ zoneId?: string;
46181
+ } & {
46182
+ [key: string]: any;
46183
+ };
46092
46184
  /**
46093
46185
  * @type OrderPaymentInstrumentRequest: Document representing an order payment instrument request.
46094
46186
  *
@@ -46105,6 +46197,8 @@ declare namespace ShopperOrdersModelTypes {
46105
46197
  * @property paymentMethodId: The payment method ID.
46106
46198
  * - **Max Length:** 256
46107
46199
  *
46200
+ * @property paymentReferenceRequest: The payment reference request used by Salesforce Payments.
46201
+ *
46108
46202
  */
46109
46203
  type OrderPaymentInstrumentRequest = {
46110
46204
  amount?: number;
@@ -46112,6 +46206,7 @@ declare namespace ShopperOrdersModelTypes {
46112
46206
  giftCertificateCode?: string;
46113
46207
  paymentCard?: OrderPaymentCardRequest;
46114
46208
  paymentMethodId?: string;
46209
+ paymentReferenceRequest?: SalesforcePaymentsRequest;
46115
46210
  } & {
46116
46211
  [key: string]: any;
46117
46212
  };
@@ -46289,6 +46384,7 @@ declare namespace ShopperOrdersTypes {
46289
46384
  type ProductListItemReferenceTypeEnum = ShopperOrdersModelTypes.ProductListItemReferenceTypeEnum;
46290
46385
  type ProductListLink = ShopperOrdersModelTypes.ProductListLink;
46291
46386
  type ProductListLinkTypeEnum = ShopperOrdersModelTypes.ProductListLinkTypeEnum;
46387
+ type SalesforcePaymentsRequest = ShopperOrdersModelTypes.SalesforcePaymentsRequest;
46292
46388
  type Shipment = ShopperOrdersModelTypes.Shipment;
46293
46389
  type ShipmentShippingStatusEnum = ShopperOrdersModelTypes.ShipmentShippingStatusEnum;
46294
46390
  type ShippingItem = ShopperOrdersModelTypes.ShippingItem;
@@ -46299,6 +46395,922 @@ declare namespace ShopperOrdersTypes {
46299
46395
  type TaxItems = ShopperOrdersModelTypes.TaxItems;
46300
46396
  type Taxes = ShopperOrdersModelTypes.Taxes;
46301
46397
  }
46398
+ /**
46399
+ * A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number.
46400
+ */
46401
+ type NoValue$3 = "N/A";
46402
+ /**
46403
+ * @type CurrencyCode
46404
+ * A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
46405
+ */
46406
+ type CurrencyCode$3 = NoValue$3 | string;
46407
+ /**
46408
+ * @type PaymentConfigurationPaymentMethodsInner:
46409
+ *
46410
+ * @property accountId: Associated account identifier
46411
+ * - **Min Length:** 1
46412
+ *
46413
+ * @property paymentMethodType: Type of payment method
46414
+ *
46415
+ * @property paymentModes: Supported payment modes
46416
+ *
46417
+ */
46418
+ type PaymentConfigurationPaymentMethodsInner = {
46419
+ accountId: string;
46420
+ paymentMethodType: string;
46421
+ paymentModes: Array<string>;
46422
+ } & {
46423
+ [key: string]: any;
46424
+ };
46425
+ /**
46426
+ * @type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponsePaymentMethodsInner:
46427
+ *
46428
+ * @property brands: Supported card brands
46429
+ *
46430
+ * @property type: Payment method type
46431
+ *
46432
+ */
46433
+ type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponsePaymentMethodsInner = {
46434
+ brands?: Array<string>;
46435
+ type?: string;
46436
+ } & {
46437
+ [key: string]: any;
46438
+ };
46439
+ /**
46440
+ * @type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponse: Gateway response data (optional, can be null)
46441
+ *
46442
+ * @property paymentMethods: Available payment methods from gateway
46443
+ *
46444
+ */
46445
+ type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponse = {
46446
+ paymentMethods?: Array<PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponsePaymentMethodsInner>;
46447
+ } & {
46448
+ [key: string]: any;
46449
+ };
46450
+ /**
46451
+ * @type PaymentConfigurationPaymentMethodSetAccountsInnerConfig: Account configuration
46452
+ *
46453
+ * @property key: API key for the payment processor
46454
+ * - **Max Length:** 200
46455
+ *
46456
+ */
46457
+ type PaymentConfigurationPaymentMethodSetAccountsInnerConfig = {
46458
+ key?: string;
46459
+ } & {
46460
+ [key: string]: any;
46461
+ };
46462
+ /**
46463
+ * @type PaymentConfigurationPaymentMethodSetAccountsInner:
46464
+ *
46465
+ * @property accountId: Account identifier
46466
+ * - **Min Length:** 1
46467
+ * - **Max Length:** 100
46468
+ *
46469
+ * @property config:
46470
+ *
46471
+ * @property gatewayId: Gateway identifier
46472
+ * - **Min Length:** 1
46473
+ *
46474
+ * @property gatewayResponse:
46475
+ *
46476
+ * @property isLive: Whether the account is in live mode
46477
+ *
46478
+ * @property vendor: Payment vendor name
46479
+ *
46480
+ */
46481
+ type PaymentConfigurationPaymentMethodSetAccountsInner = {
46482
+ accountId: string;
46483
+ config?: PaymentConfigurationPaymentMethodSetAccountsInnerConfig;
46484
+ gatewayId: string;
46485
+ gatewayResponse?: PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponse | null;
46486
+ isLive: boolean;
46487
+ vendor: string;
46488
+ } & {
46489
+ [key: string]: any;
46490
+ };
46491
+ /**
46492
+ * @type PaymentConfiguration:
46493
+ *
46494
+ * @property zoneId: The unique identifier for a Payments zone.
46495
+ * - **Pattern:** /^[a-zA-Z0-9\\-_]{1,100}$/
46496
+ * - **Min Length:** 1
46497
+ * - **Max Length:** 100
46498
+ *
46499
+ * @property paymentMethodSetAccounts: List of payment method set accounts
46500
+ *
46501
+ * @property paymentMethods: Configured payment methods
46502
+ *
46503
+ * @property sdkVersion: SDK version to use
46504
+ *
46505
+ */
46506
+ type PaymentConfiguration = {
46507
+ zoneId?: string | null;
46508
+ paymentMethodSetAccounts: Array<PaymentConfigurationPaymentMethodSetAccountsInner>;
46509
+ paymentMethods: Array<PaymentConfigurationPaymentMethodsInner>;
46510
+ sdkVersion: string;
46511
+ } & {
46512
+ [key: string]: any;
46513
+ };
46514
+ type getPaymentConfigurationQueryParameters = {
46515
+ siteId: string;
46516
+ currency: CurrencyCode$3;
46517
+ countryCode: string;
46518
+ };
46519
+ type getPaymentConfigurationPathParameters = {
46520
+ organizationId: string;
46521
+ };
46522
+ /**
46523
+ * All path parameters that are used by at least one ShopperPayments method.
46524
+ */
46525
+ type ShopperPaymentsPathParameters = Partial<getPaymentConfigurationPathParameters & {}>;
46526
+ /**
46527
+ * All query parameters that are used by at least one ShopperPayments method.
46528
+ */
46529
+ type ShopperPaymentsQueryParameters = Partial<getPaymentConfigurationQueryParameters & {}>;
46530
+ /**
46531
+ * All parameters that are used by ShopperPayments.
46532
+ */
46533
+ type ShopperPaymentsParameters = ShopperPaymentsPathParameters & BaseUriParameters & ShopperPaymentsQueryParameters;
46534
+ /**
46535
+ * [Shopper Payments](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-payments:Summary)
46536
+ * ==================================
46537
+ *
46538
+ * *# API Overview
46539
+
46540
+ Use the Shopper Payments API to retrieve payment configuration information for organizations in the B2C Commerce system.
46541
+
46542
+ The Shopper Payments API provides access to comprehensive payment configuration data, including payment processor settings, gateway configurations, and payment method details.
46543
+
46544
+ ## Key Features
46545
+
46546
+ The Shopper Payments API includes the following capabilities:
46547
+
46548
+ - **Payment Configuration Retrieval**: Get complete payment configuration for an organization
46549
+ - **Payment Method Set Information**: Access details about configured payment method set accounts
46550
+ - **Gateway Response Data**: Retrieve payment processor gateway information and supported payment methods
46551
+ - **Payment Modes Configuration**: View supported payment modes (Multistep, Express) for each payment method
46552
+ - **SDK Version Information**: Get the current SDK version being used
46553
+
46554
+ ## Payment Configuration Endpoint
46555
+
46556
+ The main endpoint `/organizations/{organizationId}/payment-configuration` provides:
46557
+
46558
+ ### Configuration Settings
46559
+ - Multi-step checkout enablement status
46560
+ - Express checkout enablement status
46561
+ - Automatic card capture settings
46562
+ - Zone identification
46563
+ - Saved payment method configuration
46564
+ - Merchant account identification
46565
+
46566
+ ### Payment Method Set Accounts
46567
+ - Account identifiers and configurations
46568
+ - Payment processor API keys and settings
46569
+ - Gateway identifiers and response data
46570
+ - Live/test mode indicators
46571
+ - Vendor information (Stripe, Adyen, PayPal, etc.)
46572
+
46573
+ ### Payment Methods
46574
+ - Supported payment method types (card, paypal, applepay, etc.)
46575
+ - Available payment modes for each method
46576
+ - Account associations
46577
+
46578
+ ## Gateway Response Handling
46579
+
46580
+ The API handles varying gateway response formats:
46581
+ - **Active Gateways**: Return detailed payment method information including supported card brands
46582
+ - **Inactive/Pending Gateways**: May return null gateway response data
46583
+ - **Multiple Vendors**: Support for different payment processors with vendor-specific configurations
46584
+
46585
+ ## Authentication & Authorization
46586
+
46587
+ The client requesting payment configuration information must have access to the `/payment-configuration` resource. The Shopper Payments API requires a shopper access token from the Shopper Login and API Access Service (SLAS).
46588
+
46589
+ For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides.
46590
+
46591
+ You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)
46592
+
46593
+ ## Getting Started
46594
+
46595
+ To use the Shopper Payments API:
46596
+
46597
+ 1. Authenticate with the appropriate scopes (`sfcc.shopper-payments.rw`)
46598
+ 2. Make a GET request to `/organizations/{organizationId}/payment-configuration`
46599
+ 3. Process the returned payment configuration data for your application
46600
+
46601
+ ## Use Cases
46602
+
46603
+ ### Payment Method Discovery
46604
+ Retrieve available payment methods and their capabilities for dynamic payment form generation.
46605
+
46606
+ ### Gateway Status Monitoring
46607
+ Check the status and configuration of payment gateways and processors.
46608
+
46609
+ ### Payment Flow Configuration
46610
+ Determine supported payment modes (multi-step vs express) for different payment methods.
46611
+
46612
+ ### SDK Version Management
46613
+ Ensure compatibility by checking the current SDK version requirements.
46614
+
46615
+ For detailed implementation examples and best practices, refer to the Commerce Cloud documentation. *<br />
46616
+ *
46617
+ * Simple example:
46618
+ *
46619
+ * ```typescript
46620
+ * import { ShopperPayments } from "commerce-sdk-isomorphic";
46621
+ *
46622
+ * const clientConfig = {
46623
+ * parameters: {
46624
+ * clientId: "XXXXXX",
46625
+ * organizationId: "XXXX",
46626
+ * shortCode: "XXX",
46627
+ * siteId: "XX"
46628
+ * }
46629
+ * };
46630
+ * const shopperPaymentsClient = new ShopperPayments(clientConfig);
46631
+ * ```
46632
+ *
46633
+ * <span style="font-size:.7em; display:block; text-align: right">
46634
+ * API Version: 0.0.33<br />
46635
+ * Last Updated: <br />
46636
+ * </span>
46637
+ *
46638
+ *
46639
+ */
46640
+ declare class ShopperPayments<ConfigParameters extends ShopperPaymentsParameters & Record<string, unknown>> {
46641
+ // baseUri is not required on ClientConfig, but we know that we provide one in the class constructor
46642
+ clientConfig: ClientConfig<ConfigParameters> & {
46643
+ baseUri: string;
46644
+ };
46645
+ static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-payments/v1";
46646
+ static readonly apiPaths: {
46647
+ getPaymentConfiguration: string;
46648
+ };
46649
+ constructor(config: ClientConfigInit<ConfigParameters>);
46650
+ static readonly paramKeys: {
46651
+ readonly getPaymentConfiguration: readonly [
46652
+ "organizationId",
46653
+ "siteId",
46654
+ "currency",
46655
+ "countryCode"
46656
+ ];
46657
+ readonly getPaymentConfigurationRequired: readonly [
46658
+ "organizationId",
46659
+ "siteId",
46660
+ "currency",
46661
+ "countryCode"
46662
+ ];
46663
+ };
46664
+ /**
46665
+ * Retrieves the payment configuration for the organization.
46666
+
46667
+ **Parameters:**
46668
+ - `siteId`: Required. The site identifier for context-specific configuration
46669
+ - `currency`: Required. Three-letter currency code (ISO 4217) for payment method configuration
46670
+ - `countryCode`: Required. Two-letter country code (ISO 3166-1 alpha-2) for country-specific payment configuration
46671
+
46672
+ **Response Behavior:**
46673
+ - Returns payment configuration data when available
46674
+ - Returns null values for missing data (e.g., when account not found or payments zone not found)
46675
+ *
46676
+ * If you would like to get a raw Response object use the other getPaymentConfiguration function.
46677
+ *
46678
+ * @param options - An object containing the options for this method.
46679
+ * @param options.parameters - An object containing the parameters for this method.
46680
+ * @param options.parameters.organizationId - An identifier for the organization the request is being made by
46681
+ * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
46682
+ * @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
46683
+ * @param options.parameters.countryCode - The country code (ISO 3166-1 alpha-2) for country-specific payment configuration filtering
46684
+ * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
46685
+ *
46686
+ * @returns A promise of type PaymentConfiguration.
46687
+ */
46688
+ getPaymentConfiguration(options?: RequireParametersUnlessAllAreOptional<{
46689
+ parameters?: CompositeParameters<{
46690
+ organizationId: string;
46691
+ siteId: string;
46692
+ currency: CurrencyCode$3;
46693
+ countryCode: string;
46694
+ } & QueryParameters, ConfigParameters>;
46695
+ headers?: {
46696
+ [key: string]: string;
46697
+ };
46698
+ }>): Promise<PaymentConfiguration>;
46699
+ /**
46700
+ * Retrieves the payment configuration for the organization.
46701
+
46702
+ **Parameters:**
46703
+ - `siteId`: Required. The site identifier for context-specific configuration
46704
+ - `currency`: Required. Three-letter currency code (ISO 4217) for payment method configuration
46705
+ - `countryCode`: Required. Two-letter country code (ISO 3166-1 alpha-2) for country-specific payment configuration
46706
+
46707
+ **Response Behavior:**
46708
+ - Returns payment configuration data when available
46709
+ - Returns null values for missing data (e.g., when account not found or payments zone not found)
46710
+ *
46711
+ * @param options - An object containing the options for this method.
46712
+ * @param options.parameters - An object containing the parameters for this method.
46713
+ * @param options.parameters.organizationId - An identifier for the organization the request is being made by
46714
+ * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
46715
+ * @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
46716
+ * @param options.parameters.countryCode - The country code (ISO 3166-1 alpha-2) for country-specific payment configuration filtering
46717
+ * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
46718
+ * @param rawResponse - Set to true to return entire Response object instead of DTO.
46719
+ *
46720
+ * @returns A promise of type Response if rawResponse is true, a promise of type PaymentConfiguration otherwise.
46721
+ */
46722
+ getPaymentConfiguration<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
46723
+ parameters?: CompositeParameters<{
46724
+ organizationId: string;
46725
+ siteId: string;
46726
+ currency: CurrencyCode$3;
46727
+ countryCode: string;
46728
+ } & QueryParameters, ConfigParameters>;
46729
+ headers?: {
46730
+ [key: string]: string;
46731
+ };
46732
+ }>, rawResponse?: T): Promise<T extends true ? Response : PaymentConfiguration>;
46733
+ }
46734
+ declare namespace ShopperPaymentsApiTypes {
46735
+ /*
46736
+ * Copyright (c) 2023, Salesforce, Inc.
46737
+ * All rights reserved.
46738
+ * SPDX-License-Identifier: BSD-3-Clause
46739
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
46740
+ */
46741
+ /**
46742
+ * Makes a type easier to read.
46743
+ */
46744
+ type Prettify<T> = NonNullable<{
46745
+ [K in keyof T]: T[K];
46746
+ }>;
46747
+ /**
46748
+ * Generates the types required on a method, based on those provided in the config.
46749
+ */
46750
+ type CompositeParameters<MethodParameters extends Record<string, unknown>, ConfigParameters extends Record<string, unknown>> = Prettify<Omit<MethodParameters, keyof ConfigParameters> & Partial<MethodParameters>>;
46751
+ /**
46752
+ * If an object has a `parameters` property, and the `parameters` object has required properties,
46753
+ * then the `parameters` property on the root object is marked as required.
46754
+ */
46755
+ type RequireParametersUnlessAllAreOptional<T extends {
46756
+ parameters?: Record<string, unknown>;
46757
+ }> = Record<string, never> extends NonNullable<T["parameters"]> ? T : Prettify<T & Required<Pick<T, "parameters">>>;
46758
+ /**
46759
+ * Template parameters used in the base URI of all API endpoints. `version` will default to `"v1"`
46760
+ * if not specified.
46761
+ */
46762
+ interface BaseUriParameters {
46763
+ shortCode: string;
46764
+ }
46765
+ type LocaleCode = {
46766
+ [key: string]: any;
46767
+ };
46768
+ /**
46769
+ * Generic interface for path parameters.
46770
+ */
46771
+ interface PathParameters {
46772
+ [key: string]: string | number | boolean;
46773
+ }
46774
+ /**
46775
+ * Generic interface for query parameters.
46776
+ */
46777
+ interface QueryParameters {
46778
+ [key: string]: string | number | boolean | string[] | number[] | LocaleCode;
46779
+ }
46780
+ /**
46781
+ * Generic interface for all parameter types.
46782
+ */
46783
+ type UrlParameters = PathParameters | QueryParameters;
46784
+ /**
46785
+ * Custom query parameter type with any string prefixed with `c_` as the key and the allowed
46786
+ * types for query parameters for the value.
46787
+ */
46788
+ type CustomQueryParameters = {
46789
+ [key in `c_${string}`]: string | number | boolean | string[] | number[];
46790
+ };
46791
+ /**
46792
+ * Custom body request type with any string prefixed with `c_` as the key and the allowed
46793
+ * types for the value.
46794
+ */
46795
+ type CustomRequestBody = {
46796
+ [key in `c_${string}`]: string | number | boolean | string[] | number[] | {
46797
+ [key: string]: unknown;
46798
+ };
46799
+ };
46800
+ /**
46801
+ * Alias for `RequestInit` from TypeScript's DOM lib, to more clearly differentiate
46802
+ * it from the `RequestInit` provided by node-fetch.
46803
+ */
46804
+ type BrowserRequestInit = RequestInit;
46805
+ /**
46806
+ * Any properties supported in either the browser or node are accepted.
46807
+ * Using the right properties in the right context is left to the user.
46808
+ */
46809
+ type FetchOptions = NodeRequestInit & BrowserRequestInit;
46810
+ /**
46811
+ * Base options that can be passed to the `ClientConfig` class.
46812
+ */
46813
+ interface ClientConfigInit<Params extends BaseUriParameters> {
46814
+ baseUri?: string;
46815
+ proxy?: string;
46816
+ headers?: {
46817
+ [key: string]: string;
46818
+ };
46819
+ parameters: Params;
46820
+ fetchOptions?: FetchOptions;
46821
+ transformRequest?: (data: unknown, headers: {
46822
+ [key: string]: string;
46823
+ }) => Required<FetchOptions>["body"];
46824
+ throwOnBadResponse?: boolean;
46825
+ }
46826
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
46827
+ /**
46828
+ * Configuration parameters common to Commerce SDK clients
46829
+ */
46830
+ class ClientConfig<Params extends BaseUriParameters> implements ClientConfigInit<Params> {
46831
+ baseUri?: string;
46832
+ proxy?: string;
46833
+ headers: {
46834
+ [key: string]: string;
46835
+ };
46836
+ parameters: Params;
46837
+ fetchOptions: FetchOptions;
46838
+ transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
46839
+ throwOnBadResponse: boolean;
46840
+ constructor(config: ClientConfigInit<Params>);
46841
+ static readonly defaults: Pick<Required<ClientConfigInit<never>>, "transformRequest">;
46842
+ }
46843
+ /**
46844
+ * A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number.
46845
+ */
46846
+ type NoValue = "N/A";
46847
+ /**
46848
+ * @type CurrencyCode
46849
+ * A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
46850
+ */
46851
+ type CurrencyCode = NoValue | string;
46852
+ /**
46853
+ * @type PaymentConfigurationPaymentMethodsInner:
46854
+ *
46855
+ * @property accountId: Associated account identifier
46856
+ * - **Min Length:** 1
46857
+ *
46858
+ * @property paymentMethodType: Type of payment method
46859
+ *
46860
+ * @property paymentModes: Supported payment modes
46861
+ *
46862
+ */
46863
+ type PaymentConfigurationPaymentMethodsInner = {
46864
+ accountId: string;
46865
+ paymentMethodType: string;
46866
+ paymentModes: Array<string>;
46867
+ } & {
46868
+ [key: string]: any;
46869
+ };
46870
+ /**
46871
+ * @type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponsePaymentMethodsInner:
46872
+ *
46873
+ * @property brands: Supported card brands
46874
+ *
46875
+ * @property type: Payment method type
46876
+ *
46877
+ */
46878
+ type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponsePaymentMethodsInner = {
46879
+ brands?: Array<string>;
46880
+ type?: string;
46881
+ } & {
46882
+ [key: string]: any;
46883
+ };
46884
+ /**
46885
+ * @type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponse: Gateway response data (optional, can be null)
46886
+ *
46887
+ * @property paymentMethods: Available payment methods from gateway
46888
+ *
46889
+ */
46890
+ type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponse = {
46891
+ paymentMethods?: Array<PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponsePaymentMethodsInner>;
46892
+ } & {
46893
+ [key: string]: any;
46894
+ };
46895
+ /**
46896
+ * @type PaymentConfigurationPaymentMethodSetAccountsInnerConfig: Account configuration
46897
+ *
46898
+ * @property key: API key for the payment processor
46899
+ * - **Max Length:** 200
46900
+ *
46901
+ */
46902
+ type PaymentConfigurationPaymentMethodSetAccountsInnerConfig = {
46903
+ key?: string;
46904
+ } & {
46905
+ [key: string]: any;
46906
+ };
46907
+ /**
46908
+ * @type PaymentConfigurationPaymentMethodSetAccountsInner:
46909
+ *
46910
+ * @property accountId: Account identifier
46911
+ * - **Min Length:** 1
46912
+ * - **Max Length:** 100
46913
+ *
46914
+ * @property config:
46915
+ *
46916
+ * @property gatewayId: Gateway identifier
46917
+ * - **Min Length:** 1
46918
+ *
46919
+ * @property gatewayResponse:
46920
+ *
46921
+ * @property isLive: Whether the account is in live mode
46922
+ *
46923
+ * @property vendor: Payment vendor name
46924
+ *
46925
+ */
46926
+ type PaymentConfigurationPaymentMethodSetAccountsInner = {
46927
+ accountId: string;
46928
+ config?: PaymentConfigurationPaymentMethodSetAccountsInnerConfig;
46929
+ gatewayId: string;
46930
+ gatewayResponse?: PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponse | null;
46931
+ isLive: boolean;
46932
+ vendor: string;
46933
+ } & {
46934
+ [key: string]: any;
46935
+ };
46936
+ /**
46937
+ * @type PaymentConfiguration:
46938
+ *
46939
+ * @property zoneId: The unique identifier for a Payments zone.
46940
+ * - **Pattern:** /^[a-zA-Z0-9\\-_]{1,100}$/
46941
+ * - **Min Length:** 1
46942
+ * - **Max Length:** 100
46943
+ *
46944
+ * @property paymentMethodSetAccounts: List of payment method set accounts
46945
+ *
46946
+ * @property paymentMethods: Configured payment methods
46947
+ *
46948
+ * @property sdkVersion: SDK version to use
46949
+ *
46950
+ */
46951
+ type PaymentConfiguration = {
46952
+ zoneId?: string | null;
46953
+ paymentMethodSetAccounts: Array<PaymentConfigurationPaymentMethodSetAccountsInner>;
46954
+ paymentMethods: Array<PaymentConfigurationPaymentMethodsInner>;
46955
+ sdkVersion: string;
46956
+ } & {
46957
+ [key: string]: any;
46958
+ };
46959
+ type getPaymentConfigurationQueryParameters = {
46960
+ siteId: string;
46961
+ currency: CurrencyCode;
46962
+ countryCode: string;
46963
+ };
46964
+ type getPaymentConfigurationPathParameters = {
46965
+ organizationId: string;
46966
+ };
46967
+ /**
46968
+ * All path parameters that are used by at least one ShopperPayments method.
46969
+ */
46970
+ type ShopperPaymentsPathParameters = Partial<getPaymentConfigurationPathParameters & {}>;
46971
+ /**
46972
+ * All query parameters that are used by at least one ShopperPayments method.
46973
+ */
46974
+ type ShopperPaymentsQueryParameters = Partial<getPaymentConfigurationQueryParameters & {}>;
46975
+ /**
46976
+ * All parameters that are used by ShopperPayments.
46977
+ */
46978
+ type ShopperPaymentsParameters = ShopperPaymentsPathParameters & BaseUriParameters & ShopperPaymentsQueryParameters;
46979
+ /**
46980
+ * [Shopper Payments](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-payments:Summary)
46981
+ * ==================================
46982
+ *
46983
+ * *# API Overview
46984
+
46985
+ Use the Shopper Payments API to retrieve payment configuration information for organizations in the B2C Commerce system.
46986
+
46987
+ The Shopper Payments API provides access to comprehensive payment configuration data, including payment processor settings, gateway configurations, and payment method details.
46988
+
46989
+ ## Key Features
46990
+
46991
+ The Shopper Payments API includes the following capabilities:
46992
+
46993
+ - **Payment Configuration Retrieval**: Get complete payment configuration for an organization
46994
+ - **Payment Method Set Information**: Access details about configured payment method set accounts
46995
+ - **Gateway Response Data**: Retrieve payment processor gateway information and supported payment methods
46996
+ - **Payment Modes Configuration**: View supported payment modes (Multistep, Express) for each payment method
46997
+ - **SDK Version Information**: Get the current SDK version being used
46998
+
46999
+ ## Payment Configuration Endpoint
47000
+
47001
+ The main endpoint `/organizations/{organizationId}/payment-configuration` provides:
47002
+
47003
+ ### Configuration Settings
47004
+ - Multi-step checkout enablement status
47005
+ - Express checkout enablement status
47006
+ - Automatic card capture settings
47007
+ - Zone identification
47008
+ - Saved payment method configuration
47009
+ - Merchant account identification
47010
+
47011
+ ### Payment Method Set Accounts
47012
+ - Account identifiers and configurations
47013
+ - Payment processor API keys and settings
47014
+ - Gateway identifiers and response data
47015
+ - Live/test mode indicators
47016
+ - Vendor information (Stripe, Adyen, PayPal, etc.)
47017
+
47018
+ ### Payment Methods
47019
+ - Supported payment method types (card, paypal, applepay, etc.)
47020
+ - Available payment modes for each method
47021
+ - Account associations
47022
+
47023
+ ## Gateway Response Handling
47024
+
47025
+ The API handles varying gateway response formats:
47026
+ - **Active Gateways**: Return detailed payment method information including supported card brands
47027
+ - **Inactive/Pending Gateways**: May return null gateway response data
47028
+ - **Multiple Vendors**: Support for different payment processors with vendor-specific configurations
47029
+
47030
+ ## Authentication & Authorization
47031
+
47032
+ The client requesting payment configuration information must have access to the `/payment-configuration` resource. The Shopper Payments API requires a shopper access token from the Shopper Login and API Access Service (SLAS).
47033
+
47034
+ For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides.
47035
+
47036
+ You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)
47037
+
47038
+ ## Getting Started
47039
+
47040
+ To use the Shopper Payments API:
47041
+
47042
+ 1. Authenticate with the appropriate scopes (`sfcc.shopper-payments.rw`)
47043
+ 2. Make a GET request to `/organizations/{organizationId}/payment-configuration`
47044
+ 3. Process the returned payment configuration data for your application
47045
+
47046
+ ## Use Cases
47047
+
47048
+ ### Payment Method Discovery
47049
+ Retrieve available payment methods and their capabilities for dynamic payment form generation.
47050
+
47051
+ ### Gateway Status Monitoring
47052
+ Check the status and configuration of payment gateways and processors.
47053
+
47054
+ ### Payment Flow Configuration
47055
+ Determine supported payment modes (multi-step vs express) for different payment methods.
47056
+
47057
+ ### SDK Version Management
47058
+ Ensure compatibility by checking the current SDK version requirements.
47059
+
47060
+ For detailed implementation examples and best practices, refer to the Commerce Cloud documentation. *<br />
47061
+ *
47062
+ * Simple example:
47063
+ *
47064
+ * ```typescript
47065
+ * import { ShopperPayments } from "commerce-sdk-isomorphic";
47066
+ *
47067
+ * const clientConfig = {
47068
+ * parameters: {
47069
+ * clientId: "XXXXXX",
47070
+ * organizationId: "XXXX",
47071
+ * shortCode: "XXX",
47072
+ * siteId: "XX"
47073
+ * }
47074
+ * };
47075
+ * const shopperPaymentsClient = new ShopperPayments(clientConfig);
47076
+ * ```
47077
+ *
47078
+ * <span style="font-size:.7em; display:block; text-align: right">
47079
+ * API Version: 0.0.33<br />
47080
+ * Last Updated: <br />
47081
+ * </span>
47082
+ *
47083
+ *
47084
+ */
47085
+ class ShopperPayments<ConfigParameters extends ShopperPaymentsParameters & Record<string, unknown>> {
47086
+ // baseUri is not required on ClientConfig, but we know that we provide one in the class constructor
47087
+ clientConfig: ClientConfig<ConfigParameters> & {
47088
+ baseUri: string;
47089
+ };
47090
+ static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-payments/v1";
47091
+ static readonly apiPaths: {
47092
+ getPaymentConfiguration: string;
47093
+ };
47094
+ constructor(config: ClientConfigInit<ConfigParameters>);
47095
+ static readonly paramKeys: {
47096
+ readonly getPaymentConfiguration: readonly [
47097
+ "organizationId",
47098
+ "siteId",
47099
+ "currency",
47100
+ "countryCode"
47101
+ ];
47102
+ readonly getPaymentConfigurationRequired: readonly [
47103
+ "organizationId",
47104
+ "siteId",
47105
+ "currency",
47106
+ "countryCode"
47107
+ ];
47108
+ };
47109
+ /**
47110
+ * Retrieves the payment configuration for the organization.
47111
+
47112
+ **Parameters:**
47113
+ - `siteId`: Required. The site identifier for context-specific configuration
47114
+ - `currency`: Required. Three-letter currency code (ISO 4217) for payment method configuration
47115
+ - `countryCode`: Required. Two-letter country code (ISO 3166-1 alpha-2) for country-specific payment configuration
47116
+
47117
+ **Response Behavior:**
47118
+ - Returns payment configuration data when available
47119
+ - Returns null values for missing data (e.g., when account not found or payments zone not found)
47120
+ *
47121
+ * If you would like to get a raw Response object use the other getPaymentConfiguration function.
47122
+ *
47123
+ * @param options - An object containing the options for this method.
47124
+ * @param options.parameters - An object containing the parameters for this method.
47125
+ * @param options.parameters.organizationId - An identifier for the organization the request is being made by
47126
+ * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
47127
+ * @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
47128
+ * @param options.parameters.countryCode - The country code (ISO 3166-1 alpha-2) for country-specific payment configuration filtering
47129
+ * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
47130
+ *
47131
+ * @returns A promise of type PaymentConfiguration.
47132
+ */
47133
+ getPaymentConfiguration(options?: RequireParametersUnlessAllAreOptional<{
47134
+ parameters?: CompositeParameters<{
47135
+ organizationId: string;
47136
+ siteId: string;
47137
+ currency: CurrencyCode;
47138
+ countryCode: string;
47139
+ } & QueryParameters, ConfigParameters>;
47140
+ headers?: {
47141
+ [key: string]: string;
47142
+ };
47143
+ }>): Promise<PaymentConfiguration>;
47144
+ /**
47145
+ * Retrieves the payment configuration for the organization.
47146
+
47147
+ **Parameters:**
47148
+ - `siteId`: Required. The site identifier for context-specific configuration
47149
+ - `currency`: Required. Three-letter currency code (ISO 4217) for payment method configuration
47150
+ - `countryCode`: Required. Two-letter country code (ISO 3166-1 alpha-2) for country-specific payment configuration
47151
+
47152
+ **Response Behavior:**
47153
+ - Returns payment configuration data when available
47154
+ - Returns null values for missing data (e.g., when account not found or payments zone not found)
47155
+ *
47156
+ * @param options - An object containing the options for this method.
47157
+ * @param options.parameters - An object containing the parameters for this method.
47158
+ * @param options.parameters.organizationId - An identifier for the organization the request is being made by
47159
+ * @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
47160
+ * @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
47161
+ * @param options.parameters.countryCode - The country code (ISO 3166-1 alpha-2) for country-specific payment configuration filtering
47162
+ * @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
47163
+ * @param rawResponse - Set to true to return entire Response object instead of DTO.
47164
+ *
47165
+ * @returns A promise of type Response if rawResponse is true, a promise of type PaymentConfiguration otherwise.
47166
+ */
47167
+ getPaymentConfiguration<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
47168
+ parameters?: CompositeParameters<{
47169
+ organizationId: string;
47170
+ siteId: string;
47171
+ currency: CurrencyCode;
47172
+ countryCode: string;
47173
+ } & QueryParameters, ConfigParameters>;
47174
+ headers?: {
47175
+ [key: string]: string;
47176
+ };
47177
+ }>, rawResponse?: T): Promise<T extends true ? Response : PaymentConfiguration>;
47178
+ }
47179
+ }
47180
+ declare namespace ShopperPaymentsModelTypes {
47181
+ /**
47182
+ * A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number.
47183
+ */
47184
+ type NoValue = "N/A";
47185
+ /**
47186
+ * @type CurrencyCode
47187
+ * A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
47188
+ */
47189
+ type CurrencyCode = NoValue | string;
47190
+ /**
47191
+ * @type PaymentConfigurationPaymentMethodsInner:
47192
+ *
47193
+ * @property accountId: Associated account identifier
47194
+ * - **Min Length:** 1
47195
+ *
47196
+ * @property paymentMethodType: Type of payment method
47197
+ *
47198
+ * @property paymentModes: Supported payment modes
47199
+ *
47200
+ */
47201
+ type PaymentConfigurationPaymentMethodsInner = {
47202
+ accountId: string;
47203
+ paymentMethodType: string;
47204
+ paymentModes: Array<string>;
47205
+ } & {
47206
+ [key: string]: any;
47207
+ };
47208
+ /**
47209
+ * @type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponsePaymentMethodsInner:
47210
+ *
47211
+ * @property brands: Supported card brands
47212
+ *
47213
+ * @property type: Payment method type
47214
+ *
47215
+ */
47216
+ type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponsePaymentMethodsInner = {
47217
+ brands?: Array<string>;
47218
+ type?: string;
47219
+ } & {
47220
+ [key: string]: any;
47221
+ };
47222
+ /**
47223
+ * @type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponse: Gateway response data (optional, can be null)
47224
+ *
47225
+ * @property paymentMethods: Available payment methods from gateway
47226
+ *
47227
+ */
47228
+ type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponse = {
47229
+ paymentMethods?: Array<PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponsePaymentMethodsInner>;
47230
+ } & {
47231
+ [key: string]: any;
47232
+ };
47233
+ /**
47234
+ * @type PaymentConfigurationPaymentMethodSetAccountsInnerConfig: Account configuration
47235
+ *
47236
+ * @property key: API key for the payment processor
47237
+ * - **Max Length:** 200
47238
+ *
47239
+ */
47240
+ type PaymentConfigurationPaymentMethodSetAccountsInnerConfig = {
47241
+ key?: string;
47242
+ } & {
47243
+ [key: string]: any;
47244
+ };
47245
+ /**
47246
+ * @type PaymentConfigurationPaymentMethodSetAccountsInner:
47247
+ *
47248
+ * @property accountId: Account identifier
47249
+ * - **Min Length:** 1
47250
+ * - **Max Length:** 100
47251
+ *
47252
+ * @property config:
47253
+ *
47254
+ * @property gatewayId: Gateway identifier
47255
+ * - **Min Length:** 1
47256
+ *
47257
+ * @property gatewayResponse:
47258
+ *
47259
+ * @property isLive: Whether the account is in live mode
47260
+ *
47261
+ * @property vendor: Payment vendor name
47262
+ *
47263
+ */
47264
+ type PaymentConfigurationPaymentMethodSetAccountsInner = {
47265
+ accountId: string;
47266
+ config?: PaymentConfigurationPaymentMethodSetAccountsInnerConfig;
47267
+ gatewayId: string;
47268
+ gatewayResponse?: PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponse | null;
47269
+ isLive: boolean;
47270
+ vendor: string;
47271
+ } & {
47272
+ [key: string]: any;
47273
+ };
47274
+ /**
47275
+ * @type PaymentConfiguration:
47276
+ *
47277
+ * @property zoneId: The unique identifier for a Payments zone.
47278
+ * - **Pattern:** /^[a-zA-Z0-9\\-_]{1,100}$/
47279
+ * - **Min Length:** 1
47280
+ * - **Max Length:** 100
47281
+ *
47282
+ * @property paymentMethodSetAccounts: List of payment method set accounts
47283
+ *
47284
+ * @property paymentMethods: Configured payment methods
47285
+ *
47286
+ * @property sdkVersion: SDK version to use
47287
+ *
47288
+ */
47289
+ type PaymentConfiguration = {
47290
+ zoneId?: string | null;
47291
+ paymentMethodSetAccounts: Array<PaymentConfigurationPaymentMethodSetAccountsInner>;
47292
+ paymentMethods: Array<PaymentConfigurationPaymentMethodsInner>;
47293
+ sdkVersion: string;
47294
+ } & {
47295
+ [key: string]: any;
47296
+ };
47297
+ }
47298
+ declare namespace ShopperPaymentsTypes {
47299
+ // API types
47300
+ type ShopperPaymentsPathParameters = ShopperPaymentsApiTypes.ShopperPaymentsPathParameters;
47301
+ type ShopperPaymentsQueryParameters = ShopperPaymentsApiTypes.ShopperPaymentsQueryParameters;
47302
+ type getPaymentConfigurationQueryParameters = ShopperPaymentsApiTypes.getPaymentConfigurationQueryParameters;
47303
+ type getPaymentConfigurationPathParameters = ShopperPaymentsApiTypes.getPaymentConfigurationPathParameters;
47304
+ // Model types
47305
+ type CurrencyCode = ShopperPaymentsModelTypes.CurrencyCode;
47306
+ type NoValue = ShopperPaymentsModelTypes.NoValue;
47307
+ type PaymentConfiguration = ShopperPaymentsModelTypes.PaymentConfiguration;
47308
+ type PaymentConfigurationPaymentMethodSetAccountsInner = ShopperPaymentsModelTypes.PaymentConfigurationPaymentMethodSetAccountsInner;
47309
+ type PaymentConfigurationPaymentMethodSetAccountsInnerConfig = ShopperPaymentsModelTypes.PaymentConfigurationPaymentMethodSetAccountsInnerConfig;
47310
+ type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponse = ShopperPaymentsModelTypes.PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponse;
47311
+ type PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponsePaymentMethodsInner = ShopperPaymentsModelTypes.PaymentConfigurationPaymentMethodSetAccountsInnerGatewayResponsePaymentMethodsInner;
47312
+ type PaymentConfigurationPaymentMethodsInner = ShopperPaymentsModelTypes.PaymentConfigurationPaymentMethodsInner;
47313
+ }
46302
47314
  /**
46303
47315
  * @type Image: Product image
46304
47316
  *
@@ -46515,12 +47527,12 @@ type ProductPromotion$0 = {
46515
47527
  /**
46516
47528
  * A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number.
46517
47529
  */
46518
- type NoValue$3 = "N/A";
47530
+ type NoValue$4 = "N/A";
46519
47531
  /**
46520
47532
  * @type CurrencyCode
46521
47533
  * A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
46522
47534
  */
46523
- type CurrencyCode$3 = NoValue$3 | string;
47535
+ type CurrencyCode$4 = NoValue$4 | string;
46524
47536
  /**
46525
47537
  * @type Master: The master product is a representation of a group of variant products. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn\'t have a SKU.*
46526
47538
  *
@@ -46809,7 +47821,7 @@ type Inventory$0 = {
46809
47821
  type Product$0 = {
46810
47822
  brand?: string;
46811
47823
  bundledProducts?: Array<BundledProduct>;
46812
- currency?: CurrencyCode$3;
47824
+ currency?: CurrencyCode$4;
46813
47825
  ean?: string;
46814
47826
  fetchDate?: number;
46815
47827
  id: string;
@@ -47006,7 +48018,7 @@ type getProductQueryParameters = {
47006
48018
  allImages?: boolean;
47007
48019
  perPricebook?: boolean;
47008
48020
  select?: string;
47009
- currency?: CurrencyCode$3;
48021
+ currency?: CurrencyCode$4;
47010
48022
  locale?: LocaleCode$5;
47011
48023
  siteId: string;
47012
48024
  };
@@ -47023,7 +48035,7 @@ type getProductsQueryParameters = {
47023
48035
  siteId: string;
47024
48036
  select?: string;
47025
48037
  locale?: LocaleCode$5;
47026
- currency?: CurrencyCode$3;
48038
+ currency?: CurrencyCode$4;
47027
48039
  };
47028
48040
  type getProductsPathParameters = {
47029
48041
  organizationId: string;
@@ -47390,7 +48402,7 @@ declare class ShopperProducts<ConfigParameters extends ShopperProductsParameters
47390
48402
  allImages?: boolean;
47391
48403
  perPricebook?: boolean;
47392
48404
  select?: string;
47393
- currency?: CurrencyCode$3;
48405
+ currency?: CurrencyCode$4;
47394
48406
  locale?: LocaleCode$5;
47395
48407
  } & QueryParameters, ConfigParameters>;
47396
48408
  headers?: {
@@ -47429,7 +48441,7 @@ declare class ShopperProducts<ConfigParameters extends ShopperProductsParameters
47429
48441
  allImages?: boolean;
47430
48442
  perPricebook?: boolean;
47431
48443
  select?: string;
47432
- currency?: CurrencyCode$3;
48444
+ currency?: CurrencyCode$4;
47433
48445
  locale?: LocaleCode$5;
47434
48446
  } & QueryParameters, ConfigParameters>;
47435
48447
  headers?: {
@@ -47470,7 +48482,7 @@ declare class ShopperProducts<ConfigParameters extends ShopperProductsParameters
47470
48482
  perPricebook?: boolean;
47471
48483
  select?: string;
47472
48484
  locale?: LocaleCode$5;
47473
- currency?: CurrencyCode$3;
48485
+ currency?: CurrencyCode$4;
47474
48486
  } & QueryParameters, ConfigParameters>;
47475
48487
  headers?: {
47476
48488
  [key: string]: string;
@@ -47509,7 +48521,7 @@ declare class ShopperProducts<ConfigParameters extends ShopperProductsParameters
47509
48521
  perPricebook?: boolean;
47510
48522
  select?: string;
47511
48523
  locale?: LocaleCode$5;
47512
- currency?: CurrencyCode$3;
48524
+ currency?: CurrencyCode$4;
47513
48525
  } & QueryParameters, ConfigParameters>;
47514
48526
  headers?: {
47515
48527
  [key: string]: string;
@@ -50628,12 +51640,12 @@ type CategorySuggestions = {
50628
51640
  /**
50629
51641
  * A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number.
50630
51642
  */
50631
- type NoValue$4 = "N/A";
51643
+ type NoValue$5 = "N/A";
50632
51644
  /**
50633
51645
  * @type CurrencyCode
50634
51646
  * A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
50635
51647
  */
50636
- type CurrencyCode$4 = NoValue$4 | string;
51648
+ type CurrencyCode$5 = NoValue$5 | string;
50637
51649
  /**
50638
51650
  * @type CustomSuggestions: The custom suggestions are listed in suggested phrases. If this list is empty, no custom suggestion for the given search phrase was found.
50639
51651
  *
@@ -50981,7 +51993,7 @@ type ProductType$1 = {
50981
51993
  *
50982
51994
  */
50983
51995
  type ProductSearchHit = {
50984
- currency?: CurrencyCode$4;
51996
+ currency?: CurrencyCode$5;
50985
51997
  hitType?: string;
50986
51998
  image?: Image$1;
50987
51999
  orderable?: boolean;
@@ -51149,7 +52161,7 @@ type ProductSearchResult = {
51149
52161
  *
51150
52162
  */
51151
52163
  type SuggestedProduct = {
51152
- currency: CurrencyCode$4;
52164
+ currency: CurrencyCode$5;
51153
52165
  price: number;
51154
52166
  productId: string;
51155
52167
  productName: string;
@@ -51207,7 +52219,7 @@ type getSearchSuggestionsQueryParameters = {
51207
52219
  siteId: string;
51208
52220
  q: string;
51209
52221
  limit?: number;
51210
- currency?: CurrencyCode$4;
52222
+ currency?: CurrencyCode$5;
51211
52223
  locale?: LocaleCode$7;
51212
52224
  expand?: Array<"images" | "prices" | "custom_product_properties">;
51213
52225
  includedCustomProductProperties?: Array<string>;
@@ -51222,7 +52234,7 @@ type productSearchQueryParameters = {
51222
52234
  q?: string;
51223
52235
  refine?: string;
51224
52236
  sort?: string;
51225
- currency?: CurrencyCode$4;
52237
+ currency?: CurrencyCode$5;
51226
52238
  locale?: LocaleCode$7;
51227
52239
  expand?: Array<"none" | "availability" | "images" | "prices" | "represented_products" | "variations" | "promotions" | "custom_properties" | "page_meta_tags">;
51228
52240
  allImages?: boolean;
@@ -51452,7 +52464,7 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
51452
52464
  siteId: string;
51453
52465
  q: string;
51454
52466
  limit?: number;
51455
- currency?: CurrencyCode$4;
52467
+ currency?: CurrencyCode$5;
51456
52468
  locale?: LocaleCode$7;
51457
52469
  expand?: Array<GetSearchSuggestionsExpandEnum>;
51458
52470
  includedCustomProductProperties?: Array<string>;
@@ -51489,7 +52501,7 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
51489
52501
  siteId: string;
51490
52502
  q: string;
51491
52503
  limit?: number;
51492
- currency?: CurrencyCode$4;
52504
+ currency?: CurrencyCode$5;
51493
52505
  locale?: LocaleCode$7;
51494
52506
  expand?: Array<GetSearchSuggestionsExpandEnum>;
51495
52507
  includedCustomProductProperties?: Array<string>;
@@ -51557,7 +52569,7 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
51557
52569
  q?: string;
51558
52570
  refine?: string;
51559
52571
  sort?: string;
51560
- currency?: CurrencyCode$4;
52572
+ currency?: CurrencyCode$5;
51561
52573
  locale?: LocaleCode$7;
51562
52574
  expand?: Array<ProductSearchExpandEnum>;
51563
52575
  allImages?: boolean;
@@ -51628,7 +52640,7 @@ declare class ShopperSearch<ConfigParameters extends ShopperSearchParameters & R
51628
52640
  q?: string;
51629
52641
  refine?: string;
51630
52642
  sort?: string;
51631
- currency?: CurrencyCode$4;
52643
+ currency?: CurrencyCode$5;
51632
52644
  locale?: LocaleCode$7;
51633
52645
  expand?: Array<ProductSearchExpandEnum>;
51634
52646
  allImages?: boolean;
@@ -57834,11 +58846,12 @@ declare const pkg: {
57834
58846
  ShopperGiftCertificates: typeof ShopperGiftCertificates;
57835
58847
  ShopperLogin: typeof ShopperLogin;
57836
58848
  ShopperOrders: typeof ShopperOrders;
58849
+ ShopperPayments: typeof ShopperPayments;
57837
58850
  ShopperProducts: typeof ShopperProducts;
57838
58851
  ShopperPromotions: typeof ShopperPromotions;
57839
58852
  ShopperSearch: typeof ShopperSearch;
57840
58853
  ShopperSEO: typeof ShopperSEO;
57841
58854
  ShopperStores: typeof ShopperStores;
57842
58855
  };
57843
- export { pkg as default, ShopperBaskets, ShopperBasketsV2, ShopperConfigurations, ShopperConsents, ShopperContexts, ShopperCustomers, ShopperExperience, ShopperGiftCertificates, ShopperLogin, ShopperOrders, ShopperProducts, ShopperPromotions, ShopperSearch, ShopperSEO, ShopperStores, ClientConfig, TemplateURL, helpers };
57844
- export type { ShopperBasketsTypes, ShopperBasketsV2Types, ShopperConfigurationsTypes, ShopperConsentsTypes, ShopperContextsTypes, ShopperCustomersTypes, ShopperExperienceTypes, ShopperGiftCertificatesTypes, ShopperLoginTypes, ShopperOrdersTypes, ShopperProductsTypes, ShopperPromotionsTypes, ShopperSearchTypes, ShopperSEOTypes, ShopperStoresTypes, ClientConfigInit, FetchFunction, FetchOptions };
58856
+ export { pkg as default, ShopperBaskets, ShopperBasketsV2, ShopperConfigurations, ShopperConsents, ShopperContexts, ShopperCustomers, ShopperExperience, ShopperGiftCertificates, ShopperLogin, ShopperOrders, ShopperPayments, ShopperProducts, ShopperPromotions, ShopperSearch, ShopperSEO, ShopperStores, ClientConfig, TemplateURL, helpers };
58857
+ export type { ShopperBasketsTypes, ShopperBasketsV2Types, ShopperConfigurationsTypes, ShopperConsentsTypes, ShopperContextsTypes, ShopperCustomersTypes, ShopperExperienceTypes, ShopperGiftCertificatesTypes, ShopperLoginTypes, ShopperOrdersTypes, ShopperPaymentsTypes, ShopperProductsTypes, ShopperPromotionsTypes, ShopperSearchTypes, ShopperSEOTypes, ShopperStoresTypes, ClientConfigInit, FetchFunction, FetchOptions };