This page identifies eBay orders where shipping profit exceeds $2.00 and calculates the refund amount as Diff β $2.00, where Diff = Shipping Charged β Shipping Paid β eBay Fees.
Operational Purpose
- Scan shipped eBay orders (`store_id = 5`, `order_status_id = 3`) from the last 90 days (or filtered date range).
- Compare buyer shipping charged (`oc_order_total`) against actual outbound cost (`oc_order_shipping_cost`) and eBay fee allocation (`pd_ebay_payouts`).
- Display orders where Diff β₯ $2.00 and suggested refund β₯ $1.00.
- Auto-record sub-threshold orders in `pd_ebay_refund_shipping` with a $0 refund so they do not reappear.
- Allow operators to save refund amounts, enter eBay Refund IDs, and optionally email the customer.
eBay Seller Hub Steps
- Search eBay Orders and match the Subtotal with eBay's Sold For amount.
- Under Actions, select Send Refund.
- Select reason Shipping Discount.
- Enter the refund amount in Other Level Refund, select Review Refund, then press Send Refund.
- Enter the Refund ID in this program and click Send Email or Update Refund.
Database Targets
pd_ebay_refund_shipping β insert/update refund amount, transaction ID, and processing flags.
oc_order_history β insert-only audit comment when refund amount > $0.
oc_order, oc_order_total, oc_order_shipping_cost, pd_ebay_payouts β read-only sources for calculations.
Helper Dependencies
mysql_tools.php β prepared statements, `InsertRecord()`, `UpdateTable()`.
sendOrderEmail.php β `SendOrderEmail()` template 39 for customer notification.
refundEbayUpdate.php β downstream reconciliation when refunds post to the merchant account.