Review the AI's percentage-refunds PR
AI PR reviewMediumPython · FastAPISecurityPaymentsData integrity35 min
PR #318: Add percentage refunds
Author: AI coding assistant · Base: main · Component: Refunds API
Goal
An AI assistant opened this pull request. Review it the way you would at work: leave comments on the lines that have problems (what is wrong and what to change), then approve or request changes.
The PR adds POST /v1/refunds/percent, so support agents and merchants can refund "25% of this payment" without
working out the amount. It moves real money, so read it as you would a change to the ledger. The author's PR
description is in the Review tab, next to the diff.
Context
- The service is Paylane, a small payments API (FastAPI + SQLModel + SQLite).
README.mdexplains how to run it anddocs/CONTRACT.mdis the contract every endpoint follows (money, refunds, idempotency, errors). - Your workspace is checked out on the PR branch, so you can read the code, run the tests and call the API in the preview. The AI assistant is available if you want it.
What a good review looks like
- Comments sit on the exact lines they are about and say what is wrong, why it matters and what to change.
- Don't take the PR description's word for it; check each claim against the code and the contract.
- Finish with a decision: Approve or Request changes, plus a short summary.
© AICodingRound. Ticket text for practice on this site; see Terms.
How it works
- 1Fix the problemin a real codebase.
- 2Use your ownAI, or none.
- 3Submit, then answera few short questions.
- 4Get your gradeand feedback.
Guides that use this problem
All guidesMore on Paylane payments
View allSearching customers by email finds nobodyLooking up a customer by email returns an empty list for some people.Bug huntEasyA failed payment still ended up in the balance and on the customer's cardPayments that errored left money in the merchant's balance and a charge on the card.Bug huntMediumBalance sweeps between an organization's accounts fail at the top of the hourOpposite-direction transfers between sibling accounts intermittently fail with 500.Bug huntHard
Related problems
View allReview the AI's webhook-signature PRAn AI added webhook signature checks. Are they safe?AI PR reviewMediumAfter one failed customer call, every customer list for that merchant errorsAfter one failed call, one merchant's customer and event lists error out.Bug huntMediumRefund reasons you can correct later, and a webhook when they changeLet merchants correct a refund's reason later, with a webhook on change.Feature buildMedium