Turns out that voyado didn’t activate the API. Now we have come to the point where we are wondering how discounts are sent to voyado? We want to have transactional emails from voyado and then need to be able to show discounts on order confirmation emails from them.
There seem to be discount fields that are not used. If i make an order with a product discount, then the discount is taken directly of the price and no fields with discounts are sent to voyado. If there is an order discount then an item is added with description “order”. Do we need to fix this ourselves, Not really sure how these fields work. Here is an example with product discount:
…
“paymentMethods”: [
{
“type”: “DirectPayment”,
“description”: “DirectPay”,
“value”: 23177.8800,
“extraData”: null
}
],
“items”: [
{
“type”: “PURCHASE”,
“quantity”: 1,
“grossPaidPrice”: 23157.88,
“grossPaidPricePerUnit”: 23157.88,
“taxAmount”: 454.08000000,
“taxPercent”: 2.00000000,
“description”: “Pants - Black”,
“totalDiscount”: 0.0,
“originalPricePerUnit”: 23157.88,
> “discounts”: [],
“extraData”: {
“spare30”: null,
“spare31”: null,
“spare32”: null,
“spare33”: “SEK”
}
},
{
“type”: “PURCHASE”,
“sku”: “9e7a0507-4f39-4ea6-8421-7c557aba4c4a”,
“quantity”: 1,
“grossPaidPrice”: 20.00,
“grossPaidPricePerUnit”: 20.00,
“taxAmount”: 0.39000000,
“taxPercent”: 2.00000000,
“description”: “Standardpaket”,
“imageUrl”: “”,
“targetUrl”: “”,
“totalDiscount”: 0.0,
“originalPricePerUnit”: 20.00,
“discounts”: [],
“extraData”: {
“spare30”: null,
“spare31”: null,
“spare32”: null,
“spare33”: “SEK”
}
}
],
“extraData”: {
“spare1”: “”,
“trackingLinkHtml”: null,
“spare3”: “DirectPay”,
“spare4”: “kalle”,
“spare5”: “Produktrabatt”,
“spare7”: null,
“spare10”: “SE”,
“spare11”: “739657738”,
“spare12”: “Standardpaket”,
“spare13”: “kalle”,
> “spare14”: “Produktrabatt”,
“spare16”: null,
“spare17”: “Bor�s”,
“spare18”: “50343”,
“spare19”: “SE”,
“spare20”: “739657738”,
“spare21”: null,
“spare22”: “SEK”
} …
Example 2: when an order with order discount is made then this is sent:
…
“orderNumber”: “LS100088”,
“orderStatus”: “Processing”,
“paymentStatus”: “Reserved”,
“createdDate”: “2021-03-12T10:23:40.7830000+01:00”,
“shippingDate”: “9999-12-31T23:59:59.9970000+01:00”,
“statusChangedDate”: “2021-03-12T10:23:41.3370000+01:00”,
“storeId”: “Sverige”,
“currency”: “SEK”,
“totalGrossPrice”: 32602.6800,
“totalTax”: 639.2682,
“taxDetails”: [
{
“description”: “VAT”,
“value”: 639.2682
}
],
“paymentMethods”: [
{
“type”: “DirectPayment”,
“description”: “DirectPay”,
“value”: 32602.6800,
“extraData”: null
}
],
“items”: [
{
“type”: “PURCHASE”,
“quantity”: 1,
“grossPaidPrice”: 33082.68,
“grossPaidPricePerUnit”: 33082.68,
“taxAmount”: 648.68000000,
“taxPercent”: 2.00000000,
“totalDiscount”: 0.0,
“originalPricePerUnit”: 33082.68,
> “discounts”: [],
“extraData”: {
“spare30”: null,
“spare31”: null,
“spare32”: null,
“spare33”: “SEK”
}
},
{
“type”: “PURCHASE”,
“quantity”: 1,
“grossPaidPrice”: 400.00,
“grossPaidPricePerUnit”: 400.00,
“taxAmount”: 7.84000000,
“taxPercent”: 2.00000000,
> “totalDiscount”: 0.0,
“originalPricePerUnit”: 400.00,
> “discounts”: [],
“extraData”: {
“spare30”: null,
“spare31”: null,
“spare32”: null,
“spare33”: “SEK”
}
},
{
“type”: “PURCHASE”,
“quantity”: 1,
“grossPaidPrice”: 20.00,
“grossPaidPricePerUnit”: 20.00,
“taxAmount”: 0.39000000,
“taxPercent”: 2.00000000,
“description”: “Standardpaket”,
“imageUrl”: “”,
“targetUrl”: “”,
“totalDiscount”: 0.0,
“originalPricePerUnit”: 20.00,
“discounts”: ,
“extraData”: {
“spare30”: null,
“spare31”: null,
“spare32”: null,
“spare33”: “SEK”
}
},
{
“type”: “PURCHASE”,
“quantity”: 1,
“grossPaidPrice”: -900.00,
“grossPaidPricePerUnit”: -900.00,
“taxAmount”: -17.65000000,
“taxPercent”: 2.00000000,
“description”: “Order”,
“imageUrl”: “”,
“targetUrl”: “”,
“totalDiscount”: 0.0,
“originalPricePerUnit”: -900.00,
“discounts”: [],
“extraData”: {
“spare30”: null,
“spare31”: null,
“spare32”: null,
“spare33”: “SEK”
}
},
{
“type”: “PURCHASE”,
“sku”: “”,
“quantity”: 1,
“grossPaidPrice”: 0.00,
“grossPaidPricePerUnit”: 0.00,
“taxAmount”: 0.00000000,
“taxPercent”: 0.00000000,
“description”: “Avrundning”,
“imageUrl”: “”,
“targetUrl”: “”,
“totalDiscount”: 0.0,
“originalPricePerUnit”: 0.00,
“discounts”: ,
“extraData”: {
“spare30”: null,
“spare31”: null,
“spare32”: null,
“spare33”: “SEK”
}
}
],