Invoice

Prices

schedule 10 min read

The payment’s prices resource.

Edit "Prices" on GitHub

Prices

The prices resource lists the prices related to a specific payment. In short, it is where you enter the payment’s amount. It consists of the payment’s id and the priceList, which again contains the payment’s type, amount and vatAmount.

The type refers to the payment instrument, like Swish, Trustly or Creditcard. Read more about the types below the code example and table. The amount refers to the full amount (incl. VAT) for the payment, and vatAmount indicates how much of the full amount which is VAT.

Request

1
2
3
4
GET /psp/invoice/payments/7e6cdfc3-1276-44e9-9992-7cf4419750e1/prices/ HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
HTTP/1.1 200 OK
Content-Type: application/json

{
    "payment": "/psp/invoice/payments/7e6cdfc3-1276-44e9-9992-7cf4419750e1",
    "prices": {
        "id": "/psp/invoice/payments/7e6cdfc3-1276-44e9-9992-7cf4419750e1/prices",
        "priceList": [
            {
                "type": "VISA",
                "amount": 2350,
                "vatAmount": 0
            },
            {
                "type": "MasterCard",
                "amount": 2350,
                "vatAmount": 0
            }
        ]
    }
}
Field Type Description
payment string The relative URI and unique identifier of the payment resource this prices belongs to. Please read about URI Usage to understand how this and other URIs should be used in your solution.
prices object The prices resource.
└➔ id string The relative URI and unique identifier of the prices resource this prices belongs to. Please read about URI Usage to understand how this and other URIs should be used in your solution.
└➔ priceList array The array of price objects. Note: Even if you specifiy CreditCard in the input message the system will return all your configured card brands instead when you expan the priceList.
└─➔ type string The type of the price object.
└─➔ amount integer The transaction amount (including VAT, if any) entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK.
└─➔ vatAmount integer The payment’s VAT (Value Added Tax) amount, entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK. The vatAmount entered will not affect the amount shown on the payment page, which only shows the total amount. This field is used to specify how much of the total amount the VAT will be. Set to 0 (zero) if there is no VAT amount charged.

Prices Object Types

Each payment instrument have one or more prices object types. Usually there is only one, whichs corresponds with the name of the payment instrument, like Vipps, Swish or Mobilepay.

The most common occurence of several object types is for card payments. While it is possible to group them all as Creditcard, you can also differentiate on card types as shown in the example above. This is useful if certain card brands have additional fees, others have discounts or something similar. If you do differentiate, you need to add all accepted card brands as a separate object types.

Invoice Payments

Type Description
Invoice Always Invoice