BDX Checkout Architecture & Order Flow
The BDX checkout process transforms buyer purchase intent into a secure, escrow-backed order workspace. The pipeline manages guest account creation, verification, atomic stock reservation, automated deliveries, and state machine transitions.
This document presents a comprehensive guide to the checkout flow, order lifecycle states, and digital delivery mechanics.
1. End-to-End Checkout Flow​
[Buyer Clicks "Buy Now" on Offer Page]
|
v
GET /checkout/{offer}?qty=N
|
+---> Is User Authenticated?
| |
| +---> NO -> Display "Continue as Guest" Option
| | Guest inputs email & receives 6-digit verification code
| | Verifies code to activate guest account
| |
| +---> YES -> Render Checkout View
|
v
Order Submission & Safety Checks:
1. Verify offer is active & buyable
2. Verify buyer identity & account status
3. Prevent seller self-purchase
4. Validate Terms & Risk Acknowledgments
5. Check for duplicate pending orders
|
v
Atomic Stock Reservation:
Locks offer stock quantity to prevent double-purchases
|
v
Order Record Created:
Status set to pending payment; stock reserved
|
v
Payment Method Selection:
|
+---> BDX Wallet Balance (If balance >= total price)
| |
| v
| Instant payment deducted from wallet
| Mark order paid -> Status: awaiting delivery
| Trigger automated instant delivery (if applicable)
| Redirect to Order Workspace
|
+---> Online Payment Gateways (bKash, Nagad, etc.)
| |
| v
| Redirect buyer to secure payment portal
| Process payment verification callback
|
+---> Manual Payment (bKash / Nagad / Rocket / Bank Transfer)
|
v
Redirect to Order Workspace with payment instructions
Buyer submits transaction ID / proof screenshot
Admin reviews & verifies payment proof
2. Guest Checkout & Email Verification​
To eliminate friction while preventing spam accounts and stock-locking bots, BDX provides a streamlined guest checkout sequence:
- Guest Registration: Guests enter their email address during checkout. A buyer account is created automatically.
- Verification Code Sent: A dynamic 6-digit verification code is emailed to the guest.
- Email Verification: Entering the 6-digit code verifies the email address and completes order submission.
3. Order Lifecycle & Status States​
Every order on BDX moves through a structured state machine. An order contains three main status tracking indicators: global order status, payment status, and delivery status.
+-----------------------------------+
| ORDER CREATED |
| status: pending_payment |
| payment_status: awaiting_payment |
| delivery_status: awaiting_payment|
+-----------------+-----------------+
|
Payment Verified
|
+-----------------v-----------------+
| PAYMENT COMPLETED |
| status: awaiting_delivery |
| payment_status: paid |
| delivery_status: awaiting_seller |
+-----------------+-----------------+
|
Seller Delivers Item
|
+-----------------v-----------------+
| DELIVERY SUBMITTED |
| status: delivered |
| payment_status: paid |
| delivery_status: delivered |
+--------+-----------------+--------+
| |
Buyer Confirms /| |\ Buyer Opens
7 Days Elapse | | Dispute
v v
+--------+--------+ +------+--------+
| COMPLETED | | DISPUTED |
| status: | | status: |
| completed | | disputed |
+-----------------+ +---------------+
Order Status Reference Table​
| Global Order Status | Payment Status | Delivery Status | Description / Next Action |
|---|---|---|---|
pending_payment | awaiting_payment | awaiting_payment | Initial checkout state. Stock reserved. Awaiting payment submission or verification. |
awaiting_delivery | paid | awaiting_seller | Payment confirmed and held safely in escrow. Seller notified to deliver item or service. |
delivered | paid | delivered | Seller submitted delivery proof/codes inside order workspace. 7-day buyer protection countdown begins. |
completed | paid | confirmed | Buyer confirmed delivery OR 7 days elapsed without dispute. Funds released to seller wallet available clearing balance. |
disputed | paid | disputed | Buyer opened a dispute within 7-day window. Escrow held in moderation. Seller has 24 hours to respond. |
cancelled | failed/refunded | cancelled | Order cancelled prior to delivery. Reserved stock returned to pool. |
refunded | refunded | refunded | Full or partial refund issued to buyer's BDX Wallet balance following approved dispute or cancellation. |
4. Stock Protection & Automated Delivery​
Stock Reservation Safeguards​
To prevent race conditions where multiple buyers attempt to purchase the same scarce digital item (such as single-use activation keys or game accounts) simultaneously:
- Stock is locked instantly at the moment of checkout initiation.
- If an order is cancelled or expires before payment is completed, the reserved quantity is automatically restored to the seller's active stock pool.
Automated Code Pool Delivery​
For offers configured with instant auto-delivery (such as gift cards, wallet top-up codes, or digital vouchers):
- Trigger: Automated delivery initiates immediately after payment confirmation.
- Key Assignment: The system claims unredeemed digital codes from the seller's encrypted inventory vault.
- Instant Delivery: The digital code is displayed securely inside the buyer's private Order Details page and message thread, updating order status to delivered instantly.