Payment notification¶
Multiple payment notification methods
Voyado Elevate 3 RESTful API includes two different payment notification methods. The recommended notification method to use is Secure payment notification which can only be used server side.
Client side payments must be enabled
This payment notification method does not require any authentication and is disabled by default. Product cost cannot be notified by using this notification method. Contact Voyado Support if there is a need to enable unauthenticated payment notifications.
The payment notification is to be sent when the visitor has placed an order of one or more products and completed payment.
Method¶
POST
URL format¶
/api/v2/notifications/payment?esales.market={market}&esales.customerKey={customerKey}&esales.sessionKey={sessionKey}
Parameters¶
Name | Type | Description | Example |
---|---|---|---|
esales.market | string | Visitor Market | Sweden |
esales.customerKey | string | Visitor id. UUID / GUID. | 5G7HJ...R77T1 |
esales.sessionKey | string | A unique id. UUID / GUID. | 2F75A...EAFA6 |
lines | array[ ] | Array with payment information. | productKey: P1, quantity: 2, sellingPrice: 20.0 |
productKey | string | The unique key of the product. Not mandatory when variantKey is set. | shirt_79709 |
variantKey | string | The unique key of the variant. Not mandatory when productKey is set. | shirt_red_7980 |
quantity | int | The quantity of the purchased product. | 2 |
sellingPrice | double | The selling price of the purchased product. | 20 |
Request body¶
{
"lines": [
{
"productKey": "string",
"variantKey": "string",
"quantity": "int",
"sellingPrice": "double"
}
]
}
Request content-type¶
application/json
Response content-type¶
N/A
Responses¶
Response | Description |
---|---|
204 | Notifications was received successfully. |
400 | There were no order lines in the payment notification, missing or invalid required arguments |
403 | 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. |
Example¶
Request¶
request-body.json¶
{
"lines": [
{
"productKey":"P1",
"quantity": 1,
"sellingPrice": 10.35,
"variantKey": "V2"
}
]
}
cURL¶
#!/bin/bash
curl -i \
-X POST \
-T request-body.json \
-H "Content-Type: application/json" \
"https://{cluster-id}.api.esales.apptus.cloud/api/v2/notifications/payment?esales.market=UK&esales.customerKey=d9528030-509c-4e0f-b585-7168f1e9feca&esales.sessionKey=b106299c-eac0-4f6f-96d2-93e57c255784"
Response¶
HTTP/2 204 No Content