Calculate a discount and the fee together
curl -X POST "https://test-api.kashier.io/v2/discounts/calculate" \ -H "Content-Type: application/json" \ -d '{ "merchantId": "YOUR_MID", "amount": 100, "interactionSource": "online", "discount": {} }'{ "paymentFees": 15, "discountAmount": 10, "originalAmount": 100, "finalAmount": 90}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.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
Calculate the fee on an amount GET
Works out the processing fee for an amount under the merchant's pricing model and returns the total the customer would be charged. Use it when fees are passed on to the customer, so your checkout c…
List your discount campaigns GET
Returns the names of the discount campaigns configured on the merchant account and whether each one is currently active. Campaigns are set up by Kashier rather than through the API, so this is a re…