Fees and discounts
Calculate a discount and the fee together
Given an amount and a discount, returns the fee, the discount taken off, and the final amount the customer pays. Unauthenticated so a checkout page can call it while the customer is still choosing how to pay — it identifies the merchant by merchantId rather than by a key, and reads nothing back that the page did not already send. Send all four fields: a partial body is rejected at the edge before it reaches the calculator. When no discount applies, the response carries the fee alone.
post/v2/discounts/calculate
Request
- Base URL: https://test-api.kashier.io
- URL: https://test-api.kashier.io/v2/discounts/calculate
- Auth: none required
Request body
Response
The fee, the discount, and the resulting amounts. Fields that do not apply are left out — with no discount in play you get paymentFees on its own.
Changes
No recorded changes to this operation across all 1 revision of this API.