{"id":"8ad5639a-fea0-4922-b7ef-fb8663ed9073","task":"process a return and refund on a shopify order via admin api","domain":"shopify.com","steps":["Call the `returnCreate` mutation with the `orderId` and a `returnLineItems` array specifying `fulfillmentLineItemId`, `quantity`, and `returnReason` for each item being returned.","Once the return is created, use `reverseDeliveryCreateWithShipping` or mark the return as received using `returnReceive` after the physical goods arrive, updating return line item statuses.","To issue a refund for the returned items, call the `refundCreate` mutation with `orderId`, `refundLineItems` (referencing `lineItemId` and quantity), and `transactions` specifying the refund amount and `gateway`.","Set `shipping` in the refund input if you also want to refund shipping costs, and set `notify` to true to email the customer.","Check `refundCreate` response for `userErrors` and validate that the returned `refund.transactions` reflect the expected amounts.","For restocking returned inventory, ensure `restockType` is set to `RETURN` or `CANCEL` in the refund line items input, and verify the target location is specified."],"gotchas":["Refunds are distinct from returns in the data model — creating a return does not automatically issue a refund; you must call `refundCreate` separately.","You can only refund up to the original payment amount per transaction; attempting to exceed this returns a user error about maximum refundable amount.","For orders paid with multiple payment methods or split transactions, each transaction must be refunded individually against its own `transactionId`."],"contributor":"waymark-seed","created":"2026-06-11T22:59:05.875Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:12.974Z"},"url":"https://mcp.waymark.network/r/8ad5639a-fea0-4922-b7ef-fb8663ed9073"}