When an order is submitted, the Order Submit webhook sends a POST request to the URL you have configured. (Typically this is the URL where your OMS or gateway listens for requests.) The body of the request contains the complete order data in JSON format. The order management system converts the JSON data into the system’s native format, and returns an HTTP status code indicating whether the data was received successfully. A 200-level status code indicates the POST was successful. Any other code indicates failure; if this occurs, Order Submit sends the POST request again. The webhook is executed up to five times until it succeeds or gives up.

Not all external systems you integrate with Oracle Commerce Cloud will comply with the Payment Card Industry Data Security Standard (PCI DSS). For example, while your order management system will likely comply with PCI DSS, systems that manage services like email marketing or customer loyalty programs might not be compliant. Oracle Commerce Cloud provides versions of the Order Submit webhook that exclude payment details from the order data you send to systems that do not comply with PCI DSS. See Understand webhooks and PCI DSS compliance for more information.

Order Submit request example

The following example shows the body of an Order Submit webhook POST request from Oracle Commerce Cloud. The request body is a JSON representation of the order.

{
    "site": {
        "siteURL": "http://www.example.com",
        "siteName": "Commerce Cloud Site"
    },
    "order": {
        "lastModifiedTime": 1403734373592,
        "shippingGroupCount": 1,
        "paymentGroupCount": 1,
        "shippingGroups": [
            {
                "specialInstructions": {},
                "id": "sg20005",
                "handlingInstructions": [],
                "trackingNumber": null,
                "priceInfo": {
                    "amount": 6.5,
                    "currencyCode": "USD",
                    "amountIsFinal": false,
                    "discounted": false,
                    "rawShipping": 6.5
                },
                "description": "sg20005",
                "state": 0,
                "locationId": null,
                "actualShipDate": null,
                "submittedDate": null,
                "shipOnDate": null,
                "shippingMethod": "ground",
                "shippingAddress": {
                    "middleName": "",
                    "lastName": "Smith",
                    "ownerId": null,
                    "state": "Alaska",
                    "address1": "101 TNT Dr",
                    "address2": "",
                    "address3": "",
                    "companyName": "",
                    "suffix": "",
                    "country": "United States",
                    "city": "Birmingham",
                    "id": null,
                    "postalCode": "99672",
                    "faxNumber": "",
                    "phoneNumber": "555-555-1212",
                    "county": "",
                    "email": "home@example.com",
                    "prefix": "",
                    "firstName": "Jean",
                    "jobTitle": ""
                },
                "stateDetail": null
            }
        ],
        "commerceItems": [
            {
                "id": "ci2000007",
                "productDisplayName": "Military Jacket",
                "returnedQuantity": 0,
                "priceInfo": {
                    "quantityDiscounted": 0,
                    "amount": 291,
                    "discountable": true,
                    "onSale": false,
                    "priceListId": "listPrices",
                    "currencyCode": "USD",
                    "rawTotalPrice": 291,
                    "listPrice": 145.5,
                    "amountIsFinal": false,
                    "discounted": false,
                    "currentPriceDetailsSorted": [
                        {
                            "amount": 291,
                            "itemPriceInfo": null,
                            "currencyCode": "USD",
                            "range": {
                                "lowBound": 0,
                                "class": "atg.core.util.Range",
                                "highBound": 1,
                                "size": 2
                            },
                            "tax": 0,
                            "amountIsFinal": false,
                            "discounted": false,
                            "quantity": 2,
                            "detailedUnitPrice": 145.5
                        }
                    ],
                    "salePrice": 0
                },
                "catalogId": null,
                "quantity": 2,
                "catalogKey": null,
                "catalogRefId": "sku40139",
                "productId": "prod20012"
            },
        ],
        "id": "o20005",
        "siteId": "siteUS",
        "priceInfo": {
            "total": 268.4,
            "amount": 261.9,
            "shipping": 6.5,
            "currencyCode": "USD",
            "tax": 0,
            "amountIsFinal": false,
            "discounted": true,
            "manualAdjustmentTotal": 0,
            "rawSubtotal": 291,
            "discountAmount": 29.1
        },
        "paymentGroups": [
            {
                "authorizationStatus": [
                    {
                        "errorMessage": "Request was processed successfully.",
                        "amount": 261.9,
                        "authorizationDecision": "ACCEPT",
                        "transactionId": "4037343708700178147626",
                        "reasonCode": "100",
                        "currency": "USD",
                        "transactionSuccess": true
                    }
                ],
                "currencyCode": "USD",
                "paymentId": "pg20005",
                "state": 1,
                "amountAuthorized": 261.9,
                "amount": 297.5,
                "id": "pg20005",
                "phoneNumber": "555-555-1212",
                "token": "9997000107329795",
                "expirationYear": "2021",
                "expirationMonth": "08",
                "submittedDate": {
                    "time": 1403734373000
                },
                "creditCardNumber": "1111",
                "paymentMethod": "tokenizedCreditCard"
            }
        ],
        "taxPriceInfo": {
            "amount": 0,
            "currencyCode": "USD",
            "countyTax": 0,
            "countryTax": 0,
            "amountIsFinal": false,
            "stateTax": 0,
            "discounted": false,
            "cityTax": 0,
            "districtTax": 0
        },
        "profileId": "120023",
        "creationTime": 1403734364000,
        "relationships": [
            {
                "amount": 0,
                "id": "r20003",
                "returnedQuantity": 0,
                "relationshipType": "SHIPPINGQUANTITY",
                "shippingGroupId": "sg20005",
                "quantity": 2,
                "commerceItemId": "ci2000007"
            },
            {
                "amount": 0,
                "id": "r20004",
                "returnedQuantity": 0,
                "relationshipType": "SHIPPINGQUANTITY",
                "shippingGroupId": "sg20005",
                "quantity": 1,
                "commerceItemId": "ci2000008"
            },
            {
                "id": "r20005",
                "amount": 261.9,
                "relationshipType": "ORDERAMOUNTREMAINING",
                "paymentGroupId": "pg20005",
                "orderId": "o20005"
            }
        ],
        "totalCommerceItemCount": 2
    }
}

Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices