Tips and charges
An order often collects more than its line items: a delivery fee, a booking fee, a tip for the crew. Flint models that money as two objects on the order, so it takes part in discount, tax, refund, and reconciliation math correctly.
| Tip | Charge | |
|---|---|---|
| Who decides | The buyer, from options you offer | You |
| Typical use | Gratuity for service or delivery | Delivery, service, setup, and booking fees; surcharges |
| Set with | requested_tip on the order | POST /v1/orders/{order_id}/charges |
| Amount | Fixed, or 1% to 100% | Fixed, or up to 100% |
| Percent of | Subtotal after discounts | Subtotal before or after discounts, which you choose |
| Taxed | Never | Your choice, per charge |
| Per order | One | Any number |
Both are amounts your buyer pays you. What Flint charges you to process a payment is covered in Processing fees.
Warning: Don't add fees or tips as line items
Line items are products. Promotions discount them, catalog reports count them, and inventory tracks them, so a $5.00 "Delivery" line item becomes $4.50 when a 10% promotion applies. A charge keeps its amount, has its own tax setting, and is refunded on its own. Only a discount that targets service charges reduces it.
Create an order to follow along#
Create an order with $40.00 of items, a $4.00 discount, and tax turned off so the arithmetic stays visible. The tip and charge examples build on it:
curl -X POST https://api.withflintpay.com/v1/orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-H "Idempotency-Key: tips-fees-order-001" \
-d '{
"line_items": [{
"type": "custom",
"name": "Catering tray",
"quantity": 1,
"unit_price_money": {"amount": 4000, "currency": "USD"},
"fulfillment": {"requirement": "none"}
}],
"discounts": [{
"manual": {
"name": "Returning customer",
"amount_money": {"amount": 400, "currency": "USD"}
}
}],
"tax": {"enabled": false}
}'
{
"data": {
"order_id": "ord_1kmn0aExample",
"status": "open",
"tips": [],
"charges": [],
"pricing_amounts": {
"subtotal_money": {"amount": 4000, "currency": "USD"},
"discount_money": {"amount": 400, "currency": "USD"},
"charge_money": {"amount": 0, "currency": "USD"},
"tax_money": {"amount": 0, "currency": "USD"},
"additive_tax_money": {"amount": 0, "currency": "USD"},
"inclusive_tax_money": {"amount": 0, "currency": "USD"},
"requested_tip_money": {"amount": 0, "currency": "USD"},
"total_money": {"amount": 3600, "currency": "USD"}
}
}
}
Every tip and charge request returns the full updated order, so the new totals are in the response.
Tips#
On standalone payment intents, tip_money is a portion of amount_money: its amount must be at least 1 minor unit, use exactly the same currency, and be no larger than amount_money; order-linked payment intents do not accept it. To remove a standalone payment intent's tip, send "tip_money": null to PATCH /v1/payment-intents/{payment_intent_id}.
A buyer chooses a tip in one of two ways:
- At hosted checkout. Turn on tipping for a checkout session or payment link, and the buyer's choice is written to the order.
- In your own UI. Your app, point-of-sale flow, or agent collects the buyer's choice and sets it on the order.
Both produce the same object: an entry in the order's tips[], counted in pricing_amounts.requested_tip_money. A tip is requested until the order is paid, then settled:
- requested moves to paid on order paid
- requested moves to canceled on tip cleared
- paid moves to partially_refunded on part refunded
- paid moves to refunded on all refunded
- partially_refunded moves to refunded on rest refunded
Offer tips at hosted checkout#
Add a tip section when you create a checkout session or payment link:
{
"tip": {
"enabled": true,
"tip_percent_options": [15, 18, 20],
"default_tip_percent": 18,
"custom_tip_enabled": true
}
}
| Field | Effect |
|---|---|
enabled | Shows the tip step. |
tip_percent_options | Exactly three percents, each from 1 to 100 with up to four decimal places. |
default_tip_percent | The preselected option. Must be one of the tip_percent_options checkout offers, whether you send them or they come from tipping settings. |
custom_tip_enabled | Lets the buyer enter their own amount. |
smart_tips_enabled | Offers fixed amounts instead of percents. Suits small orders, where 15% of $6.00 is $0.90. |
smart_tip_money_options | Exactly three positive fixed amounts, such as $1, $2, and $5. A checkout session's amounts use its currency. A payment link's amounts share one currency, and a checkout opened from the link shows only amounts in its own currency. |
default_smart_tip_money | The preselected fixed amount. Must be one of the smart_tip_money_options checkout offers. |
Fields you leave out inherit the merchant's tipping settings from the Dashboard, one field at a time; leave out tip to use those settings as they are. Tipping is off by default. Subscription signups don't inherit the merchant's tipping settings or their preselected tip: they offer a tip only when you send tip.enabled: true, and it is collected once, with the signup payment. Renewals never include one. If you send tip_percent_options without default_tip_percent, an inherited preselection that isn't one of your options is dropped, and checkout preselects no tip. Inherited fixed amounts in another currency are dropped the same way.
The buyer's choice becomes the order's tip and is collected with their payment.
Set a tip from your own UI#
Set requested_tip on the order with calculation_type percent and a percent, or amount and a fixed amount_money:
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_1kmn0aExample \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-d '{"requested_tip": {"calculation_type": "percent", "percent": 18}}'
{
"data": {
"order_id": "ord_1kmn0aExample",
"tips": [{
"order_tip_id": "tip_1kmn0aExample",
"status": "requested",
"percent": 18,
"effective_amount_money": {"amount": 648, "currency": "USD"},
"settled_amount_money": {"amount": 0, "currency": "USD"},
"refunded_money": {"amount": 0, "currency": "USD"},
"payment_intent_allocations": []
}],
"pricing_amounts": {
"subtotal_money": {"amount": 4000, "currency": "USD"},
"discount_money": {"amount": 400, "currency": "USD"},
"charge_money": {"amount": 0, "currency": "USD"},
"tax_money": {"amount": 0, "currency": "USD"},
"additive_tax_money": {"amount": 0, "currency": "USD"},
"inclusive_tax_money": {"amount": 0, "currency": "USD"},
"requested_tip_money": {"amount": 648, "currency": "USD"},
"total_money": {"amount": 4248, "currency": "USD"}
}
}
}
18% of the $36.00 subtotal after the discount is $6.48.
- Percent or amount, not both.
percentis in percentage points, from 1 to 100 with up to four decimal places:18is 18% and12.5is 12.5%.amount_moneyis an integer in the currency's minor unit, at least 1. - Percent tips use the subtotal after discounts. Charges and tax are not part of the base, so buyers tip on the goods and services, not on your fees. The result rounds half up to the minor unit and is returned as
effective_amount_money. Read it rather than recomputing it. - Fixed tips have a ceiling. A USD tip can be up to $1,000 or the subtotal after discounts, whichever is larger. A larger tip fails with
400 INVALID_REQUESTand detail codeINVALID_VALUE;details[0].maximum_moneyreports the ceiling. - One tip per order. Setting
requested_tipagain replaces the amount and keeps the sameorder_tip_id, so resending the buyer's latest choice is safe. - Tips are never taxed. Changing the tip leaves the order's tax as it is. See Sales tax.
name,description, andmetadataare optional and stay on the tip for your reporting.
You can also send requested_tip when you create the order.
Clear the tip#
Send null to remove the tip before payment:
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_1kmn0aExample \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-d '{"requested_tip": null}'
The tip's status becomes canceled and requested_tip_money returns to zero. The canceled tip stays in tips[] as a record of the change. Setting a tip afterward creates a new one with a new order_tip_id.
The remaining examples assume the 18% tip is set. If you cleared it, set it again before continuing.
Collect and reconcile the tip#
A tip is collected with the order's payment, through hosted checkout or POST /v1/orders/{order_id}/pay. When the payment succeeds, the tip's status becomes paid. These fields record what happened:
effective_amount_moneyMoneyThe tip amount the order collects. For a percent tip, the resolved amount.
settled_amount_moneyMoneyHow much of the tip has been paid.
payment_intent_allocationsarrayWhich payments carried the tip, as payment_intent_id and amount_money pairs.
refunded_moneyMoneyHow much of the tip has been refunded.
The order's settlement_amounts.settled_tip_money is the total tip money collected. Reconcile against it.
Which payment carries the tip depends on how the order is collected:
- A payment of the whole balance carries the whole unpaid tip.
- A partial payment of an order pays for items and charges first, and carries only the part of the tip it reaches past them. The last payment usually carries the tip.
- An invoice installment, or any invoice payment smaller than the invoice's balance, carries the unpaid tip first, up to its amount, then items and charges. The deposit usually carries the tip.
When one payment has several legs, Flint splits that payment's tip across them in proportion to each leg's amount, and assigns leftover cents so the parts add up exactly. You don't choose which payment or leg carries the tip.
Set the tip when you capture#
A payment held with manual capture can take its tip when you capture it, with tip_money, for example a tip the guest wrote on the receipt. On an order, the order then takes its tip from its payments instead of from requested_tip:
- A capture's tip replaces the payment's part of the requested tip. The tip becomes an
amounttip of the new total, so an 18% tip that the guest changed to $12.00 becomes a $12.00 tip.tip_moneyof zero removes the payment's part, and a tip whose total reaches zero iscanceled. - Each payment can tip. On an order with no tip, the first payment's tip creates one, with no
name, and each later payment's tip adds to it. With overcapture available, a guest who pays a $25.00 share and tips $5.00, and a guest who pays the other $25.00 and tips $4.00, leave a $50.00 order with a $9.00 tip and atotal_moneyof $59.00.payment_intent_allocationslists each payment's part. - The tip must fit the hold. A capture can't raise the bill, so it collects at most the hold, or
overcapture.maximum_capturable_moneywhen overcapture is available. Without overcapture, a tip on a hold for the whole bill returns409 LIMIT_EXCEEDEDwithparamtip_money. To leave room, set arequested_tipbefore the payment is held: the hold then carries it, and the capture's tip replaces it. - The tip is then set per payment. Setting or clearing
requested_tipreturns409 ACTION_NOT_ALLOWEDwith reasonpayment_collected. - One kind of tip per order. A payment that doesn't carry part of the order's requested tip, such as a partial payment, can't add a tip above zero beside it:
400 INVALID_REQUESTwithNOT_ALLOWEDontip_money. - Limit. A capture's tip is at most the larger of $1,000.00 and the payment's share of the order's subtotal after discounts. Keeping or lowering the tip the payment carries is never refused.
Tips on the reader#
A smart reader can ask the buyer for a tip before the card. Send tip: {"enabled": true} in the reader payment source when you pay on a reader, and the reader shows the merchant's tip options: three percentages, and three fixed amounts when smart tips are on, plus a custom amount. The reader can't preselect default_tip_percent or hide the custom amount, so those settings apply to hosted checkout only. Tipping settings that turn off tipping at hosted checkout don't turn off the reader's tip screen; tip.enabled on the payment does.
- The base. Percentages apply to the payment's share of the order's subtotal after discounts, so a guest who pays a $25.00 share of a $50.00 check is offered percentages of $25.00. On a standalone payment intent, they apply to
amount_money. - The payment carries the tip. When the buyer picks a tip, Flint adds it to the payment's
amount_moneyand records it intip_money. The order takes it as one of its payments' tips, anamounttip with noname, when the payment is captured. A payment that is canceled, expires, or fails never adds its tip to the order. - Fees. With automatic capture, Flint captures a payment that has the tip screen on itself, once the card is authorized, so its fees and any platform fee are priced on the tip as well. A held payment's fees are priced when you capture it.
- Refused in some cases.
tip.enabledreturns400 INVALID_REQUESTon a Tap to Pay reader, on an order with arequested_tip, and on a payment that already carriestip_money. Once any payment carries its own tip, settingrequested_tipreturns409 ACTION_NOT_ALLOWEDwith reasonpayment_collected. - Split checks. Each card can tip on the reader, and the tips add up on the order.
- Corrections. A buyer's tip on the reader is never refused, whatever its size. A held payment can correct it with
tip_moneyat capture.
Fees and service charges#
A charge is a named amount you add on top of the line items, such as a delivery or service fee. Create, update, and remove charges with these routes:
Add a fixed charge#
Add a $5.00 delivery fee to the order:
curl -X POST https://api.withflintpay.com/v1/orders/ord_1kmn0aExample/charges \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-H "Idempotency-Key: tips-fees-delivery-001" \
-d '{
"charge": {
"calculation_type": "amount",
"name": "Delivery",
"type": "delivery_fee",
"amount_money": {"amount": 500, "currency": "USD"}
}
}'
{
"data": {
"order_id": "ord_1kmn0aExample",
"charges": [{
"order_charge_id": "och_1kmn0aExample",
"name": "Delivery",
"type": "delivery_fee",
"amount_money": {"amount": 500, "currency": "USD"},
"applied_money": {"amount": 500, "currency": "USD"},
"tax_money": {"amount": 0, "currency": "USD"},
"total_money": {"amount": 500, "currency": "USD"},
"refunded_money": {"amount": 0, "currency": "USD"}
}],
"pricing_amounts": {
"subtotal_money": {"amount": 4000, "currency": "USD"},
"discount_money": {"amount": 400, "currency": "USD"},
"charge_money": {"amount": 500, "currency": "USD"},
"tax_money": {"amount": 0, "currency": "USD"},
"additive_tax_money": {"amount": 0, "currency": "USD"},
"inclusive_tax_money": {"amount": 0, "currency": "USD"},
"requested_tip_money": {"amount": 648, "currency": "USD"},
"total_money": {"amount": 4748, "currency": "USD"}
}
}
}
name is what the buyer sees at checkout and on receipts, so write it for them: "Delivery", not "DLVRY_FEE_2". type classifies what the charge is for, in reporting and as the default for its tax category (Tax a charge). It is one of service_fee, delivery_fee, shipping_fee, handling_fee, packaging_fee, small_order_fee, service_area_fee, setup_fee, installation_fee, cleaning_fee, booking_fee, reservation_fee, ticket_fee, fulfillment_fee, restocking_fee, rush_fee, or other.
Each charge reports its money in four fields:
amount_money or percentMoney or numberWhat you set, returned as you sent it.
applied_moneyMoneyThe charge before tax. For a percent charge, the resolved amount. A discount that targets service charges reduces it.
tax_moneyMoneyThe tax on this charge. Zero unless the charge is taxable.
total_moneyMoneyWhat the buyer pays for this charge, including any tax added to it.
refunded_money tracks how much of the charge has been refunded. Optional fields: description, metadata for your own tags, and fulfillment_id to tie the charge to one of the order's fulfillments, such as a shipping fee to its shipment.
Send an Idempotency-Key with every new charge. Each request adds a charge, so a retry without the key adds the fee twice. With the key, a retry returns the original result. See Idempotency.
Add a percent charge#
A percent charge states its base in calculation_basis. Add a 3% service fee on the subtotal after discounts:
curl -X POST https://api.withflintpay.com/v1/orders/ord_1kmn0aExample/charges \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-H "Idempotency-Key: tips-fees-service-001" \
-d '{
"charge": {
"calculation_type": "percent",
"name": "Service fee",
"type": "service_fee",
"percent": 3,
"calculation_basis": "subtotal_post_discount"
}
}'
The charge's applied_money is $1.08, 3% of $36.00. calculation_basis takes one of two values:
calculation_basis | Base | 10% on this order |
|---|---|---|
subtotal_pre_discount | Line-item subtotal before discounts | $4.00 |
subtotal_post_discount | Line-item subtotal after discounts | $3.60 |
A percent charge requires calculation_basis, and a fixed charge rejects it, so the base is never implied. Neither base includes other charges, tips, or tax. percent is in percentage points, greater than 0 and up to 100, with up to four decimal places: 3 is 3% and 0.5 is 0.5%. The result rounds half up to the minor unit.
Tax a charge#
Automatic tax outside the US refuses taxable charges, including service_fee, with 400 INVALID_REQUEST, detail NOT_ALLOWED, and param naming the charge. Set the charge's taxable: false, or use external tax for the order. The automatic charge categories below apply to US destinations.
Each charge sets its own taxability in a tax section. It never inherits taxability from the order or its line items.
{
"charge": {
"name": "Delivery",
"type": "delivery_fee",
"amount_money": {"amount": 500, "currency": "USD"},
"tax": {"taxable": true, "charge_tax_category": "delivery"}
}
}
- State
tax.taxablewhen the order has tax. On an order with tax enabled, a request charge withouttax.taxablefails withINVALID_REQUESTand detail codeREQUIRED. charge_tax_categorydecides the tax. It is one ofservice_fee,shipping,delivery,handling, orsurcharge, and it is separate fromtype, which describes what the fee is for. Leave it out and the charge takes its category fromtype:delivery_feeisdelivery,shipping_feeisshipping,service_feeisservice_fee, andhandling_feeishandling. Other types take no category. The default isn't stored, so responses omit it and it follows a later change totype.- Automatic tax covers all five charge categories. It taxes
service_fee,shipping,delivery,handling, andsurchargeat the general rate at the charge's location, whatever itstype. Paid pickup usesservice_feeby default and is taxed at the store. A taxable charge with no category fails with400 INVALID_REQUESTand detail codeNOT_ALLOWED. Settax.charge_tax_categoryto one of the five categories, settaxable: false, or use external tax. - External tax takes the result from your own tax engine in each charge's
tax.calculation, the same way as for line items. See Supply external tax components. The category is recorded but doesn't change the result.
The calculated tax lands in the charge's tax_money and counts toward pricing_amounts.tax_money.
Update a charge#
Send the fields to change at the top level, with no charge wrapper:
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_1kmn0aExample/charges/och_1kmn0aExample \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07" \
-d '{"name": "Priority delivery", "amount_money": {"amount": 750, "currency": "USD"}}'
Fields you leave out keep their values. You can change any field, including type, tax, and switching between a fixed amount and a percent: switching to percent requires calculation_basis, and switching to amount_money drops it. Changing only percent on a percent charge keeps its calculation_basis. Changing tax.charge_tax_category, or changing type on a charge that takes its category from type, recalculates the charge's tax, so under automatic tax a taxable charge needs one of the five charge categories. metadata merges by key, and "metadata": null clears it. "fulfillment_id": null unlinks the charge from its fulfillment.
Remove a charge#
curl -X DELETE https://api.withflintpay.com/v1/orders/ord_1kmn0aExample/charges/och_1kmn0aExample \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Flint-Version: 2026-09-07"
The charge is removed from charges[] entirely. A cleared tip, by contrast, stays in tips[] as canceled.
How the total adds up#
Flint computes pricing_amounts in a fixed order. With the example order, a $5.00 delivery fee, a 3% service fee after discounts, and an 18% tip:
pricing_amounts field | Amount | Computed from | |
|---|---|---|---|
subtotal_money | $40.00 | Line items | |
| − | discount_money | $4.00 | Discounts on line items |
| + | charge_money | $6.08 | $5.00 delivery + 3% of $36.00 |
| + | tax_money | $0.00 | Taxable line items and charges; tax is off here |
| + | requested_tip_money | $6.48 | 18% of $36.00 |
| = | total_money | $48.56 |
- Discounts reduce line items, not charges or tips. The delivery fee stays $5.00 when a promotion applies. A discount reduces a charge only when it targets service charges.
- Tips use the subtotal after discounts. Charges and tax are never part of the tip's base.
- Percent charges use the base you chose. A discount changes a
subtotal_post_discountcharge, not asubtotal_pre_discountone.
Read each amount from pricing_amounts instead of computing it yourself. Percent amounts round to the minor unit and discounts are prorated across line items, so a client-side recalculation can be off by a cent. See Money & currency.
When tips and charges can change#
Tips and charges set the amount the buyer pays, so they can change only while that amount is still open:
- Before payment, you can set or clear the tip and add, update, or remove charges. If the order has an open checkout session, it stays open with the new total, and the buyer approves that total before paying. The buyer can still choose a tip on the hosted page.
- During payment, changes are rejected and nothing changes. A payment in progress returns
OPERATION_IN_PROGRESS; retry once it finishes. An authorized payment waiting for capture returnsPAYMENT_ATTEMPT_ACTIVE; capture or cancel it first. A payment held with manual capture can instead take its tip when you capture it; see Set the tip when you capture. - After part of the order is paid, you can still add charges and change the tip for the unpaid balance, unless a payment set its own tip when it was captured. Existing charges can't be updated or removed; that fails with
ACTION_NOT_ALLOWEDwith reasonpayment_collected. - Partial payments pay for items and charges before the tip. A change that would drop items and charges below the money already collected, such as removing an item or adding a discount after a partial payment, fails with
LIMIT_EXCEEDED. Otherwise the unpaid tip would be larger than the balance left to pay. In the error'sdetails[0],minimum_moneyis the money collected plus the unpaid tip, andcurrent_moneyis the resulting order total. No single input causes this floor, so the error has noparam. Use a refund or credit adjustment instead. - Once the order is fully paid, it closes, and changes fail with
409 ACTION_NOT_ALLOWED.details[0]names theorderand itscurrent_status, andreasonisterminal_statusfor a closed order orpayment_collectedfor an order that is stillopenafter payment. Adjust a settled tip or charge with a refund. - After any refund, changes fail with
ACTION_NOT_ALLOWEDwith reasonpayment_collected.
Each change sends an order.updated webhook, and the payment events carry the final amounts. The order's activity log records each change as requested_tip_added, requested_tip_updated, requested_tip_removed, charge_added, charge_updated, charge_removed, or charge_fulfillment_updated.
Refund tips and charges#
Tips and charges each track their own refunds in refunded_money, so partial refunds stay exact.
refund directly
Charges
List the charge's order_charge_id in the charges array when you create a refund. Add amount_money to refund part of it, or leave it out to refund the whole charge.
refunded last
Tips
A refund returns the rest of the payment before the tip it carried. The refund reports the tip portion in refunded_tip_money, and the tip's status becomes partially_refunded or refunded.
Errors#
Errors use the standard error envelope, and error.param names the field to fix.
Tip errors#
Charge errors#
Order state errors#
Related docs#
- Orders API reference: every field on tips, charges, and order totals.
- Checkout sessions: tipping on the hosted page and changes during checkout.
- Promotions: discounts on line items and service charges.
- Sales tax: automatic and external tax on charges.
- Refunds: full and partial refunds, including refunding one charge.
- How to add a tip to an online Stripe checkout: what Stripe Checkout and Payment Links support for tips, for teams moving a tip step over.