ForHosting KIT · Developer Utilities

Gift card and cash split calculator

This gift card and cash split calculator shows exactly how a purchase is divided when a gift card covers part, all, or more than the total.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter the purchase amount and the balance currently available on the card. The calculator applies as much of that balance as possible, reports the remaining amount to pay in cash, and shows any gift-card value left afterward. It is useful at checkout, when planning a purchase, or when explaining a split payment to someone else.

Enter the purchase and available balance

Start with the full purchase amount before any gift-card payment is applied. Then enter the gift-card balance that is genuinely available for this transaction. Both figures must use the same currency, because the calculator divides amounts rather than converting money. Enter ordinary monetary values with no more than two decimal places, such as 42, 42.50, or 19.99. The purchase must be greater than zero, while a gift-card balance of zero is valid and simply means the entire purchase is paid in cash. Use the current available balance, not the card's original face value, if the card has already been used. Taxes, delivery charges, discounts, and tips should already be reflected in the purchase amount whenever they are part of the checkout total. The calculation does not decide whether a merchant accepts split tender or whether a particular fee can be paid with a gift card. It answers the arithmetic question once the payable total and usable card balance are known.

Understand how the split is calculated

The calculator applies the gift card first, up to the smaller of the purchase amount and the available balance. If a purchase costs 80 and the card holds 30, the gift-card portion is 30 and the cash portion is 50. If the same purchase is paired with a balance of 100, the card covers all 80, no cash is required, and 20 remains on the card. This rule ensures that neither the card usage nor the remaining cash payment can become negative. Results are calculated in whole cents to prevent familiar floating-point artifacts such as a displayed 0.30000000000000004. The returned purchase amount also provides a useful reference beside the three derived figures. As a quick check, gift-card used plus cash used always equals the purchase amount. The gift-card amount used plus the gift-card balance remaining always equals the starting balance. Those two relationships make the result easy to verify or incorporate into a checkout preview.

Use the result at checkout or in a workflow

Read the result as a payment plan, not as authorization from a retailer. The gift-card-used figure is the amount to request from the card. The cash-used figure is the amount that must come from cash, a debit card, a credit card, or another accepted tender. The remaining-balance figure is what should stay available on the gift card after a successful transaction, assuming there are no holds, fees, or merchant-specific restrictions. Before paying, confirm that the store allows a gift card to be combined with another payment method and that its checkout applies the card in the expected order. For automated use, send the same two numeric fields to the API and store the four returned amounts with a quote, cart, or support response. Each request costs $0.002; the browser version can be used without charge. Because the calculation is deterministic and uses no network service, identical inputs produce identical results, which is helpful for repeatable purchase planning and test fixtures.

Plan a purchase before checkout

See how much cash or card payment you will still need after using the available gift-card balance.

Explain a split payment

Give a customer or family member a clear breakdown of the gift-card portion, cash portion, and balance left.

Preview checkout logic

Use the API result when testing a cart, quote, reimbursement tool, or support workflow that applies gift cards first.

How does the calculator decide how much gift card to use?

It uses the smaller of the purchase amount and the available gift-card balance, so it never applies more than the purchase costs or more than the card holds.

What happens if the gift-card balance is larger than the purchase?

The gift card covers the complete purchase, the cash amount is zero, and the unused card value appears as the remaining balance.

What happens if the gift card has no balance?

A zero balance is accepted. The gift-card amount used is zero and the entire purchase amount is assigned to cash.

Can I enter different currencies for the two amounts?

No. Both amounts must be in the same currency. This calculator splits a payment and does not perform currency conversion.

Does this guarantee that a store will accept split payment?

No. Merchant rules vary. Confirm that the store permits a gift card to be combined with cash or another payment method.

What does it cost to use the API?

Each API request costs $0.002. The calculator can also run free in your browser.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/life/gift-card-split

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/life/gift-card-split \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"purchase_amount":86.4,"gift_card_balance":50}'
{
  "purchase_amount": 86.4,
  "gift_card_balance": 50
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "life.gift_card_split",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →