Let clients cancel Pay at Close or change payment method from the portal
Objective
- Allow clients who have selected Pay at Close (Flex Fund) to cancel that choice or change to another payment method (e.g. credit card) from the client portal, before they complete the ISN agreement.
- Reduce the need for clients to contact support when they change their mind, and avoid client care having to use ISN directly for cancellations.
Background
- Today, if a client starts the Pay at Close flow and then wants to pay by credit card instead, they often must contact support; changing payment method can involve multiple steps and delays.
- Product feedback is that it would be ideal for the client to cancel or change payment method in the portal (e.g. “Never mind, I want to pay by credit card”) so support can say “go into your portal and change the payment method.”
- The backend already supports cancelling a PAC order:
DELETE /isn/cancel-order/:paymentIdinattik-backend/src/routes/isnPayments.tscallscancelISNOrder, updates the payment to canceled, and clears the PAC payment so the client can choose another method. That route is currently used with company context (res.locals.companyviagetPaymentSettings). The portal needs a way for the client to trigger this (or an equivalent client-scoped endpoint) and a clear UI so they can cancel or change payment before completing the ISN form.
Scope
Backend
- Cancel logic lives in
attik-backend/src/routes/isnPayments.ts(DELETE/cancel-order/:paymentId; expectsinspectionIdin body for ownership).attik-backend/src/util/functions/isn/isnApi.tsexposescancelISNOrder. In scope: ensure the portal can call cancel in a secure way—either by exposing the existing route to client-portal auth (e.g. JWT scoped to the inspection/client) or by adding a client-portal–specific route that validates the requesting user can act on that inspection and then performs the same cancel flow.
Frontend
- Client portal (report/work order view where the client sees Pay at Close and the “complete agreement” banner) needs a visible control (e.g. button: “Cancel Pay at Close” or “Change payment method”) that appears when the client has a pending PAC order and has not yet completed the ISN agreement. Clicking it should call the cancel endpoint and then allow the client to choose another payment method. In scope: placement, copy, and flow so the client can cancel or switch payment without leaving the portal or calling support.
- Consider the state after cancel: the work order should show that Pay at Close was canceled and allow selecting credit card or another option; any “complete your agreement” banner should be updated or removed once canceled.
References
attik-backend/src/routes/isnPayments.ts(cancel-order route,getPaymentSettings).attik-backend/src/util/functions/isn/isnApi.js(cancelISNOrder).- Client portal payment/agreement UI (where PAC and “complete agreement” are shown).
Status: Completed
Log in to comment and vote
No comments yet
Be the first to share your thoughts.