Payment¶
https://{cluster-id}.api.esales.apptus.cloud/api/admin/v4/notifications/payment
POST¶
The payment notification is to be sent when the visitor has placed an order of one or more products and completed payment.
Request¶
Header parameters¶
Name | Description | Example |
---|---|---|
Api-Key Required | Api-key that was supplied during on-boarding | pkA123456789AB1BE.. |
Query parameters¶
Name | Description | Example |
---|---|---|
customerKey Required | A key that uniquely identifies the current visitor. Using UUIDs as keys are recommended | e3921377-18a2-47c9-a449-06b894898623 |
market Required | Must match the corresponding market identifier in the data feed. | UK |
sessionKey Required | A unique key, identifying the session. Using UUIDs as keys are recommended. Required | 0b05119e-eeb8-418a-bbfb-defa0dde417e |
Supported Content-Type¶
application/json;charset=utf-8
text/plain;charset=utf-8
Request body¶
Example
{
"lines" : [ {
"quantity" : 2,
"variantKey" : "<VARIANT_KEY_FROM_YOUR_FEED>",
"cost" : 15.2,
"sellingPrice" : 39.0
} ]
}
Schema
PaymentNotification¶
The payment notification should be sent when the visitor has placed an order on one or more products and completed payment.
Name | Type | Description | Example |
---|---|---|---|
lines Required | PaymentLine[] | Array with payment information. |
curl -i \
-X POST \
-H 'Api-Key: pkA123456789AB1BE..' \
-H 'Content-Type: application/json;charset=utf-8' \
"https://{cluster-id}.api.esales.apptus.cloud/api/admin/v4/notifications/payment?customerKey=e3921377-18a2-47c9-a449-06b894898623&market=UK&sessionKey=0b05119e-eeb8-418a-bbfb-defa0dde417e" \
-T request-body.file
Response¶
Response codes¶
Status | Description |
---|---|
204 | Notification was received successfully. |
400 | There were no order lines in the payment notification, missing or invalid required arguments, one or more order lines had incorrect variant keys. Order lines with correct variant keys are accepted even if one or more order lines had incorrect variant keys. |
403 | Incorrect cluster credentials. |
500 | Server error such as cluster unavailable or busy. The response body may contain more information about the error. |
Schemas¶
Inner schemas
PaymentLine¶
Name | Type | Description | Example |
---|---|---|---|
quantity Required | integer | The quantity of the purchased product. | 2 |
variantKey Required | string | The unique key of the variant. | "<VARIANT_KEY_FROM_YOUR_FEED>" |
cost | number | The unit cost of the purchased product. It is strongly recommended to provide cost, either included in a payment notification or as an attribute in the data feed. For more information about cost, see Best practices. | 15.2 |
sellingPrice | number | The unit selling price of the purchased product. If excluded, Elevate will use the selling price from the data feed. When using custom prices in other currencies this should be the price in the base currency, i.e. the same currency as the non-custom price. | 39.0 |