E-commerces is the largest sector of electronic industry
- Supply chain management
- Internet Marketting
- Online transaction Processing
- Inventory management
- Data Collection
Shopping car is like git staging area for next commit. Subsets of products to process paynment for.
# Online goods and services
- music - iMusic
- Softwares - SaaS
Unprecedented increase in e-commerce after COVID 2020
Find more statistics at Statista
# Payment Processing Services
- Unified Payments Interface (UPI) - India
- Unlike traditional mobile wallets, which takes a specified amount of money from user and stores it in its own accounts, UPI withdraws and deposits funds directly from the bank account whenever a transaction is requested.
# Sell PDF
- on Amazon
# Digital delivery system
- User window shops
- User selects his purchases 0-*
- Makes Payment
- Post payment Processing - Deliver goods.
- Redownload window in case they loose it
- Launch your own affiliate program
# Digital Media
- Files like
- Videos like mp3
Webhooks are APIs requests but in reverse.
- Webhooks and APIs differ in how they make requests.
- Firebase Functions -
- Google cloud functions in python, Go, java, nodejs
- How to test webhooks locally? in development phase?
Tunneling software like
Have to update URL everytime is using a free version. How to do better? enter Stripe CLI
- HOw to deal with JSON on CLI?
Use jq tool. Its like
awkbut for JSON
# Stripe Payment
What should happen before payment?
- Enter CC info
- parse and send back to us a unique ID
NODE_ENV(set by node itself) is not production
- use dotenv only when in development mode
- Add prices in pennies (avoid floating point errors)
tokenfunction is called when after card information is captured and submitted
- To use your API key, assign it to stripe. The Node.js library will then automatically send this key in each request.
- Idempotence operations
- Can add discount coupons, Promotion Code
- Payments from client side needs to be verified by server as they could be manipulated by attacker
- Charge customer based on the price on backend
- strip will verify and return a token
- firebase cloud function to handle verification
- Client Side
- you define your products directly in the Stripe Dashboard and reference them by ID on the client side.
- Prebuilt UI Elements
- Webhook - like sending an order confirmation email to your customer, logging the sale in a database, or starting a shipping workflow
- Would have to use firebase middleware to add
corsmiddleware to request
- else request might not pass
- might work from browser but not from postman
- Checkout page should load
stripe.jsdirecctly from server to remain PCI compliant
What should happen after payment?
- Can send emails, invoices post payment to customer for free
- Currency Support
- Currency conversion
- Stripe supports processing charges in 135+ currencies allowing you to present prices in a customer’s native currency. Doing so can improve sales and help customers avoid conversion costs.
- Link with transferwise account to accept payments in USD, EUR, GBP, NZD, AUD
- Payout When you start processing live payments from your customers with Stripe, you won’t receive your first payout until 7–14 days after receiving your first successful payment.
- Stripe with google pay
- Checkout Flow
Apple Pay and Google Pay are enabled by default and automatically appear in Checkout when a customer uses a supported device and has saved at least one card in their digital wallet.
- Use the Dashboard, a custom webhook, or a third-party plugin to handle post-payment events like sending an order confirmation email to your customer, logging the sale in a database, or starting a shipping workflow.
# NOdejs Hosting
RedHat OpenShift is highly recommended for first timers because it offers free Node.js hosting forever
- How to secure client calls to backends hosted on cloud functions?
# How to design a ecommerce websites?
- Create user profile
- List products
- add/remove product to cart
- Purchase products
- Payment processor API
- Track order
- Database Model
- What if 2 users tryign to buy same thing
- Split page information into sections
- UI Features
- Keyboard shortcuts
- How to use tutorial? Help
# Payment Standards
# Implement Authentication with route guards
← Dotnet Core Firebase →