Skip to main content

Payments Tools

View payment transactions, record manual payments, process refunds, send payment links, manage custom charges, and apply promo codes and vouchers to bookings.

Required scope: bookings:read for read tools, bookings:write for write tools

Tools Overviewโ€‹

ToolDescriptionRead-only?
get_payment_transactionsList payment transactions for a bookingYes
get_amount_dueGet remaining balance on a bookingYes
get_stripe_statusPayment gateway status for this businessYes
get_tillThe cash drawer today at each locationYes
get_security_depositsWhat the shop kept from security deposits over a periodYes
record_paymentRecord a manual/offline paymentNo
process_refundProcess a Stripe refundNo
send_payment_linkSend a payment link to a customerNo
send_payment_receiptSend a payment receipt emailNo
record_security_depositRecord a deposit taken by hand as heldNo
release_security_depositRelease a security deposit holdNo
add_custom_chargeAdd an additional charge to a bookingNo
apply_promo_codeValidate and apply a promo codeNo
apply_voucherApply/redeem a voucher as paymentNo

get_payment_transactionsโ€‹

List payment transactions for a booking. Shows all payments, refunds, and security deposit transactions.

Parametersโ€‹

NameTypeRequiredDescription
booking_idintegerYesThe booking ID

get_amount_dueโ€‹

Get the remaining balance (amount due) on a booking, including payments and voucher redemptions.

Parametersโ€‹

NameTypeRequiredDescription
booking_idintegerYesThe booking ID

get_tillโ€‹

The cash drawer today at each location: whether the till is open, what it started with, cash sales and refunds, cash security deposits held and returned, cash put in or taken out, and what should be in the drawer now. Once closed: what was counted, whether it was over or short, what was left for tomorrow and what went to the bank. A location where no till was opened today reads not opened today. Needs the Record payments permission.

Parametersโ€‹

NameTypeRequiredDescription
location_idintegerNoOne location only. Leave it out for every location

See Till (cash drawer) for how "should be in the drawer" is worked out.


get_security_depositsโ€‹

How much the business kept from security deposits over a period, and on which bookings and items. Returns the total kept, the total given back, each booking with its customer, items, the amount kept and the day it was kept, and the same totals grouped by item. Each amount is the one the booking page shows. When part of a kept deposit paid for missing parts, kept_for_missing_parts names that share; it is already inside the kept amount. A deposit split into parts lists each part that was kept. Needs the View bookings permission.

Parametersโ€‹

NameTypeRequiredDescription
periodstringNotoday, yesterday, this_week, last_week, this_month, last_month or this_year. Leave everything out for this month
start_datestringNoFirst day, YYYY-MM-DD, when no period fits
end_datestringNoLast day, YYYY-MM-DD. Defaults to today

get_stripe_statusโ€‹

Returns the payment gateway status for this business: which gateway it takes card payments on, whether it is ready to accept them, whether security deposits can be held on a card and for how long, and whether card readers are supported.

Businesses on Stripe also get the Stripe Connect detail (account id, onboarding complete, charges and payouts enabled). A business on another gateway does not, because those fields describe an account it never opened.

The tool name is unchanged for compatibility. It answers for every gateway, not only Stripe.

Parametersโ€‹

None.

Returnsโ€‹

FieldTypeDescription
providerstringstripe, paystack, rapyd, authorizenet or tilopay
provider_namestringThe gateway's display name
ready_to_accept_paymentsbooleanWhether the connection is complete enough to take money
security_deposit_holds_supportedbooleanWhether a deposit can be held on a card rather than charged
hold_window_daysintegerHow many days a hold stays capturable on this gateway
card_readers_supportedbooleanWhether in-person readers are available

record_paymentโ€‹

Record a manual/offline payment on a booking (cash, bank transfer, credit card swipe). For Stripe online payments, use send_payment_link instead.

Parametersโ€‹

NameTypeRequiredDescription
booking_idintegerYesThe booking ID
amountnumberYesThe payment amount
payment_methodstringYesMethod: manual, credit_card, other
offline_methodstringNoFor manual payments: cash, bank_transfer, other
referencestringNoPayment reference or note
confirmedbooleanNoMust be true to record. First call without to preview.

process_refundโ€‹

Process a Stripe refund for a booking. The booking must have a Stripe payment to refund.

Parametersโ€‹

NameTypeRequiredDescription
booking_idintegerYesThe booking ID
amountnumberYesThe amount to refund
reasonstringNoReason for the refund
confirmedbooleanNoMust be true to execute. First call without to preview.

Create and send a payment link to a customer for a booking. The customer receives an email with a link to pay online.

The link is paid through the business's own payment gateway: Stripe, Paystack, Rapyd or Authorize.net. On Paystack the customer pays in Paystack's payment window, in ZAR.

Parametersโ€‹

NameTypeRequiredDescription
booking_idintegerYesThe booking ID
amountnumberNoAmount to charge. If not provided, uses the remaining balance.
customer_emailstringNoEmail to send to. If not provided, uses the booking customer email.
confirmedbooleanNoMust be true to send. First call without to preview.

send_payment_receiptโ€‹

Send a payment receipt email to the customer for a specific payment transaction.

Parametersโ€‹

NameTypeRequiredDescription
transaction_idintegerYesThe payment transaction ID
confirmedbooleanNoMust be true to send. First call without to preview.

record_security_depositโ€‹

Record a security deposit the business took by hand (cash, bank transfer, other) as held. No card is charged. Pass amount when the owner names the figure taken; it becomes the booking's deposit, so the booking and the record agree.

Parametersโ€‹

NameTypeRequiredDescription
booking_idintegerYesThe booking ID
amountnumberNoThe deposit amount actually taken, in the booking currency. Must be greater than zero. Omit to use the booking's deposit amount.
offline_methodstringNocash (default), bank_transfer or other
security_deposit_idintegerNoFor a deposit split into parts: the part to record
confirmedbooleanNoMust be true to record. First call without to preview.

The reply reads the saved deposit back: deposit_amount and deposit_status (held).


release_security_depositโ€‹

Release a security deposit hold or refund a security deposit charge for a booking.

Parametersโ€‹

NameTypeRequiredDescription
booking_idintegerYesThe booking ID
confirmedbooleanNoMust be true to execute. First call without to preview.

add_custom_chargeโ€‹

Add an additional charge to a booking (e.g., damage fee, late return fee, extra service).

Parametersโ€‹

NameTypeRequiredDescription
booking_idintegerYesThe booking ID
descriptionstringYesDescription of the charge (e.g., "Late return fee")
unit_pricenumberYesPrice per unit
quantityintegerNoQuantity (default 1)
user_confirmedbooleanYesMust be true to add

apply_promo_codeโ€‹

Validate and apply a promo code to a booking.

Parametersโ€‹

NameTypeRequiredDescription
booking_idintegerYesThe booking ID
codestringYesThe promo code to apply
user_confirmedbooleanYesMust be true to apply

apply_voucherโ€‹

Apply/redeem a voucher as payment on a booking. Immediately applies the voucher balance.

Parametersโ€‹

NameTypeRequiredDescription
booking_idintegerYesThe booking ID
codestringYesThe voucher code to apply