Order attributes
The attributes CODGuard writes to every checkout, and who reads them.
CODGuard attaches attributes to every checkout it builds. The leading underscore keeps them staff-only, so they never appear to the customer.
| Attribute | Value | Read by |
|---|---|---|
_codguard_payment | cod / prepaid / partial | Webhook and both Functions |
_codguard_verified | true / false | Webhook |
_codguard_phone | Verified phone, E.164 | Webhook (fallback phone) |
_codguard_verified_at | ISO-8601 timestamp | Audit |
_codguard_otp_channel | WHATSAPP / SMS | Audit |
_codguard_session | Checkout session id | Webhook, links the selection |
_codguard_prepaid_discount_pct | e.g. 10 | Reporting |
_codguard_original_total | Pre-discount total | Reporting |
_codguard_deposit / _codguard_balance | Partial amounts | Reporting |
_codguard_payment_description | Sentence shown to the shopper | Display |
_codguard_paymentand_codguard_verifiedare also read by the Shopify Functions. Renaming either one silently breaks COD hiding at checkout, with no error anywhere.
Extensions
| Extension | Type | What it does |
|---|---|---|
| Payment customization | Function | Hides COD at checkout when rules disallow it. |
| Delivery customization | Function | Hides COD-specific delivery options on prepaid and partial orders. Never hides the cheapest option for a COD order. |
| Update address | Admin action | Lets fulfilment staff trigger an address-correction request from the order screen. |
| Verification modal | Theme app extension | Renders the storefront modal via the app embed block. |
Functions are activated automatically on app load and their IDs are stored on the shop's configuration.
