The late fee operations of the Rentals & Bookings GraphQL API. When late fees are on (Settings › Late fees, see Late fees), a late check-in creates a late fee for the order; staff review it, then it is collected by a payment link, at the counter or from a refundable deposit. They use the same address, keys and rules as the rest of the API: see GraphQL API reference: Rentals & Bookings for how to send a request, and the API overview for keys, limits and errors. The same operations are in REST, with the fee’s fields explained: REST API reference: Late fees.
Needs the Rentals & Bookings app. Every operation needs a secret key; mutations need Allow changes (write). The Free plan’s API can read only: a mutation is refused with plan_required.
- Ids are global:
gid://sirentals/LateFee/12.idandlateFeeIdalso take the bare number, andlegacyResourceIdgives it.orderIdtakesgid://shopify/Order/…or the order’s number. - Amounts are decimal strings. Before a fee is accepted,
amountis in the store currency before tax; once it is on the order, what the order owes for it (the order’s currency, tax included).amountShopstays in the store currency. - Dates (
dueBack,returnedAt) areY-m-d H:iin the store’s time zone;*Attimestamps are ISO 8601. - Mutations answer
userErrors { field message code data }when a change is refused. The codes are explained in the REST errors table. - A booking carries its late fee:
RentalBooking.lateFeeis aRentalBookingLateFee(id legacyResourceId number status amount currency soFar perDay longOverdue;amountin the store currency before tax), or null.
curl -s "https://YOUR-API-ADDRESS/graphql/2026-10" -H "Authorization: Bearer sirb_your_secret_key" -H "Content-Type: application/json" \
-d '{"query": "{ rentalLateFees(first: 20, status: TO_REVIEW) { totalCount nodes { id number status amount currency orderName } } }"}'
Reading late fees #
| Operation | Arguments | What it does |
|---|---|---|
rentalLateFeesquery · secret key returns RentalLateFeeConnection! | first: Intafter: Stringlast: Intbefore: Stringstatus: RentalLateFeeFilterorderId: IDquery: String | Late fees, newest first (ACCRUING: largest first, PAID: last paid first, WAIVED: last waived first). status defaults to ALL; query searches the fee number, order name, customer name or email. |
rentalLateFeequery · secret key returns RentalLateFee | id: ID! | One late fee, or null. paymentUrl only with a write key. |
query ToReview {
rentalLateFees(first: 20, status: TO_REVIEW) {
totalCount
pageInfo { hasNextPage endCursor }
nodes {
id legacyResourceId number status amount currency amountShop orderId orderName dueBack returnedAt
lines { key title quantity amount calculated accruing lateMinutes bookingId }
}
}
}
query OneFee {
rentalLateFee(id: "gid://sirentals/LateFee/12") {
number status amount currency paidVia paidAt paymentUrl
bookings { id }
}
}
| Enum | Values |
|---|---|
RentalLateFeeFilter | TO_REVIEW – To review and failed.UNPAID – Payment link sent, needs confirmation, charging.ACCRUINGPAID – Paid, refunded, part refunded.WAIVEDALL |
| Type | Fields |
|---|---|
RentalLateFeeA late fee: one per order (a later late return adds lines while it is Accruing or To review). | id: ID!, legacyResourceId: Int!, number: String!, orderId: ID, orderName: String, customerId: ID, status: RentalLateFeeStatus!, amount: String!, currency: String!, amountShop: String!, shopCurrency: String!, calculated: String!, adjusted: Boolean!, tax: String, soFar: String, perDay: String, longOverdue: Boolean!, dueBack: String, returnedAt: String, locationId: ID, route: String, method: String, paidVia: String, paidAmount: String, counterMethod: String, paidAt: String, refunded: String, noteCustomer: String, reasonStaff: String, waiveReason: String, lastError: String, reviewedAt: String, createdAt: String, lines: [RentalLateFeeLine!]!, paymentUrl: String, bookings: [RentalBooking!]! |
RentalLateFeeLineOne line of a late fee: a late rental item, the flat fee, or a line staff added. | key: String!, title: String!, quantity: Int!, amount: String!, calculated: String!, edited: Boolean!, extra: Boolean!, accruing: Boolean!, bookingId: ID, dueBack: String, returnedAt: String, lateMinutes: Int! |
| Enum | Values |
|---|---|
RentalLateFeeStatus | ACCRUING – Stock is still out: the fee grows each day.TO_REVIEW – Waiting for staff to accept, edit or waive it.CHARGING – Being charged (the deposit, or the order edit).PAY_LINK_SENT – On the order; the customer has the payment link.PAIDFAILED – Charging failed: see lastError.NEEDS_CONFIRMATION – Shopify’s answer was unclear: check the order.WAIVEDCANCELLED – Nothing was late after all (a corrected return), or the order was cancelled.REFUNDEDPART_REFUNDED |
Also used here, described on GraphQL API reference: Rentals & Bookings types: RentalBooking.
Changing and collecting late fees #
| Operation | Arguments | What it does |
|---|---|---|
updateRentalLateFeemutation · secret key returns RentalLateFeePayload! | input: RentalLateFeeUpdateInput! | Change a fee waiting for review: line amounts by key, the lines staff added (up to 10; [] removes them), the note to the customer and the staff reason. not_reviewable when it isn’t To review. |
acceptRentalLateFeemutation · secret key returns RentalLateFeePayload! | input: RentalLateFeeAcceptInput! | Accept a fee waiting for review: it is collected the way route says (default AUTO: the store’s first way to collect that can work). not_reviewable, no_lines, no_deposit, deposit_failed, no_order. |
waiveRentalLateFeemutation · secret key returns RentalLateFeePayload! | lateFeeId: ID!reason: String! | Waive the fee. A reason is required; the customer gets no email; lines already on the order are taken off. paid, not_waivable. |
sendRentalLateFeeLinkmutation · secret key returns RentalLateFeePayload! | lateFeeId: ID!to: String | Email the payment link again, to the customer or to to. not_unpaid when the fee isn’t waiting for payment, no_link when there is no link yet. |
recordRentalLateFeeCounterPaymentmutation · secret key returns RentalLateFeePayload! | lateFeeId: ID!method: RentalLateFeeCounterMethod | Record a payment taken at the counter (default CASH): a fee To review is accepted at the counter, one waiting for its payment link is marked paid. outstanding_differs when the order owes more than the fee. |
mutation Review {
updateRentalLateFee(input: {lateFeeId: "12", lines: [{key: "b42-m9101", amount: "30.00"}],
extra: [{title: "Cleaning", amount: "15.00"}], reasonStaff: "One day forgiven, mud inside"}) {
lateFee { id status amount adjusted }
userErrors { field code message } # not_reviewable once it isn't To review
}
}
mutation Collect {
acceptRentalLateFee(input: {lateFeeId: "12", route: LINK}) {
lateFee { id status route }
userErrors { field code message } # no_deposit for route DEPOSIT when no refundable deposit covers the fee
}
}
RentalLateFeeUpdateInput
| Field | Type | Notes |
|---|---|---|
lateFeeId | ID! | |
lines | [RentalLateFeeLineAmountInput!] | New amounts for lines by key (an item still out can’t be changed). |
extra | [RentalLateFeeExtraLineInput!] | Replaces the lines staff added (up to 10). Leave out to keep them; [] removes them. |
noteCustomer | String | |
reasonStaff | String |
RentalLateFeeLineAmountInput
| Field | Type | Notes |
|---|---|---|
key | String! | |
amount | String! | Decimal string, store currency, before tax. |
RentalLateFeeExtraLineInput
| Field | Type | Notes |
|---|---|---|
title | String! | |
amount | String! |
RentalLateFeeAcceptInput
| Field | Type | Notes |
|---|---|---|
lateFeeId | ID! | |
route | RentalLateFeeRoute | Default AUTO. |
method | RentalLateFeeCounterMethod | COUNTER only. Default CASH. |
to | String | LINK: send the payment link to this address instead of the customer’s. |
| Enum | Values |
|---|---|
RentalLateFeeRoute | AUTO – The store’s first way to collect that can work (Settings › Late fees).LINK – On the order; the customer gets the payment link.COUNTER – Paid at the counter (cash, card terminal, bank transfer, other).DEPOSIT – Kept from the order’s refundable deposit (Refundable Security Deposits app); the rest of the deposit is refunded. |
RentalLateFeeCounterMethod | CASHTERMINALBANKOTHER |
| Type | Fields |
|---|---|
RentalLateFeePayload | lateFee: RentalLateFee, userErrors: [RentalUserError!]! |
