View Categories

Launching soon on the Shopify App StoreJoin the waitlist

GraphQL API reference: Late fees

4 min read

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. id and lateFeeId also take the bare number, and legacyResourceId gives it. orderId takes gid://shopify/Order/… or the order’s number.
  • Amounts are decimal strings. Before a fee is accepted, amount is in the store currency before tax; once it is on the order, what the order owes for it (the order’s currency, tax included). amountShop stays in the store currency.
  • Dates (dueBack, returnedAt) are Y-m-d H:i in the store’s time zone; *At timestamps 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.lateFee is a RentalBookingLateFee (id legacyResourceId number status amount currency soFar perDay longOverdue; amount in 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 #

OperationArgumentsWhat it does
rentalLateFees
query · secret key
returns RentalLateFeeConnection!
first: Int
after: String
last: Int
before: String
status: RentalLateFeeFilter
orderId: ID
query: 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.
rentalLateFee
query · 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 }
  }
}
EnumValues
RentalLateFeeFilterTO_REVIEW – To review and failed.
UNPAID – Payment link sent, needs confirmation, charging.
ACCRUING
PAID – Paid, refunded, part refunded.
WAIVED
ALL
TypeFields
RentalLateFee
A 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!]!
RentalLateFeeLine
One 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!
EnumValues
RentalLateFeeStatusACCRUING – 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.
PAID
FAILED – Charging failed: see lastError.
NEEDS_CONFIRMATION – Shopify’s answer was unclear: check the order.
WAIVED
CANCELLED – Nothing was late after all (a corrected return), or the order was cancelled.
REFUNDED
PART_REFUNDED

Also used here, described on GraphQL API reference: Rentals & Bookings types: RentalBooking.

Changing and collecting late fees #

OperationArgumentsWhat it does
updateRentalLateFee
mutation · 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.
acceptRentalLateFee
mutation · 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.
waiveRentalLateFee
mutation · 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.
sendRentalLateFeeLink
mutation · 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.
recordRentalLateFeeCounterPayment
mutation · 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

FieldTypeNotes
lateFeeIdID!
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.
noteCustomerString
reasonStaffString

RentalLateFeeLineAmountInput

FieldTypeNotes
keyString!
amountString!Decimal string, store currency, before tax.

RentalLateFeeExtraLineInput

FieldTypeNotes
titleString!
amountString!

RentalLateFeeAcceptInput

FieldTypeNotes
lateFeeIdID!
routeRentalLateFeeRouteDefault AUTO.
methodRentalLateFeeCounterMethodCOUNTER only. Default CASH.
toStringLINK: send the payment link to this address instead of the customer’s.
EnumValues
RentalLateFeeRouteAUTO – 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.
RentalLateFeeCounterMethodCASH
TERMINAL
BANK
OTHER
TypeFields
RentalLateFeePayloadlateFee: RentalLateFee, userErrors: [RentalUserError!]!