Payment Notification with Cost

Multiple payment notification methods

Apptus eSales RESTful API includes two different payment notification methods. The recommended notification method to use is Payment Notification with Cost.

Back-end operation only

The payment notification with cost can not be made as a front-end operation with the JavaScript library.

The payment notification with cost is to be sent when the visitor has placed an order of one or more products and completed payment. The parameter paymentToken must be submitted in the request to notify cost.

The paymentToken is created by stringifying the payment object, see the request examples, and signing it with the MessageAuthentication class. The parameter customerKey must be present in the payment object.



URL format



Name Type Description Example
webApiId string Unique Web API ID. The Web API ID is case sensitive. wBA03517B
sessionKey string A unique id. uuid / GUID 2F75A...EAFA6
customerKey string Visitor id. SHA256 hash if the visitor is signed in, otherwise a uuid / GUID. 5G7HJ...R77T1
market string Visitor Market Sweden
token string Unique token generated by the CustomerKeyAuthentication class. Should only be set for signed in visitors. EAFA6...2F75A
lines array[ ] Array with payment information. productKey: P1, quantity: 2, sellingPrice: 20.0, cost: 15.2
productKey string The unique key of the product. shirt_79709
quantity int The quantity of the purchased product. 2
sellingPrice double The selling price of the purchased product. 20.0
cost double The cost of the purchased product. 15.2
paymentToken string Unique token generated by the MessageAuthentication class. 6ffc1...a1921

Request body

    "sessionKey": "string",
    "customerKey": "string",
    "market": "string",
    "token": "string",
    "lines": [
            "productKey": "string",
            "quantity": "int",
            "sellingPrice": "double",
            "cost": "double"

Request content-type


Response content-type

HTTP response code


Response Description
204 Notifications was received successfully.
400 There were no order lines in the payment notification or cost was sent without paymentToken.
403 A personal customer key was used, but it could not be validated, or client side payment notifications has been disabled for this cluster.
5xx Server error such as cluster unavailable or busy. The response body may contain more information about the error.


Try out the API at the Apptus API Playground with your eSales Playground and API credentials.



    "sessionKey": "b106299c-eac0-4f6f-96d2-93e57c255784",
    "customerKey": "d9528030-509c-4e0f-b585-7168f1e9feca",
    "market": "UK",
    "lines": [
            "quantity": 1,
            "sellingPrice": 10.35,
            "cost": 5.1,
            "variantKey": null

Stringified payment object



curl -i \
-d @request-body.json \
-H "Content-Type: application/json" \


HTTP/1.1 204 No Content