How It Works
Understand the complete purchase flow from customer discovery to user provisioning in your application.
The Purchase Flow
Step-by-Step Breakdown
Customer Discovers Your Product
A customer browses Sumo Marketplace and finds your product listing. They review your pricing tiers, features, and decide to purchase a lifetime discount.
Sumo Creates Checkout Session
When the customer clicks "Buy", Sumo creates a Stripe Checkout session on your connected Stripe account. This session includes special metadata:
{
"sumo_campaign_id": "camp_abc123",
"sumo_product_id": "prod_xyz789",
"sumo_product_tier_id": "tier_456",
"sumo_user_id": "user_def",
"sumo_quantity": "1"
} Stripe Sends Webhook
After successful payment, Stripe sends a checkout.session.completed webhook to your endpoint. This webhook contains all the checkout data including Sumo's metadata.
Your App Provisions Access
Your webhook handler detects the Sumo metadata and performs user provisioning:
- Create or find user account by email
- Link the Stripe subscription to the user
- Grant access to features based on the tier
- Send welcome email with login instructions
Key Insight
The purchase happens on your Stripe account, not Sumo's. You receive the same webhooks you'd get from any Stripe purchase. The only difference is that Sumo created the checkout session with special metadata to identify the purchase source.