Skip to content

Commit

Permalink
Merge pull request #99 from paytrail/PTS-3141-negative-item-unit-price
Browse files Browse the repository at this point in the history
PTS-3141 update with negative item unit price
  • Loading branch information
jfrojd-paytrail committed Mar 11, 2024
2 parents cd39662 + ffdcc29 commit ddaec93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1005,13 +1005,13 @@ General API HTTP status codes and what to expect of them.
| callbackUrls | [CallbackUrl](#callbackurl) | <center>-</center> | Which url to ping after this payment is paid or cancelled |
| callbackDelay | number | <center>-</center> | Callback URL polling delay in seconds. If callback URLs are given, the call can be delayed up to 900 seconds. Default: 0 |
| groups | [PaymentMethodGroup](#paymentmethodgroup)[] | <center>-</center> | Instead of all enabled payment methods, return only those of given groups. It is highly recommended to use [list providers](#list-providers) before initiating the payment if filtering by group. If the payment methods are rendered in the webshop the grouping functionality can be implemented based on the `group` attribute of each returned payment instead of filtering when creating a payment. |
| usePricesWithoutVat | boolean | <center>-</center> | If true, `amount` and `items.unitPrice` should be sent to API not including VAT, and final amount is calculated by Paytrail's system using the items' `unitPrice` and `vatPercentage` (with amounts rounded to closest cent). Also, when true, **items must be included**. |
| usePricesWithoutVat | boolean | <center>-</center> | If true, `amount` and `items.unitPrice` should be sent to API not including VAT, and final amount is calculated by Paytrail's system using the items' `unitPrice` and `vatPercentage` (with amounts rounded to closest cent). Also, when true, **items must be included** and all item unit prices must be positive. |

##### Item

| Field | Type | Required | Example | Description |
| ------------------------- | ------------------------- | ------------------ | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| unitPrice | integer | <center>x</center> | 1000 | Price per unit, in each country's minor unit, e.g. for Euros use cents. By default price should include VAT, unless [`usePricesWithoutVat`](#request-body) is set to true. No negative values accepted. Maximum value of 2147483647, minimum value is 0. |
| unitPrice | integer | <center>x</center> | 1000 | Price per unit, in each country's minor unit, e.g. for Euros use cents. By default price should include VAT, unless [`usePricesWithoutVat`](#request-body) is set to true. Maximum value is 2147483647, minimum value is -2147483648. Negative value can't be used for Shop-in-Shop payments or when [`usePricesWithoutVat`](#request-body) is set to true.|
| units | integer | <center>x</center> | 5 | Quantity, how many items ordered. Negative values are not supported. |
| vatPercentage | integer | <center>x</center> | 24 | VAT percentage |
| productCode | string | <center>x</center> | 9a | Merchant product code. May appear on invoices of certain payment methods. Maximum of 100 characters |
Expand Down Expand Up @@ -1135,8 +1135,8 @@ The form field values are rendered as hidden `<input>` elements in the form. See

| Field | Type | Required | Description |
| --------------- | ------------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| amount | integer | <center>x</center> | Total amount to refund this item, in currency's minor units (ie. EUR cents) |
| stamp | string | <center>x</center> | The item unique identifier |
| amount | integer | <center>x</center> | Total amount to refund this item, in currency's minor units (ie. EUR cents). Negative amount is not allowed. |
| stamp | string | <center>x</center> | The item unique identifier. Items created with negative unit price cannot be used here. |
| refundStamp | string | <center>-</center> | Merchant unique identifier for the refund. Only for Shop-in-Shop payments, do not use for normal payments. |
| refundReference | string | <center>-</center> | Refund reference. Only for Shop-in-Shop payments, do not use for normal payments. |
| commission | [RefundCommission](#RefundCommission) | <center>-</center> | Shop-in-Shop commission return. In refunds, the given amount is returned from the given commission account to the item merchant account. Only for Shop-in-Shop payments, do not use for normal payments. |
Expand Down

0 comments on commit ddaec93

Please sign in to comment.