Update payments

patch

/ccstore/v1/orders/current/payments

This API is used by the CX Commerce OSF Storefront. This API is currently not used by CX Commerce Classic Storefront but may be used in the future. It may be used in applications outside of CX Commerce Storefront.

Update Store Credit amount or Gift Card amount and/or billing address of one or more payments in the cart (current incomplete order). This will perform a balance enquiry and calculates the amount remaining to be applied. Plus retains the (yet to be authorised) payment in the cart for authorisation during submit.

This endpoint is part of a group of APIs used in conjunction with each other to perform granular actions on the cart (current incomplete order).

Request

Supported Media Types
Header Parameters
  • Current organization context of the logged in user
  • ID provided by the Oracle Commerce Visit Service to uniquely identify the current visitor. It is required for every request to enable full endpoint capabilities for all shopper types.
Body ()
Root Schema : updatePayments_request
Type: object
Show Source
Nested Schema : items
Type: array
Updates payments in the current order.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : billingAddress
Type: object
The billing address details. Payment type: physicalGiftCard, card, invoice, generic.
Show Source
Nested Schema : customProperties
Type: object
Custom object with dynamic properties. This will be passed to the webhook request
Back to Top

Response

Supported Media Types

200 Response

Returned when the operation succeeds.
Body ()
Root Schema : updatePayments_response
Type: object
Show Source
Nested Schema : embedded
Type: object
The embedded holder property for the current order representation.
Show Source
Nested Schema : items
Type: array
The list of added payments after the update has been completed.
Show Source
Nested Schema : model_order
Type: object
Show Source
Nested Schema : dynamicProperties
Type: array
Read-only list of dynamic properties for the order along with meta-data.
Show Source
Nested Schema : giftWithPurchaseInfo
Type: array
The gift information.
Show Source
Nested Schema : giftWithPurchaseOrderMarkers
Type: array
giftWithPurchaseOrderMarker information.
Show Source
Nested Schema : markers
Type: array
Order markers. Exposed for addCartItems API only.
Show Source
Nested Schema : payments
Type: array
Payment details for the order, including additional properties specific to the payment type.
Show Source
Nested Schema : priceListGroup
Type: object
The price list group object.
Show Source
Nested Schema : shippingGroups
Type: object
The shipping groups in the order.
Show Source
Nested Schema : shippingMethod
Type: object
Shipping Method information of the order.
Show Source
Nested Schema : shoppingCart
Type: object
Shopping cart information.
Show Source
Nested Schema : items
Type: object
Show Source
  • The ID of the dynamic property.
    Example: giftWrapMessage123
  • The label of the dynamic property.
    Example: Gift Wrap Message123
  • The value of the dynamic property. The value type depends on how the dynamic property was defined and might be something other than string, such as boolean or number.
    Example: newGSMessage45600
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
  • The quantity of free sku for this gift selection that has already been auto added to the order.
    Example: 0
  • Flag to indicate whether free gifts should be auto removed if the promotion no longer qualifies.
    Example: true
  • Identifier to track which gift selection in the promotion this is. It allows the commerce item marker to link to this one.
    Example: -24564678912
  • The amount of automatic free quantity that failed to be added to the cart due to some pricing error, e.g. invalid site.
    Example: 0
  • String identifying the free gift, usually the repository ID of the gift type.
    Example: Product_6Dxyi
  • The type of the gift. (sku, product)
    Example: product
  • atg.gwp
    Example: atg.gwp
  • The total quantity of sku for this gift selection.
    Example: 1
  • The amount of free quantity that has since been manually removed by a Shopper.
    Example: 1
  • The quantity of free sku for this gift selection that has already been selected by the Shopper and added to the order.
    Example: 0
  • The quantity of free sku for this gift selection that has already been targeted and made free by the calculator in the order.
  • The gift with purchase promotion ID
    Example: promo40001
Nested Schema : items
Type: object
Show Source
  • Order marker key. In a marketing campaign marker, a key signifies that it is a campaign marker. Also, it identifies the external marketing system that is the source of the campaign, e.g., campaign_eloqua
    Example: campaign_eloqua
  • Order marker value. In the case of a marketing campaign, it represents the actual unique campaign ID
    Example: 78900
Nested Schema : items
Type: object
Show Source
Nested Schema : currency
Type: object
The currency object.
Show Source
Nested Schema : shippingSurchargePriceList
Type: object
Shipping Surcharge PriceList object.
Show Source
  • Repository ID of the shipping surcharge price list.
    Example: shippingSurchargePrices
Nested Schema : discountInfo
Type: object
Discount Information
Show Source
Nested Schema : items
Type: array
The array of products in the shipping group.
Show Source
Nested Schema : priceInfo
Type: object
Price information of the order.
Show Source
Nested Schema : shippingAddress
Type: object
The shipping address details.
Show Source
Nested Schema : shippingMethod
Type: object
The shipping method details for the order.
Show Source
Nested Schema : discountDescList
Type: array
The list of all the order discounts.
Show Source
Nested Schema : orderImplicitDiscountList
Type: array
Implicit Promotions for the order
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : dynamicProperties
Type: array
Array of custom properties at order line item level.
Show Source
Nested Schema : skuProperties
Type: array
Sku properties Information
Show Source
Nested Schema : variant
Type: array
List of variants for the product.
Show Source
Nested Schema : items
Type: object
Show Source
  • The ID of the dynamic property.
    Example: dynamicPropertyMode
  • The label of the dynamic property.
    Example: Mode
  • The value of the dynamic property.
    Example: pickup
Nested Schema : items
Type: object
Show Source
  • ID of the Dynamic SKU Property.
    Example: upcCode
  • Name of the Dynamic SKU Property.
    Example: UPC Code
  • Type that indicates whether it is a base or a custom SKU property,
    Example: sku-base
  • Value of the Dynamic SKU Property.
    Example: 12345
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: array
Items in the cart.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childSkus
Type: array
An array with single primary image url for this item's sku, or its default image.
Show Source
Nested Schema : dynamicProperties
Type: array
Array of custom properties at order line item level.
Show Source
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
Show Source
Nested Schema : giftWithPurchaseCommerceItemMarkers
Type: array
giftWithPurchaseCommerceItemMarker information.
Show Source
Nested Schema : itemDiscountInfos
Type: array
Item discount infos
Show Source
Nested Schema : shopperInput
Type: object
Additional Properties Allowed
Show Source
Map of shopper input keys to values
Nested Schema : skuProperties
Type: array
Sku properties Information
Show Source
Nested Schema : variant
Type: array
List of variants for the product.
Show Source
Nested Schema : items
Type: object
Show Source
  • The ID of the dynamic property.
    Example: giftWrapMessage123
  • The label of the dynamic property.
    Example: Gift Wrap Message123
  • The value of the dynamic property. The value type depends on how the dynamic property was defined and might be something other than string, such as boolean or number.
    Example: newGSMessage45600
Nested Schema : items
Type: object
Show Source
Nested Schema : values
Type: object
The array of values associated with an externalData item.
Show Source
Nested Schema : items
Type: object
Show Source
  • The quantity of the free gift that this commerce item is making free and was auto added by pricing.
    Example: 0
  • The gift hash code for this gift with purchase promotion.
    Example: -123345466
  • atg.gwp
    Example: atg.gwp
  • The quantity of the commerce item that is not affected by gift with purchase.
    Example: 0
  • The quantity of the free gift that this commerce item is making free and was selected by the shopper.
    Example: 0
  • The quantity of the free gift that this commerce item is making free and was targeted by pricing.
    Example: 0
  • The gift with purchase promotion ID.
    Example: promo10002
Nested Schema : items
Type: object
Show Source
Nested Schema : couponCodes
Type: array
Coupon codes applied to the items
Show Source
Nested Schema : items
Type: object
Show Source
  • ID of the Dynamic SKU Property.
    Example: displayName
  • Name of the Dynamic SKU Property.
    Example: name
  • Type that indicates whether it is a base or a custom SKU property,
    Example: sku-base
  • Value of the Dynamic SKU Property.
    Example: Sku_18Cxi
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : customProperties
Type: object
Custom object with dynamic properties. This will be passed to the webhook request
Example Response (application/json)
{
    "totalResults":"3",
    "offset":"0",
    "hasMore":"false",
    "limit":"250",
    "links":[
        {
            "method":"PATCH",
            "rel":"/rels/updatePayments",
            "href":"http://localhost:8080/ccstoreui/v1/orders/current/payments"
        },
        {
            "method":"GET",
            "rel":"last",
            "href":"http://localhost:8080/ccstoreui/v1/orders/current/payments?offset=0&limit=3"
        },
        {
            "method":"POST",
            "rel":"/rels/addPayments",
            "href":"http://localhost:8080/ccstoreui/v1/orders/current/payments/add"
        },
        {
            "method":"GET",
            "rel":"self",
            "href":"http://localhost:8080/ccstoreui/v1/orders/current/payments"
        },
        {
            "method":"GET",
            "rel":"canonical",
            "href":"http://localhost:8080/ccstoreui/v1/orders/current/payments"
        },
        {
            "method":"GET",
            "rel":"first",
            "href":"http://localhost:8080/ccstoreui/v1/orders/current/payments?offset=0&limit=250"
        }
    ],
    "items":[
        {
            "paymentGroupId":"pg230431",
            "amount":"5",
            "customPaymentProperties":{
            },
            "balance":"9.11",
            "gatewayName":"demoGenericGiftCardGateway",
            "giftCardNumber":"6035718888920014103",
            "paymentMethod":"physicalGiftCard",
            "isAmountRemaining":false,
            "paymentState":"INITIAL",
            "maskedCardNumber":"xxxxxxxxxxxxxxx4103"
        },
        {
            "paymentGroupId":"pg230433",
            "amount":"5.88",
            "customPaymentProperties":{
            },
            "balance":"28.61",
            "gatewayName":"demoGenericGiftCardGateway",
            "giftCardNumber":"987655432",
            "paymentMethod":"physicalGiftCard",
            "isAmountRemaining":false,
            "paymentState":"INITIAL",
            "maskedCardNumber":"xxxxx5432"
        },
        {
            "paymentGroupId":"pg230434",
            "amount":"4.11",
            "customPaymentProperties":{
            },
            "default_initial":"true",
            "paymentMethod":"tokenizedCreditCard",
            "isAmountRemaining":true,
            "type":"CyberSource",
            "paymentState":"INITIAL"
        }
    ],
    "embedded":{
        "order":{
            "shippingGroups":[
                {
                    "taxPriceInfo":{
                        "cityTax":"0",
                        "secondaryCurrencyTaxAmount":"0",
                        "amount":"3.76",
                        "valueAddedTax":"0",
                        "countyTax":"1.88",
                        "isTaxIncluded":false,
                        "miscTax":"0",
                        "districtTax":"0",
                        "stateTax":"1.88",
                        "countryTax":"0"
                    },
                    "priceInfo":{
                        "amount":"21.99",
                        "total":"50.75",
                        "lkpValExcludingFreeShip":null,
                        "shipping":"25",
                        "shippingSurchargeValue":"0",
                        "tax":"3.76",
                        "subTotal":"21.99",
                        "currencyCode":"USD",
                        "totalWithoutTax":"46.99"
                    },
                    "discountInfo":{
                        "orderDiscount":"0",
                        "shippingDiscount":"0",
                        "discountDescList":[
                        ]
                    },
                    "shippingMethod":{
                        "secondaryCurrencyTaxAmount":"0",
                        "shippingTax":"2",
                        "cost":"25",
                        "taxIncluded":true,
                        "externalId":null,
                        "taxCode":"",
                        "value":"standardShippingMethod",
                        "shippingMethodDescription":"Standard"
                    },
                    "shippingGroupId":"sg40413",
                    "shippingAddress":{
                        "lastName":"Anderson",
                        "country":"US",
                        "address3":null,
                        "address2":null,
                        "city":"Syracuse",
                        "prefix":null,
                        "address1":"21 Cedar Ave",
                        "postalCode":"13202",
                        "companyName":null,
                        "jobTitle":null,
                        "county":null,
                        "suffix":null,
                        "firstName":"Kim",
                        "phoneNumber":"212-555-1977",
                        "faxNumber":null,
                        "alias":"Home",
                        "middleName":null,
                        "state":"NY",
                        "email":null
                    },
                    "type":"hardgoodShippingGroup",
                    "items":[
                        {
                            "rawTotalPrice":"21.99",
                            "returnedQuantity":"0",
                            "dynamicProperties":[
                            ],
                            "shippingSurchargeValue":"0",
                            "availabilityDate":null,
                            "externalData":[
                            ],
                            "discountAmount":"0",
                            "preOrderQuantity":"0",
                            "commerceItemId":"ci3000422",
                            "price":"21.99",
                            "onSale":false,
                            "stateDetailsAsUser":"The item has been initialized within the shipping group",
                            "commerceId":"ci3000422",
                            "unitPrice":"21.99",
                            "amount":"21.99",
                            "quantity":"1",
                            "pointOfNoRevision":false,
                            "relationshipType":"SHIPPINGQUANTITYREMAINING",
                            "productId":"Product_36Exy",
                            "salePrice":"0",
                            "detailedItemPriceInfo":[
                                {
                                    "discounted":false,
                                    "secondaryCurrencyTaxAmount":"0",
                                    "amount":"21.99",
                                    "quantity":"1",
                                    "configurationDiscountShare":"0",
                                    "tax":"1.76",
                                    "orderDiscountShare":"0",
                                    "detailedUnitPrice":"21.99",
                                    "currencyCode":"USD"
                                }
                            ],
                            "catRefId":"Sku_36Fxy",
                            "discountInfo":[
                            ],
                            "siteId":"siteUS",
                            "shopperInput":{
                            },
                            "asset":false,
                            "backOrderQuantity":"0",
                            "listPrice":"21.99",
                            "status":"INITIAL"
                        }
                    ]
                }
            ],
            "creationSiteId":"siteUS",
            "orderId":"o30413",
            "allowAlternateCurrency":false,
            "dynamicProperties":[
            ],
            "payments":[
                {
                    "amount":"50.75",
                    "gatewayName":"CS-A",
                    "cardType":null,
                    "type":"CyberSource",
                    "IIN":"411111",
                    "paymentGroupId":"pg30411",
                    "customPaymentProperties":{
                    },
                    "uiIntervention":null,
                    "paymentMethod":"tokenizedCreditCard",
                    "isAmountRemaining":true,
                    "paymentState":"INITIAL",
                    "currencyCode":"USD",
                    "cardNumber":null
                }
            ],
            "priceListGroup":{
                "isTaxIncluded":false,
                "endDate":null,
                "displayName":"Default Price Group",
                "listPriceList":{
                    "repositoryId":"listPrices"
                },
                "active":true,
                "isPointsBased":false,
                "locale":"en_US",
                "shippingSurchargePriceList":{
                    "repositoryId":"shippingSurchargePrices"
                },
                "deleted":false,
                "taxCalculationType":null,
                "repositoryId":"defaultPriceGroup",
                "salePriceList":{
                    "repositoryId":"salePrices"
                },
                "currency":{
                    "currencyType":null,
                    "symbol":"$",
                    "deleted":false,
                    "displayName":"US Dollar",
                    "repositoryId":"en_US",
                    "fractionalDigits":"2",
                    "currencyCode":"USD",
                    "numericCode":"840"
                },
                "id":"defaultPriceGroup",
                "includeAllProducts":true,
                "startDate":null
            },
            "orderAction":"order",
            "priceInfo":{
                "amount":"21.99",
                "total":"50.75",
                "shipping":"25",
                "shippingSurchargeValue":"0",
                "tax":"3.76",
                "subTotal":"21.99",
                "currencyCode":"USD",
                "totalWithoutTax":"46.99"
            },
            "discountInfo":{
                "unclaimedCouponMultiPromotions":{
                },
                "orderCouponsMap":{
                },
                "orderDiscount":"0",
                "shippingDiscount":"0",
                "orderImplicitDiscountList":[
                ],
                "unclaimedCouponsMap":{
                },
                "claimedCouponMultiPromotions":{
                }
            },
            "shoppingCart":{
                "numberOfItems":"1",
                "items":[
                    {
                        "primaryThumbImageURL":"/ccstore/v1/images/?source=/file/v3838394227481959246/products/girldragontattoo_LARGE.jpg&height=100&width=100",
                        "rawTotalPrice":"21.99",
                        "displayName":"The Girl with the Dragon Tattoo",
                        "dynamicProperties":[
                        ],
                        "shippingSurchargeValue":"0",
                        "discountAmount":"0",
                        "externalData":[
                        ],
                        "description":"A really great movie that you should not miss.",
                        "isItemValid":true,
                        "itemDiscountInfos":[
                        ],
                        "commerceItemId":"ci3000422",
                        "price":"21.99",
                        "variant":[
                        ],
                        "primaryImageAltText":"The Girl with the Dragon Tattoo",
                        "onSale":false,
                        "id":"ci3000422",
                        "state":"Added to order",
                        "stateKey":"INITIAL",
                        "unitPrice":"21.99",
                        "primaryImageTitle":"The Girl with the Dragon Tattoo",
                        "childSKUs":[
                            {
                                "primaryThumbImageURL":null
                            }
                        ],
                        "amount":"21.99",
                        "quantity":"1",
                        "productId":"Product_36Exy",
                        "pointOfNoRevision":false,
                        "salePrice":"0",
                        "orderDiscountInfos":[
                        ],
                        "detailedItemPriceInfo":[
                            {
                                "discounted":false,
                                "secondaryCurrencyTaxAmount":"0",
                                "amount":"21.99",
                                "quantity":"1",
                                "configurationDiscountShare":"0",
                                "tax":"1.76",
                                "orderDiscountShare":"0",
                                "detailedUnitPrice":"21.99",
                                "currencyCode":"USD"
                            }
                        ],
                        "giftWithPurchaseCommerceItemMarkers":[
                        ],
                        "originalCommerceItemId":null,
                        "taxCode":null,
                        "catRefId":"Sku_36Fxy",
                        "skuProperties":[
                            {
                                "propertyType":"sku-base",
                                "name":"listingSKUId",
                                "id":"listingSKUId",
                                "value":null
                            },
                            {
                                "propertyType":"sku-base",
                                "name":"Not Returnable",
                                "id":"nonreturnable",
                                "value":false
                            },
                            {
                                "propertyType":"sku-base",
                                "name":"Name",
                                "id":"displayName",
                                "value":null
                            },
                            {
                                "propertyType":"sku-base",
                                "name":"Active",
                                "id":"active",
                                "value":true
                            },
                            {
                                "propertyType":"sku-base",
                                "name":"Id",
                                "id":"id",
                                "value":"Sku_36Fxy"
                            },
                            {
                                "propertyType":"sku-base",
                                "name":"Discountable",
                                "id":"discountable",
                                "value":true
                            }
                        ],
                        "route":"/the-girl-with-the-dragon-tattoo/product/Product_36Exy",
                        "discountInfo":[
                        ],
                        "siteId":"siteUS",
                        "shopperInput":{
                        },
                        "asset":false,
                        "listPrice":"21.99"
                    }
                ]
            },
            "giftWithPurchaseInfo":[
            ],
            "siteId":"siteUS",
            "markers":[
                {
                    "repositoryId":"mark100005",
                    "value":"78900",
                    "key":"campaign_eloqua"
                }
            ],
            "giftWithPurchaseOrderMarkers":[
            ]
        }
    }
}

400 Response

The error response (which alternates to the default response depending on error reason).
Body ()
Root Schema : errorModelSingleError
Type: object
Show Source

Default Response

The error response.
Body ()
Root Schema : errorModelMultiErrors
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top