Public Shopify App
COD Rules by Comeasy
A public Shopify App Store app that lets merchants control when Cash on Delivery appears at checkout, using rule conditions and a Shopify Payment Customization Function written in Rust.
- Context
- Own product · Shopify App Store
- Discipline
- Apps & Functions
- Core tech
- Shopify Functions · Rust · React Router · Polaris

What I worked on
- Full app: embedded admin UI, backend, data model, Shopify Function and App Store compliance.
The challenge
Payment method behaviour at checkout cannot be changed from the theme. The rules a merchant configures in the admin have to be evaluated inside Shopify's checkout at runtime, which means the app data model, the function input query and the function logic all have to stay in sync.
Implementation
- 01Embedded admin app built with React Router and Shopify Polaris components, installed through OAuth 2.0.
- 02Rule builder where merchants combine conditions: customer address, zip/postal code, city, country, customer tag, product tag, minimum and maximum order value.
- 03Rules persisted in Firebase / Firestore and read by the checkout function at evaluation time.
- 04Shopify Payment Customization Function implemented in Rust, with a dynamic GraphQL input query so only the data a rule actually needs is requested.
- 05Payment behaviour beyond show/hide: COD shipping charges, conditional visibility of other payment options and reordering of payment methods.
- 06Shopify webhooks for install/uninstall and app lifecycle, plus the compliance and data handling endpoints required for App Store review.
Flow
- Merchant
- Shopify Admin
- React app UI
- OAuth
- Node backend
- Firestore
- Webhooks
- Payment Customization Function (Rust)
- Checkout payment options
Engineering details
- Rust for the Function, Node.js for the app backend
- Dynamic GraphQL query generation per rule set
- OAuth 2.0 install flow and session handling
- Firestore documents modelled per shop
Technology
- Shopify Functions
- Rust
- React Router
- Polaris
- Node.js
- GraphQL
- OAuth 2.0
- Firestore
- Webhooks