POST https://{cluster-id}.elevate-api.cloud/api/admin/v3/notifications/payment
Request
Request header parameters
Request header parameters
| Name | Description | Example |
|---|---|---|
Api-Key* | API key supplied during onboarding. | 123456789.. |
Request query parameters
Request query parameters
| Name | Description | Example |
|---|---|---|
customerKey* | A key that uniquely identifies the current visitor. Using UUIDs as keys are recommended This field is required unless userContext is set to ANONYMOUS or UNPERSONALIZED in which case it is not allowed.If userContext is set to ‘SYNTHETIC’ this is optional. | e3921377-18a2-47c9-a449-06b894898623 |
market* | Must match the corresponding market identifier in the data feed. | UK |
sessionKey* | A unique key, identifying the session. Using UUIDs as keys are recommended. This field is required unless userContext is set to ANONYMOUS in which case it is not allowed.If userContext is set to SYNTHETIC this is optional. | 0b05119e-eeb8-418a-bbfb-defa0dde417e |
userContext | Specifies the level of consent for data tracking. If omitted, the request will be treated as if PERSONALIZED is used. See user context for more details. Supported values: PERSONALIZED, UNPERSONALIZED, ANONYMOUS, SYNTHETIC. | PERSONALIZED |
Request body example
Request body example
application/json;charset=utf-8
{
"lines" : [ {
"quantity" : 2,
"variantKey" : "<VARIANT_KEY_FROM_YOUR_FEED>",
"cost" : 15.2,
"sellingPrice" : 39.0
} ],
"orderId" : "68ee0b2d-a12c-470c-94de-a9776fad7bbb"
}
Request body schema
Request body 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 |
|---|---|---|
| lines* | PaymentLine[] | Array with payment information. |
| orderId | string | An optional ID for the purchase order as a whole. Used for tracking purchases in the Retail Media system. If not included, the purchase order will be assigned a random id instead. For retail media only. Examples: "68ee0b2d-a12c-470c-94de-a9776fad7bbb" |
Example request
Example request
bash
curl -i \
-X POST \
-H 'Api-Key: 123456789..' \
-H 'Content-Type: application/json;charset=utf-8' \
"https://{cluster-id}.elevate-api.cloud/api/admin/v3/notifications/payment?customerKey=customerKey&market=market&sessionKey=sessionKey&userContext=userContext" \
-T request-body.file
Response
Response codes
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. |
Inner Schemas
PaymentLine
| Name | Type | Description |
|---|---|---|
| quantity* | integer | The quantity of the purchased product. Examples: 2 |
| variantKey* | string | The unique key of the variant. Examples: "<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. Examples: 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. Examples: 39.0 |

