How should discounts or gift cards be handled in your online store when using Paytrail's payment service?

Paytrail's API now supports negative unitPrice values, allowing discounts and gift cards to be listed as separate line items. This means that gift cards or discounts can be specified as negative line items. If your online store uses discounts or gift cards, you can now list them as separate line items with a negative unitPrice value. This simplifies the handling of transactions since you no longer need to consolidate discounts or gift cards into different product lines on your store’s side before making the API call.

While discounts can now be listed as negative line items, it is essential to ensure that the amount of all unitPrice values matches the total amount specified in the amount field. The API will reject the payment if the totalled unitPrice values do not match the amount field.

Was this article helpful?
0 out of 2 found this helpful