Digistore Direct Digital Marketplace
Instant-Delivery Marketplace with Automated Vendor Payouts
Digital product fulfillment backend and marketplace platform featuring instant downloads, subscription management, multi-currency processing, and automated vendor payouts. Designed around idempotent event handling so payment webhooks can never cause duplicate fulfillment.
Architecture & System Design
Stripe webhooks drive the entire fulfillment lifecycle. Every event is logged and checked for idempotency before license generation, and vendor earnings are tracked in a ledger that feeds an automated Stripe Connect payout job.
- Idempotent Stripe webhook handling backed by an event log to prevent duplicate fulfillment
- Signed, expiring, single-use download URLs to curb link sharing and piracy
- Automated Stripe Connect payout engine with per-vendor fee calculation
- License key generation with per-purchase usage and activation tracking
Engineering Challenges
Duplicate Fulfillment from Webhook Retries
Stripe retries webhook delivery on timeout, which risked generating duplicate license keys and double-charging vendor payouts.
Added an idempotency layer that logs every processed Stripe event ID before fulfillment runs, short-circuiting retried deliveries.
Zero duplicate deliveries recorded across 10K+ processed transactions.
Preventing Digital Piracy
Direct download links were being shared outside of purchases, undermining vendor revenue.
Replaced static URLs with signed, expiring, single-use download tokens generated per purchase and invalidated after use.
Unauthorized redownload attempts blocked; reported link-sharing abuse dropped sharply.
Multi-Currency Vendor Payout Reconciliation
Vendors sold in multiple currencies, making manual payout reconciliation error-prone and slow.
Built an automated Stripe Connect transfer engine that calculates platform fees and currency conversion before scheduling payouts.
Fully automated payouts with zero manual reconciliation required.
Core Features
Instant Digital Delivery
Post-purchase fulfillment that generates license keys and delivers download links within seconds.
Clean Code
1<?php23namespace App\Http\Controllers\Webhooks;45use App\Models\WebhookEvent;6use App\Services\DigitalFulfillmentService;7use Illuminate\Http\Request;89class StripeWebhookController extends Controller10{11 public function __invoke(Request $request, DigitalFulfillmentService $fulfillment)12 {13 $eventId = $request->input('id');1415 if (WebhookEvent::where('stripe_event_id', $eventId)->exists()) {16 return response()->json(['status' => 'duplicate']);17 }1819 WebhookEvent::create(['stripe_event_id' => $eventId]);2021 if ($request->input('type') === 'checkout.session.completed') {22 $fulfillment->deliver($request->input('data.object'));23 }2425 return response()->json(['status' => 'processed']);26 }27}