Overview
The Offline Payments extension provides two alternative payment methods for customers who prefer not to use credit cards or online payment gateways:- Cash on Delivery (COD) - Customers pay in cash when they receive their order
- Bank Transfer - Customers transfer funds to your bank account before order fulfillment
This extension is enabled by default in the Ana’s Suplements configuration and styled with the brand’s green color palette.
Payment Methods
Cash on Delivery
The cash on delivery payment method allows customers to pay when their order is delivered to their door.Features
- Simple one-click selection at checkout
- Customizable instructions
- Spanish language support
- Brand-styled UI components
Use Cases
- First-time customers building trust
- Customers without credit cards
- Markets where COD is preferred
- Gift purchases
Implementation
The COD payment method is implemented inextensions/offlinePayments/src/pages/frontStore/checkout/cod/CashOnDelivery.tsx:
CashOnDelivery.tsx
- Uses the
useCheckouthook to access checkout state - Radio button styled with brand colors (#2D5A3D green)
- Displays customizable instructions when selected
- Registered in the
checkoutPaymentMethodarea with sort order 10
Bank Transfer
The bank transfer method provides bank account details for customers to transfer funds before order fulfillment.Features
- Displays bank account details
- CLABE number support (Mexico)
- Customizable transfer instructions
- Styled with brand colors
Use Cases
- B2B orders
- Large purchases
- Customers preferring direct bank payment
- International transfers
Implementation
The bank transfer payment method is implemented inextensions/offlinePayments/src/pages/frontStore/checkout/transfer/BankTransfer.tsx:
BankTransfer.tsx
- Displays bank name, account number, and CLABE
- Configurable through extension settings
- Spanish language labels (“Transferencia Bancaria”)
- Registered in the
checkoutPaymentMethodarea with sort order 20
Configuration
The extension is enabled inconfig/default.json:
Payment Method Settings
You can configure payment method settings through environment variables or admin settings:Cash on Delivery Settings
Cash on Delivery Settings
Bank Transfer Settings
Bank Transfer Settings
Styling
Both payment methods use the Ana’s Suplements brand colors:- Primary Green:
#2D5A3D- For selected state and labels - Background:
#F8FAF9- For payment method containers - Borders:
#E8F5E9- For borders and dividers - Hover State:
#1E3D2A- Darker green for hover effects - Text:
#4A5568- For instructions and details
Extension Structure
Best Practices
Testing: Test the checkout flow with both payment methods to ensure proper order creation and status handling.
Next Steps
Product Catalog
Learn about product information enhancements
Page Components
Create custom checkout components