Payment

Calculate payment amounts

Changed on

Calculates the fees, VAT and total amount of a payment before it is made. The method only calculates: no payment, order or payment page is created. The payment itself is made by the <b>/payment</b> method with the same parameters

post/payment/calculate

Request

  • Base URL
    https://api.centrobill.com
  • URL
    https://api.centrobill.com/payment/calculate
  • Auth
    API key in header Authorization

Headers

X-Request-IDstring

Unique ID of request

Request body

Example request

{
  "sku": [
    {
      "name": "TEST_EN_00",
      "price": [
        {
          "offset": "0d",
          "amount": 100,
          "currency": "EUR",
          "repeat": false
        }
      ]
    }
  ],
  "consumer": {
    "country": "DEU",
    "ip": "88.64.10.10"
  },
  "payment": {
    "selected": "card"
  },
  "fees": [
    {
      "type": "Platform Fee",
      "items": [
        {
          "geo": "ALL",
          "items": [
            {
              "paymentMethod": "card",
              "type": "percentage",
              "value": 0.1
            }
          ]
        }
      ]
    }
  ]
}

Response

OK

totalAmountnumber double required

Amount the customer pays, the price together with the fees and VAT

currencystring ISO3 required

Currency of operation in ISO3 format

Example response

{
  "fees": [
    {
      "type": "Platform Fee",
      "amount": 10
    }
  ],
  "vat": {
    "amount": 1.9
  },
  "totalAmount": 111.9,
  "currency": "USD"
}

Changes