---
title: "Calculate payment amounts"
method: POST
path: "/payment/calculate"
tags: ["Payment"]
---

# Calculate payment amounts

`POST /payment/calculate`

## Request

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

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

## Headers

- `X-Request-ID` string

## Request body

- object
  - `sku` union[], required
    - union
      - object
        - `title` string, required: Product name displayed on the payment page (3–128 characters)
        - `siteId` string, required: Gateway site ID (created on the Merchant portal)
        - `price` object[], required
          - `offset` string: Number of days by how long the transaction will be delayed
          - `amount` number, double: Amount of operation
          - `currency` string, ISO3: Currency of operation in ISO3 format
          - `repeat` union
            - boolean: Set to <b>false</b> to not repeat the transation, and <b>true</b> - to repeat the transation
            - integer: Count of repeats
      - object
        - `name` string, required: SKU name that you added when creating SKU
        - `price` object[]
          - `offset` string: Number of days by how long the transaction will be delayed
          - `amount` number, double: Amount of operation
          - `currency` string, ISO3: Currency of operation in ISO3 format
          - `repeat` union
            - boolean: Set to <b>false</b> to not repeat the transation, and <b>true</b> - to repeat the transation
            - integer: Count of repeats
  - `consumer` object, required
    - `country` string, ISO3: Country name in ISO3 format. Wins over the country detected by IP
    - `ip` string, required: Customer IP, used to detect the country
  - `payment` object, required
    - `selected` 'card' | 'duitnow' | 'applepay' | 'sepa' | 'gojekid' | 'sofortbanking' | 'ideal' | 'offlinebanking' | 'eps' | 'mybank' | 'pago' | 'bancontact' | 'giropay' | 'payconiq' | 'trustly' | 'przelewy24' | 'promptpay' | 'onlinebanking' | 'skrill' | 'toss' | 'clickandbuy' | 'paypal' | 'pix' | 'boleto' | 'pps' | 'gash' | 'crypto' | 'paygarden' | 'alipay' | 'wechat' | 'unionpay_wallet' | 'voucher' | 'paysafecard' | 'ukash' | 'safeklick' | 'sms' | 'x1' | 'lotericas' | 'picpay' | 'deposit_express' | 'payid' | 'paynow' | 'spei' | 'oxxo' | 'codi' | 'todito' | 'banktransfer' | 'cashpayment' | 'pse' | 'efecty' | 'rapid' | 'tpaga' | 'pago46' | 'khipu' | 'multibanco' | 'bncr' | 'mbway' | 'papara' | 'havale' | 'webpay_chile' | 'khipu' | 'mach' | 'cashapp' | 'neteller' | 'viettelpay' | 'blik', required: Payment method
  - `fees` object[]: Custom fees of the merchant. If omitted, the standard fees of the merchant are applied. If passed, they are used instead of the standard fees. If none of the passed fees matches the customer country and the payment method, no fee is added. VAT is charged on the amount of the <b>Platform Fee</b> only. For other fees it is charged on the price together with the fees
    - `type` string, required: Fee name. The fee named <b>Platform Fee</b> is shown to the customer as a platform fee
    - `items` object[], required
      - `geo` string, required: Country in ISO3 format or <b>ALL</b>. The fee of the customer country wins over <b>ALL</b>
      - `items` object[], required
        - `paymentMethod` 'card' | 'duitnow' | 'applepay' | 'sepa' | 'gojekid' | 'sofortbanking' | 'ideal' | 'offlinebanking' | 'eps' | 'mybank' | 'pago' | 'bancontact' | 'giropay' | 'payconiq' | 'trustly' | 'przelewy24' | 'promptpay' | 'onlinebanking' | 'skrill' | 'toss' | 'clickandbuy' | 'paypal' | 'pix' | 'boleto' | 'pps' | 'gash' | 'crypto' | 'paygarden' | 'alipay' | 'wechat' | 'unionpay_wallet' | 'voucher' | 'paysafecard' | 'ukash' | 'safeklick' | 'sms' | 'x1' | 'lotericas' | 'picpay' | 'deposit_express' | 'payid' | 'paynow' | 'spei' | 'oxxo' | 'codi' | 'todito' | 'banktransfer' | 'cashpayment' | 'pse' | 'efecty' | 'rapid' | 'tpaga' | 'pago46' | 'khipu' | 'multibanco' | 'bncr' | 'mbway' | 'papara' | 'havale' | 'webpay_chile' | 'khipu' | 'mach' | 'cashapp' | 'neteller' | 'viettelpay' | 'blik', required: Payment method
        - `type` 'percentage' | 'fixed', required: <b>percentage</b> or <b>fixed</b>
        - `value` number, required: For <b>percentage</b> a fraction from 0 to below 1, e.g. 0.1 is 10%. For <b>fixed</b> an amount above 0 in the currency of the price

## Response `200`

OK

- object
  - `fees` object[], required: Fees of the payment, one item per fee type from the request
    - `type` string, required: Name of the fee
    - `amount` number, double, required: Amount of this fee in the currency of the request
  - `vat` object, required: VAT of the payment
    - `amount` number, double, required: VAT amount in the currency of the request
  - `totalAmount` number, double, required: Amount the customer pays, the price together with the fees and VAT
  - `currency` string, ISO3, required: Currency of operation in ISO3 format

## Other responses

- `400`: Bad Request. Also returned when the custom fees are malformed, e.g. a required field is missing
- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal Server Error

## Changes

- **2026-11-03** `0a3e445a9d65`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/centrobill/apis/centrobill-payment-api/changes/payment/calculate/post.md)

---

[API](https://skmtc.dev/centrobill/apis/centrobill-payment-api.md) - [All operations](https://skmtc.dev/centrobill/apis/centrobill-payment-api/llms.txt) - [OpenAPI document](https://skmtc.dev/centrobill/apis/centrobill-payment-api/revisions/0a3e445a9d65?raw)
