Part 8 - Business Models, Merchant Payments, and Stripe or HitPay Integration
Understand B2C, B2B, subscriptions, marketplaces, merchant payments, settlement, and how to choose Stripe or HitPay for a React Native app.
Business Models, Merchant Payments, and Stripe or HitPay Integration
The payment method is only one part of an ecommerce system. Before choosing Stripe or HitPay, identify the business model, the merchant receiving the money, and the events that move an order from created to paid.
This article is educational. It does not add live payment credentials, payment models, or provider integrations to this Django repository.
Start with the business model
| Term | Full name | Who sells? | Who pays? | Typical payment needs |
|---|---|---|---|---|
| B2C | Business-to-Consumer | A business | An individual customer | Cards, PayNow, wallets, refunds, shipping |
| B2B | Business-to-Business | A business | Another business | Invoices, purchase orders, bank transfer, cards, credit terms |
| D2C | Direct-to-Consumer | A brand | An individual customer | Branded checkout, discounts, shipping, customer accounts |
| Subscription | Subscription business model | A business | A recurring customer | Recurring billing, retries, cancellation, invoices |
| Marketplace | Marketplace business model | Multiple sellers | A buyer | Seller onboarding, commissions, split accounting, payouts |
| SaaS | Software as a Service | A software company | A user or company | Plans, trials, metered usage, recurring invoices |
| C2C | Consumer-to-Consumer | An individual seller | An individual buyer | Buyer protection, seller payouts, disputes, moderation |
| B2B2C | Business-to-Business-to-Consumer | Supplier and channel partner | Final consumer | Multiple commercial relationships and settlement rules |
The D in D2C means Direct: a brand sells directly to the consumer without a traditional retailer or distributor in between.
MugMori is currently a B2C teaching example. A future version could become B2B if it sells bulk printed cups to offices, D2C if it is a brand-owned store, or a marketplace if independent artists sell through the same app.
What is a merchant payment?
A merchant payment is the movement of money from a customer to the business that is responsible for the sale.
| Stage | What happens | System of record |
|---|---|---|
| Order created | The backend records products, quantity, price, tax, shipping, and customer details | Django or FastAPI database |
| Payment initiated | The backend asks Stripe or HitPay to create a payment request | Payment provider |
| Authorization | The provider and bank or wallet approve the payment attempt | Payment provider |
| Capture | The payment is collected, immediately or later depending on the flow | Payment provider |
| Settlement | The provider makes funds available in the merchant balance | Payment provider |
| Payout | Funds move from the provider balance to the merchant bank account | Provider and merchant bank |
| Refund | The merchant returns all or part of the payment | Provider plus merchant order system |
| Dispute | A customer or bank challenges a payment | Provider, merchant, and sometimes the bank |
Do not confuse settlement with payout. A payment may be successful while the money is still pending settlement or waiting for the merchant's payout schedule.
The parties in a payment flow
| Party | Responsibility |
|---|---|
| Customer | Chooses products and authorizes payment |
| Merchant | Sells the product, fulfills the order, and handles customer support |
| Payment service provider | Provides checkout, payment processing, reporting, refunds, and webhooks |
| Acquirer or payment network | Routes card or local payment transactions |
| Platform | May provide the marketplace, catalog, and seller tools |
| Seller | Supplies goods or services in a marketplace |
| Bank or wallet | Holds or transfers the customer's funds |
For a simple MugMori B2C store, the merchant is the business operating MugMori. For a marketplace, decide whether the platform or each seller is the merchant of record before writing payment code.
Merchant of record versus platform
| Question | Single merchant store | Marketplace |
|---|---|---|
| Who owns the customer order? | The store | Platform or seller, by accepted design |
| Who sets the final price? | Store | Seller, platform, or both |
| Who receives the first payment? | Merchant account | Platform or connected seller accounts |
| Who handles refunds? | Merchant | Platform or seller according to policy |
| Who handles tax and receipts? | Merchant | Must be assigned explicitly |
| Is seller payout required? | No | Yes |
| Is split payment required? | No | Usually |
Do not build marketplace split payments merely because multiple products exist. A single merchant can sell many products without creating seller accounts or payout flows.
Stripe and HitPay for common models
| Business model | Stripe fit | HitPay fit | Main design concern |
|---|---|---|---|
| B2C Singapore store | Strong | Strong | Local methods, refunds, webhooks |
| B2B invoicing | Strong | Possible | Invoice terms and reconciliation |
| D2C brand store | Strong | Strong | Checkout conversion and customer experience |
| Subscription | Strong | Possible, method-dependent | Recurring-payment eligibility and retries |
| Marketplace | Possible with Connect | Requires account-specific platform design | Seller onboarding and payouts |
| SaaS | Strong | Possible | Plans, billing cycles, usage, failed payments |
| C2C marketplace | Possible with Connect | Requires careful platform review | Disputes, seller verification, and payouts |
Stripe is usually the stronger teaching example for global checkout, subscriptions, invoices, and platform capabilities. HitPay is a strong teaching example for Singapore and Southeast Asian local methods such as PayNow, GrabPay, and ShopeePay. The provider still determines the final available methods for the merchant account.
Map payment methods to the model
| Need | B2C | B2B | Subscription | Marketplace |
|---|---|---|---|---|
| Visa and Mastercard | Common | Common | Common | Common |
| PayNow | Useful in Singapore | Useful for invoices | Usually not recurring | Useful for buyer checkout |
| GrabPay or ShopeePay | Useful for local customers | Less common | Usually not recurring | Useful where enabled |
| Bank transfer | Optional | Common | Possible | Possible for seller settlement |
| PayPal | Useful for eligible international buyers | Possible | Provider/account dependent | Provider/account dependent |
| Recurring billing | No | Often invoice-based | Required | Depends on the product |
| Seller payouts | No | No | No | Required |
Keep payment authority on the backend
The React Native app should never decide that an order is paid.
React Native app
|
v
FastAPI payment endpoint
|
+--> Stripe or HitPay
|
v
Verified webhook -> Django database
The mobile app may display a success screen, but the backend must verify the provider event, payment identifier, amount, currency, and order before changing the order state.
Django and FastAPI responsibilities
| Responsibility | Django | FastAPI |
|---|---|---|
| Admin and operational review | Strong fit | Not the primary role |
| Existing blog and catalog | Strong fit | Reads through an accepted boundary |
| Mobile JSON API | Possible | Strong fit |
| Create payment request | Service layer or API | Strong fit |
| Receive provider webhook | Django view or shared service | Strong fit |
| Store order and payment state | Existing Django ORM | Reuse Django-owned models or service boundary |
| Background reconciliation | Management command or worker | Worker or task system |
Use one owner for order state, payment state, refunds, and webhook idempotency. Do not create separate Stripe and HitPay orders that can disagree about whether a customer has paid.
Minimum payment records
| Record | Example fields |
|---|---|
| Order | id, customer, currency, trusted total, status |
| Order item | product, quantity, unit price, options |
| Payment attempt | provider, provider payment ID, amount, status |
| Refund | payment ID, amount, reason, provider refund ID |
| Webhook event | provider, event ID, received time, processed time |
| Merchant payout | merchant ID, amount, currency, payout status |
The provider ID and webhook event ID should be unique within the appropriate provider scope. This prevents duplicate webhook delivery from creating duplicate fulfillment or duplicate payouts.
State transitions
| Current state | Event | Next state |
|---|---|---|
| Created | Payment request created | Pending payment |
| Pending payment | Provider success webhook | Paid |
| Pending payment | Provider failure or expiry | Payment failed |
| Paid | Fulfillment completed | Fulfilled |
| Paid | Refund accepted | Refunded or Partially refunded |
| Any active state | Duplicate webhook | No state change |
The redirect URL is useful for returning the customer to the app. It is not a trusted payment confirmation.
Security checklist
| Rule | Reason |
|---|---|
| Calculate totals on the backend | Prevent client-side price tampering |
| Keep provider secrets on the server | Protect the merchant account |
| Verify webhook signatures | Reject forged payment events |
| Make webhook handling idempotent | Providers retry deliveries |
| Store provider IDs | Reconcile orders and refunds |
| Use HTTPS | Protect payment and customer data |
| Avoid private data in metadata | Provider dashboards and logs may expose it |
| Test refunds and failures | A success-only flow is incomplete |
Final decision guide
| Choose this direction | When it fits |
|---|---|
| Stripe-first | Global customers, subscriptions, invoices, or platform capabilities are central |
| HitPay-first | Singapore and Southeast Asian local payment methods are central |
| Both providers | The business has a clear routing strategy and accepts the extra reconciliation work |
| Neither yet | The business model, merchant of record, and order ownership are still undecided |
For MugMori, keep the current articles educational. Before implementing live payments, accept a separate plan for order models, merchant ownership, provider secrets, webhook verification, refunds, and deployment configuration.