Payment & Shipping Methods
Given a scenario, configure payment and shipping methods: offline vs online shipping, TableRate CSV, payment types (offline, gateway, hosted), and payment actions (Authorize, Capture, Order).
Payment & Shipping Methods
Shipping Method Configuration
Offline Shipping Methods
Offline methods do not perform online requests when calculating shipping rates. Configuration is done entirely in admin.
- Flat Rate: Fixed price per order/item.
- Table Rate: Rates based on conditions (weight, subtotal, destination) from a CSV file.
- Free Shipping: Configured with conditions (e.g., order total > $100).
- In-Store Delivery: Customer picks up; no shipping cost.
Typical configuration includes: name, price, handling fees, conditions.
Table Rate CSV Upload
Table Rate requires uploading a CSV file with rate information via admin panel.
- Download reference CSV from admin.
- Fill with rates based on conditions (destination, weight, subtotal, item count).
- Upload via Stores → Configuration → Sales → Shipping Methods → Table Rates.
Online Shipping Methods (Carriers)
Online methods (carriers) request APIs during checkout to obtain real-time shipping rates.
- Examples: UPS, FedEx, USPS, DHL.
- Require credentials (API keys, account numbers).
- Configuration varies per carrier (e.g., allowed methods, container types, handling fees).
See: Delivery Methods
Payment Method Configuration
There are three types of payment methods in Magento:
- Offline: No processing during checkout; payment handled outside Magento.
- Gateway: Sends remote API request to payment provider during checkout.
- Hosted: Redirects customer to external site for payment, then redirects back.
Offline Payment Methods
Offline methods do nothing during checkout; assume payment occurs externally.
- Check/Money Order
- Bank Transfer
- Zero Subtotal Checkout (for $0 orders)
- Cash on Delivery
- Purchase Order
Configuration is straightforward: title, instructions, order status.
See: Payment Methods
Gateway Payment Methods
Gateway methods send remote API requests to payment providers to process payments without leaving the Magento site.
- Configuration: API credentials, payment action, sandbox mode.
- Customer enters card details on Magento checkout.
- Magento sends data to gateway API for processing.
Hosted Payment Methods
Hosted methods redirect customers to an external site for payment, then redirect back after completion.
- Example: PayPal Express Checkout
- Customer clicks "Checkout with PayPal" → redirected to PayPal → completes payment → returns to Magento.
- Configuration: API credentials, payment action, return URLs.
Payment Actions
Payment Action defines what happens when placing a payment. Configured per payment method.
Three principal options supported by the Payment class:
- Authorize only
- Authorizes funds without charging.
- Invoice is NOT created.
- Admin must manually hit "Invoice" button to capture funds.
- Capture
- Charges the card immediately.
- Invoice is automatically created.
- No admin action required.
- Order
- Does nothing; invoice is NOT created.
- Admin must charge card manually when creating invoice.
- No guarantee funds are available.
PayPal Configuration
PayPal Express Checkout
Hosted method that redirects to PayPal for payment.
- Configuration: API credentials (username, password, signature), sandbox mode, payment action.
- "Enable In-Context Checkout" option: Improves UX by keeping customer on Magento site (PayPal opens in modal/iframe). Functionally similar but feels seamless.
Further reading: Other PayPal Methods
Further Reading
Exam Tips
- Shipping: Offline (no API) vs Online (carriers with API). TableRate requires CSV upload.
- Payment types: Offline (external), Gateway (API on Magento), Hosted (redirect).
- Payment Actions:
- Authorize only: Reserve funds, no invoice, manual capture.
- Capture: Charge card, auto-invoice.
- Order: Do nothing, manual invoice/charge.
- Magento 2.4: Removed most online payment methods except PayPal from core.
- PayPal: Express = hosted; "Enable In-Context" improves UX without leaving site.