@epcc-sdk/sdks-shopper 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/@tanstack/react-query.gen.d.ts +32 -20
- package/dist/client/@tanstack/react-query.gen.js +16 -16
- package/dist/client/sdk.gen.d.ts +210 -22
- package/dist/client/sdk.gen.js +203 -19
- package/dist/client/types.gen.d.ts +166 -46
- package/package.json +1 -1
package/dist/client/sdk.gen.js
CHANGED
|
@@ -1417,6 +1417,35 @@ export var getCarts = function (options) {
|
|
|
1417
1417
|
* - Preview cart interactions skip inventory checks and events, allowing users to preview future carts without impacting related external systems.
|
|
1418
1418
|
* :::
|
|
1419
1419
|
*
|
|
1420
|
+
* ### Custom Attributes
|
|
1421
|
+
* You can create custom attributes for the cart object to include additional information, enabling promotions that target specific cart attributes.
|
|
1422
|
+
* For example:
|
|
1423
|
+
* ```
|
|
1424
|
+
* "custom_attributes":{
|
|
1425
|
+
* "membership": {
|
|
1426
|
+
* "type": "string",
|
|
1427
|
+
* "value": "VIP"
|
|
1428
|
+
* }
|
|
1429
|
+
* }
|
|
1430
|
+
* ```
|
|
1431
|
+
* See [adding cart custom attributes in promotions builder](/docs/commerce-manager/promotions-builder/creating-a-promotion-in-promotions-builder#adding-cart-custom-attributes)
|
|
1432
|
+
*
|
|
1433
|
+
* Cart custom attributes remain with the corresponding cart for the extent of its lifecycle. These custom attributes carry over to the resulting order objects on checkout and those on carts are deleted with their carts upon cart deletions.
|
|
1434
|
+
* Custom attributes can be updated or removed using a PUT request. To delete specific custom attributes, simply exclude the unwanted attribute objects from the PUT request body.
|
|
1435
|
+
*
|
|
1436
|
+
* ### Contact Email
|
|
1437
|
+
* You can attach an email to carts via the `contact.email` field. These values help identify guest shopper carts and, in the case of promotions with maximum usage settings for guest and registered shopper, track per-shopper promotion usages.
|
|
1438
|
+
* See [Create Max Uses Per Shopper Promotion Codes](/docs/promotions-builder/promotions-builder-codes/create-max-use-limit-promotion-codes)
|
|
1439
|
+
*
|
|
1440
|
+
* For example:
|
|
1441
|
+
* ```
|
|
1442
|
+
* "contact": {
|
|
1443
|
+
* "email": "tester@email.com"
|
|
1444
|
+
* }
|
|
1445
|
+
* ```
|
|
1446
|
+
*
|
|
1447
|
+
* Please note, this value is not supported for registered shopper carts (that is, carts with accounts or customers associated), as these carts already have email values associated via the shopper details. Accordingly, requests to add contact email information to registered shopper carts (and vice versa) result in error messages.
|
|
1448
|
+
*
|
|
1420
1449
|
* ### Errors
|
|
1421
1450
|
*
|
|
1422
1451
|
* - `400 Bad Request` : This is returned when the submitted request does not adhere to the expected API contract for the endpoint.
|
|
@@ -1473,7 +1502,7 @@ export var deleteACart = function (options) {
|
|
|
1473
1502
|
* :::note
|
|
1474
1503
|
*
|
|
1475
1504
|
* - The default cart name is Cart. However, you can update the cart name as required. Ensure that the string length of the name is greater than or equal to one. Follow the safe character guidelines for name and description naming. For more information about cart ID naming requirements, see the [Safe Characters](/guides/Getting-Started/safe-characters) section.
|
|
1476
|
-
* - Outside of the JS-SDK, we don
|
|
1505
|
+
* - Outside of the JS-SDK, we don't handle creating cart references. You need to create your own.
|
|
1477
1506
|
*
|
|
1478
1507
|
* :::
|
|
1479
1508
|
*
|
|
@@ -1723,7 +1752,7 @@ export var getCartItems = function (options) {
|
|
|
1723
1752
|
], url: "/v2/carts/{cartID}/items" }));
|
|
1724
1753
|
};
|
|
1725
1754
|
/**
|
|
1726
|
-
*
|
|
1755
|
+
* Add Items to Cart
|
|
1727
1756
|
*
|
|
1728
1757
|
* ### Add Product to Cart
|
|
1729
1758
|
*
|
|
@@ -1811,10 +1840,16 @@ export var getCartItems = function (options) {
|
|
|
1811
1840
|
* - For [Fixed Bundle Discount Promotions](/docs/api/promotions/create-a-promotion), the promotion applies as long as the cart contains the bundle SKUs even when there are different `custom_inputs`.
|
|
1812
1841
|
* - For [X for Y Discount Promotion and X for amount discount promotion](/docs/api/promotions/create-a-promotion), the promotion applies when there are two SKUs with the same `custom_inputs`. The promotion does not apply when there are different `custom_inputs` and the SKUs are in different line items.
|
|
1813
1842
|
*
|
|
1843
|
+
* #### Stock locations
|
|
1844
|
+
*
|
|
1845
|
+
* When adding to a cart it is possible to specify which [stock location](/docs/api/pxm/inventory_mli/inventories-introduction?#multi-location-inventories) should be used for tracking inventory for that product by specifying its slug in `location`. This might represent the warehouse a product is shipped from or the store holding the stock in a Buy Online Pick Up In Store scenario.
|
|
1846
|
+
*
|
|
1847
|
+
* Each line item is restricted to a single stock location. If the same product is added with a different location then the most recently-specified location will be used for the total quantity of that line item.
|
|
1848
|
+
*
|
|
1814
1849
|
* :::note
|
|
1815
1850
|
*
|
|
1816
1851
|
* - Any requests to add a product to cart returns the collection of cart items.
|
|
1817
|
-
* - [Tax items](/docs/api/carts/tax-items) may optionally be added with the product. Only administrators with [
|
|
1852
|
+
* - [Tax items](/docs/api/carts/tax-items) may optionally be added with the product. Only administrators with [client_credentials access tokens](/docs/api/authentication/create-an-access-token) are able to do this. If included, they replace any existing taxes on the product.
|
|
1818
1853
|
* - The cart currency is set when the first item is added to the cart.
|
|
1819
1854
|
* - The product being added to the cart requires a price in the same currency as the other items in the cart. The API returns a 400 error if a price is not defined in the correct currency.
|
|
1820
1855
|
* - A cart can contain a maximum of 100 unique items. Items include products, custom items, tax items, and promotions.
|
|
@@ -1822,15 +1857,129 @@ export var getCartItems = function (options) {
|
|
|
1822
1857
|
*
|
|
1823
1858
|
* :::
|
|
1824
1859
|
*
|
|
1860
|
+
* ### Including Resources
|
|
1861
|
+
*
|
|
1862
|
+
* When you make an `Add Product to Cart` request to the catalog-view service, you can obtain details of the component products. If you include the optional parameter `include=component_products` in the request, the response will include details for each component product.
|
|
1863
|
+
*
|
|
1864
|
+
* When a bundle with selected component products is added to a cart, the cart displays both the bundle pricing and component product IDs.
|
|
1865
|
+
*
|
|
1866
|
+
* The response example is returned with a new field called `component_products` under `bundle_configuration`, which is a list of component products that the user has selected for dynamic bundles.
|
|
1867
|
+
*
|
|
1868
|
+
* | Parameter | Required | Description |
|
|
1869
|
+
* |:------------------------|:-------------|:-------------------|
|
|
1870
|
+
* | `component_products` | Optional | The component product data and key attribute data, such as SKU or slug, to return for component products in a product bundle. |
|
|
1871
|
+
* | `main_image` | Optional | The main images associated with a product. |
|
|
1872
|
+
* | `files` | Optional | Any files associated with a product. |
|
|
1873
|
+
*
|
|
1874
|
+
* ```json
|
|
1875
|
+
* "bundle_configuration": {
|
|
1876
|
+
* "selected_options": {
|
|
1877
|
+
* "mixed-shirts": {
|
|
1878
|
+
* "16a6cc14-6ebb-4156-9973-e6a0f92f5731": 3,
|
|
1879
|
+
* "55037cc5-f382-4039-95c6-1e04ac0351d3": 2,
|
|
1880
|
+
* "standard-shirts"
|
|
1881
|
+
* "70f1c9d2-c580-4839-bd6c-a0a9b91d5159": 5
|
|
1882
|
+
* }
|
|
1883
|
+
* },
|
|
1884
|
+
* "component_products": [
|
|
1885
|
+
* {
|
|
1886
|
+
* "id": "16a6cc14-6ebb-4156-9973-e6a0f92f5731",
|
|
1887
|
+
* "type": "product",
|
|
1888
|
+
* "attributes": {
|
|
1889
|
+
* "name": "Red T-shirt",
|
|
1890
|
+
* "description": "Standard red t-shirt.",
|
|
1891
|
+
* "slug": "red-t-shirt-slug",
|
|
1892
|
+
* "sku": "red-t-shirt-sku",
|
|
1893
|
+
* "status": "live",
|
|
1894
|
+
* "commodity_type": "physical"
|
|
1895
|
+
* },
|
|
1896
|
+
* "meta": {
|
|
1897
|
+
* "display_price": {
|
|
1898
|
+
* "without_tax": {
|
|
1899
|
+
* "amount": 500,
|
|
1900
|
+
* "currency": "USD",
|
|
1901
|
+
* "formatted": "$5.00"
|
|
1902
|
+
* }
|
|
1903
|
+
* }
|
|
1904
|
+
* }
|
|
1905
|
+
* },
|
|
1906
|
+
* {
|
|
1907
|
+
* "id": "55037cc5-f382-4039-95c6-1e04ac0351d3",
|
|
1908
|
+
* "type": "product",
|
|
1909
|
+
* "attributes": {
|
|
1910
|
+
* "name": "Blue T-shirt",
|
|
1911
|
+
* "description": "Standard blue t-shirt.",
|
|
1912
|
+
* "slug": "blue-t-shirt-slug",
|
|
1913
|
+
* "sku": "blue-t-shirt-sku",
|
|
1914
|
+
* "status": "live",
|
|
1915
|
+
* "commodity_type": "physical"
|
|
1916
|
+
* },
|
|
1917
|
+
* "meta": {
|
|
1918
|
+
* "display_price": {
|
|
1919
|
+
* "without_tax": {
|
|
1920
|
+
* "amount": 500,
|
|
1921
|
+
* "currency": "USD",
|
|
1922
|
+
* "formatted": "$5.00"
|
|
1923
|
+
* }
|
|
1924
|
+
* }
|
|
1925
|
+
* }
|
|
1926
|
+
* },
|
|
1927
|
+
* {
|
|
1928
|
+
* "id": "70f1c9d2-c580-4839-bd6c-a0a9b91d5159",
|
|
1929
|
+
* "type": "product",
|
|
1930
|
+
* "attributes": {
|
|
1931
|
+
* "name": "White T-shirt",
|
|
1932
|
+
* "description": "Standard white t-shirt.",
|
|
1933
|
+
* "slug": "white-t-shirt-slug",
|
|
1934
|
+
* "sku": "white-t-shirt-sku",
|
|
1935
|
+
* "status": "live",
|
|
1936
|
+
* "commodity_type": "physical"
|
|
1937
|
+
* },
|
|
1938
|
+
* "meta": {
|
|
1939
|
+
* "display_price": {
|
|
1940
|
+
* "without_tax": {
|
|
1941
|
+
* "amount": 500,
|
|
1942
|
+
* "currency": "USD",
|
|
1943
|
+
* "formatted": "$5.00"
|
|
1944
|
+
* }
|
|
1945
|
+
* }
|
|
1946
|
+
* }
|
|
1947
|
+
* }
|
|
1948
|
+
* ]
|
|
1949
|
+
* }
|
|
1950
|
+
* ```
|
|
1951
|
+
*
|
|
1952
|
+
* See [Including Resources](https://elasticpath.dev/guides/Getting-Started/includes).
|
|
1953
|
+
*
|
|
1954
|
+
* ### Add Subscription to Cart
|
|
1955
|
+
*
|
|
1956
|
+
* To add a subscription to your cart, you need to provide the ID of the subscription offering and the ID of the plan within that offering that you want to subscribe to.
|
|
1957
|
+
*
|
|
1958
|
+
* ```json
|
|
1959
|
+
* {
|
|
1960
|
+
* {
|
|
1961
|
+
* "data": {
|
|
1962
|
+
* "id": "5b9be99f-1c94-4ddd-9718-81adab0cc3e0",
|
|
1963
|
+
* "type": "subscription_item",
|
|
1964
|
+
* "quantity": 1,
|
|
1965
|
+
* "subscription_configuration": {
|
|
1966
|
+
* "plan": "40010dde-2f38-489b-8b3f-14a13cbfb431"
|
|
1967
|
+
* }
|
|
1968
|
+
* }
|
|
1969
|
+
* }
|
|
1970
|
+
* ```
|
|
1971
|
+
*
|
|
1972
|
+
* The price of the subscription item in the cart reflects the cost of the subscription's initial billing period. Once the cart has been checked out and the order paid for, the subscription will be automatically created in the subscriptions service.
|
|
1973
|
+
*
|
|
1825
1974
|
* ### Add Custom Item to Cart
|
|
1826
1975
|
*
|
|
1827
1976
|
* You can add a custom item to the cart when you don't manage things like shipping, taxes and inventory in Commerce.
|
|
1828
1977
|
*
|
|
1829
|
-
* For [Shipping Groups](/docs/ship-groups/shipping-groups), once you have created a [cart shipping group](/docs/ship-groups/shipping-groups/shipping-groups-api/create-cart-shipping-group), you need to link it to the cart items. This is important, because it is necessary to associate items with shipping groups in order to include shipping groups in the corresponding cart, order, and totals.
|
|
1978
|
+
* For [Shipping Groups](/docs/ship-groups/shipping-groups/index), once you have created a [cart shipping group](/docs/ship-groups/shipping-groups/shipping-groups-api/create-cart-shipping-group), you need to link it to the cart items. This is important, because it is necessary to associate items with shipping groups in order to include shipping groups in the corresponding cart, order, and totals.
|
|
1830
1979
|
*
|
|
1831
1980
|
* :::note
|
|
1832
1981
|
*
|
|
1833
|
-
* - Custom Cart Items are available
|
|
1982
|
+
* - Custom Cart Items are available when using [implicit access tokens](/docs/api/authentication/create-an-access-token). Ensure that you always check each order has the correct details for each item, most importantly, price.
|
|
1834
1983
|
*
|
|
1835
1984
|
* :::
|
|
1836
1985
|
*
|
|
@@ -2139,7 +2288,7 @@ export var bulkDeleteTaxItemsFromCart = function (options) {
|
|
|
2139
2288
|
*
|
|
2140
2289
|
* `422 Unprocessable Entity`
|
|
2141
2290
|
*
|
|
2142
|
-
* In this example, when `options.add_all_or_nothing` is set to `true` and if one of cart items is not found or
|
|
2291
|
+
* In this example, when `options.add_all_or_nothing` is set to `true` and if one of cart items is not found or has reached its maximum tax item limit, the following error response is returned:
|
|
2143
2292
|
*
|
|
2144
2293
|
* ```json
|
|
2145
2294
|
* {
|
|
@@ -2215,7 +2364,7 @@ export var deleteATaxItem = function (options) {
|
|
|
2215
2364
|
], url: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}" }));
|
|
2216
2365
|
};
|
|
2217
2366
|
/**
|
|
2218
|
-
* Update a
|
|
2367
|
+
* Update a Tax Item
|
|
2219
2368
|
* Use this endpoint to update a tax item.
|
|
2220
2369
|
*/
|
|
2221
2370
|
export var updateATaxItem = function (options) {
|
|
@@ -2367,10 +2516,10 @@ export var createCartPaymentIntent = function (options) {
|
|
|
2367
2516
|
* After a successful checkout, a response that contains the order is returned. If the cart is linked to a shipping group, the shipping group is also associated with the order after checkout.
|
|
2368
2517
|
*
|
|
2369
2518
|
* You can checkout using one of the following methods:
|
|
2370
|
-
* - Customer ID
|
|
2371
|
-
* - Guest Checkout (Checkout with Customer Object)
|
|
2372
|
-
* - Checkout with Account
|
|
2373
|
-
* - Checkout with Account Management Authentication Token
|
|
2519
|
+
* - **Customer ID**: You can checkout a cart with an existing customer ID.
|
|
2520
|
+
* - **Guest Checkout** (Checkout with Customer Object): You can checkout a cart with an associated customer name and email.
|
|
2521
|
+
* - **Checkout with Account**: The shopper authenticates with the `Client Credentials` Token.
|
|
2522
|
+
* - **Checkout with Account Management Authentication Token**: The shopper authenticates with the `Implicit Token` and the `EP-Account-Management-Authentication-Token`.
|
|
2374
2523
|
*
|
|
2375
2524
|
* :::note
|
|
2376
2525
|
*
|
|
@@ -2387,6 +2536,8 @@ export var createCartPaymentIntent = function (options) {
|
|
|
2387
2536
|
*
|
|
2388
2537
|
* :::
|
|
2389
2538
|
*
|
|
2539
|
+
* You can pass `order_number` and `external_ref` in the checkout endpoint or when [updating an order](/docs/api/carts/update-an-order). The `order_number` is an optional, user-managed field that is used as an alternative to `order_id`. When processing transactions through Authorize.net, the `order_number` is sent instead of the `order_id`, and it will appear in the invoice number section. If no `order_number` is provided, the `order_id` is sent to Authorize.net on payment by default. There are no duplication restrictions on the `order_number` value.
|
|
2540
|
+
*
|
|
2390
2541
|
* ### Next Steps
|
|
2391
2542
|
*
|
|
2392
2543
|
* After a cart has been converted to an Order using either of the previous methods, you most likely want to capture payment for order. See [Paying for an Order](/docs/api/carts/payments).
|
|
@@ -2422,7 +2573,7 @@ export var checkoutApi = function (options) {
|
|
|
2422
2573
|
], url: "/v2/carts/{cartID}/checkout" }));
|
|
2423
2574
|
};
|
|
2424
2575
|
/**
|
|
2425
|
-
* Get
|
|
2576
|
+
* Get all Orders
|
|
2426
2577
|
* This endpoint returns all orders with custom flow fields. The pagination offset is set to fetch a maximum of 10,000 orders. If the store has 10,000 orders and you fetch the orders without using filters, an error is returned. Use a filter to view orders when the order is beyond the 10,000 mark.
|
|
2427
2578
|
*
|
|
2428
2579
|
* :::note
|
|
@@ -2459,6 +2610,7 @@ export var checkoutApi = function (options) {
|
|
|
2459
2610
|
* | `created_at` | `date` | `eq` / `gt` / `ge`/ `le` / `lt` | `gt(created_at,YYYY-MM-DD)` |
|
|
2460
2611
|
* | `updated_at` | `date` | `eq` / `gt` / `ge`/ `le`/ `lt` | `lt(updated_at,YYYY-MM-DD)` |
|
|
2461
2612
|
* | `external_ref` | `string` | `eq` / `like` | `like(external_ref, 16be*)` |
|
|
2613
|
+
* | `order_number` | `string` | `eq` / `like` | `like(order_number, 123*)` |
|
|
2462
2614
|
*
|
|
2463
2615
|
*/
|
|
2464
2616
|
export var getCustomerOrders = function (options) {
|
|
@@ -2485,7 +2637,13 @@ export var getAnOrder = function (options) {
|
|
|
2485
2637
|
};
|
|
2486
2638
|
/**
|
|
2487
2639
|
* Update an Order
|
|
2488
|
-
* You can only update custom data, `shipping`, `shipping_address`, and status
|
|
2640
|
+
* You can only update custom data, `shipping`, `shipping_address`, and status of orders. All other settings in the order object are immutable.
|
|
2641
|
+
*
|
|
2642
|
+
* This endpoint allows you to:
|
|
2643
|
+
*
|
|
2644
|
+
* - **Update an order number and external reference**: You can update an existing order that does not have an `order_number` and `external_ref`, modify the `order_number` and `external_ref` values, or remove them by passing an empty value in the `order_number` and `external_ref` fields.
|
|
2645
|
+
* - **Cancel an order**: You can cancel an order only if it has not been fulfilled.
|
|
2646
|
+
* - **Fulfill an order**: You can fulfill a paid order only.
|
|
2489
2647
|
*
|
|
2490
2648
|
* :::caution
|
|
2491
2649
|
*
|
|
@@ -2497,6 +2655,7 @@ export var getAnOrder = function (options) {
|
|
|
2497
2655
|
*
|
|
2498
2656
|
* - This request is only accessible to client credentials token users with Seller Admin role.
|
|
2499
2657
|
* - Non client credentials token users cannot access this endpoint. See [Permissions](/docs/authentication/Tokens/permissions).
|
|
2658
|
+
* - The `order_number` will appear as the invoice number in Authorize.net transactions.
|
|
2500
2659
|
*
|
|
2501
2660
|
* :::
|
|
2502
2661
|
*
|
|
@@ -2540,10 +2699,30 @@ export var anonymizeOrders = function (options) {
|
|
|
2540
2699
|
], url: "/v2/orders/anonymize" }));
|
|
2541
2700
|
};
|
|
2542
2701
|
/**
|
|
2543
|
-
*
|
|
2544
|
-
*
|
|
2702
|
+
* Payment Setup
|
|
2703
|
+
* Depending on the payment gateway, you may have access to different transaction types such as capturing funds immediately or authorizing them for later. For more information, see [Transactions](/docs/api/carts/transactions).
|
|
2704
|
+
*
|
|
2705
|
+
* The following types of payment methods are available depending on the payment gateway:
|
|
2706
|
+
*
|
|
2707
|
+
* - `purchase`: This is the simplest method. The gateway attempts to charge the customer immediately.
|
|
2708
|
+
* - `authorize`: This method authorizes a payment so that funds can be captured later, for example, when an item is dispatched or restocked.
|
|
2709
|
+
* - `purchase_setup`: This method prepares the system for a purchase by verifying payment details without actually charging the customer. For example, a customer adds items to their cart and proceeds to checkout. Before finalizing the purchase, the system runs `purchase_setup` to confirm all payment details, but no funds are transferred until the customer confirms the order.
|
|
2710
|
+
* - `authorize_setup`: This method prepares the system for an authorization-only transaction. This process holds the necessary funds but does not transfer them, ensuring that the customer has sufficient balance for the transaction. It sets up the conditions for a future capture of the authorized funds. For example, a customer places a pre-order for a product that will ship in two weeks. The merchant uses `authorize_setup` to prepare for the payment authorization. This holds the customer's funds to ensure they can cover the purchase but waits to capture the payment until the product ships. This ensures that payment is secured but not collected prematurely.
|
|
2711
|
+
*
|
|
2712
|
+
* :::note
|
|
2713
|
+
*
|
|
2714
|
+
* Split payments can be performed using any methods for any gateway.
|
|
2715
|
+
*
|
|
2716
|
+
* - You can partially pay funds using `purchase` method. The gateway attempts to charge the customer immediately, and the payment status for an order will show `partially_paid`
|
|
2717
|
+
* - You can partially pay for an order using `authorize` method where the order will be marked as `partially_authorized`. The transaction must be completed for the order status to be `partially_authorized`.
|
|
2718
|
+
* - A `purchase_setup` method allows verification of payment details for partial payments without transferring funds until the customer confirms the full order.
|
|
2719
|
+
* - An `authorize_setup` method can be used to hold a partial amount of the total funds, ensuring the customer has enough balance for a future capture.
|
|
2720
|
+
* Until a payment is made neither `purchase_setup` nor `authorize_setup` affects the payment statuses, and the order remains unpaid. For more information about order and payment statuses for split payments, see [Split payments](/docs/api/payments/payment-gateways-introduction#split-payments).
|
|
2721
|
+
*
|
|
2722
|
+
* :::
|
|
2723
|
+
*
|
|
2545
2724
|
*/
|
|
2546
|
-
export var
|
|
2725
|
+
export var paymentSetup = function (options) {
|
|
2547
2726
|
var _a;
|
|
2548
2727
|
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post(__assign(__assign({}, options), { headers: __assign({ "Content-Type": "application/json" }, options === null || options === void 0 ? void 0 : options.headers), security: [
|
|
2549
2728
|
{
|
|
@@ -2553,10 +2732,15 @@ export var authorizeSetup = function (options) {
|
|
|
2553
2732
|
], url: "/v2/orders/{orderID}/payments" }));
|
|
2554
2733
|
};
|
|
2555
2734
|
/**
|
|
2556
|
-
* Confirm
|
|
2557
|
-
* Confirm
|
|
2735
|
+
* Confirm Payment
|
|
2736
|
+
* Confirm Payment serves as a mechanism to synchronize transaction information from the third-party payment provider back to our system. This ensures that Composable Commerce accurately reflects the values from the payment provider.
|
|
2737
|
+
*
|
|
2738
|
+
* ### Handling 3D Secure Validations for Stripe Payments
|
|
2739
|
+
*
|
|
2740
|
+
* For Stripe Payments requiring 3D Secure validation, the transaction response will include the `client_parameters` object, which provides credentials to support validation of these payment requests on the payment provider's side. We recommend using the Stripe's client libraries to manage these 3D Secure validations. Once the validation succeeds, proceed with a confirmation request to sync the validated transaction into Composable Commerce and continue with the payment process.
|
|
2741
|
+
*
|
|
2558
2742
|
*/
|
|
2559
|
-
export var
|
|
2743
|
+
export var confirmPayment = function (options) {
|
|
2560
2744
|
var _a;
|
|
2561
2745
|
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post(__assign(__assign({}, options), { headers: __assign({ "Content-Type": "application/json" }, options === null || options === void 0 ? void 0 : options.headers), security: [
|
|
2562
2746
|
{
|