Services About Us Why Choose Us Our Team Development Workflow Technology Stack Case Studies Portfolio Blog Free Guides Shopify Audit ($499) Estimate Project Contact Us
Back to Insights
E-Commerce Sep 08, 2026 5 min read

B2B Marketplace RFQ State Machine: Building Custom Request-For-Quote Workflows in Sharetribe

Enterprise B2B marketplaces operate on a fundamentally different dynamic than consumer peer-to-peer platforms. While B2C transactions rely on instant "Buy Now" checkout, B2B procurement is defined by bespoke pricing, ...

TV
TechVinta Team
Specialized in Rails, React, Marketplace & Sharetribe Flex Architecture
Verified Technical Guide
B2B Marketplace RFQ State Machine: Building Custom Request-For-Quote Workflows in Sharetribe

Direct Answer: Customizing B2B Request-For-Quote (RFQ) workflows on Sharetribe Flex requires extending its native JSON API transaction state machine with custom metadata transitions, server-side webhooks, and Ruby on Rails microservices. This enables enterprise-grade multi-tier deposit splits, tiered milestone quote approvals, and secure supplier negotiations without breaking marketplace core mechanics.

Enterprise B2B marketplaces operate on a fundamentally different dynamic than consumer peer-to-peer platforms. While B2C transactions rely on instant "Buy Now" checkout, B2B procurement is defined by bespoke pricing, minimum order quantities (MOQs), lengthy negotiations, legal terms, and complex payment structures. Standard e-commerce architectures often fail here.

At TechVinta, our Principal Solutions Architects engineer high-performance B2B applications, helping venture-backed marketplaces scale past their first million in GMV. We provide dedicated engineering teams with guaranteed 4-6 hour US timezone overlap, delivering production-ready codebases with zero communication lag.

This technical guide details how to build advanced RFQ state machines, milestone deposit flows, and dynamic supplier quote adjustments inside Sharetribe Flex.

1. Architectural Anatomy of Sharetribe Flex RFQ Workflows

Sharetribe Flex utilizes a transactional state machine driven by transitions. Out-of-the-box, it supports standard flows like booking or purchasing. For B2B RFQs, we must define a custom transition lifecycle that moves an order through states such as transition/request-quote, transition/submit-supplier-quote, transition/negotiate, transition/approve-quote, and transition/pay-milestone-deposit.

Metric / Phase Standard Sharetribe Flex (Out-of-the-Box) Custom B2B RFQ Architecture (TechVinta Approach)
Development Cost & Timeline $8,000 – $12,000 (2-4 Weeks) $15,000 – $25,000 (6-10 Weeks)
Hourly Engineering Rate $35 – $50/hr (Offshore Standard) $45 – $65/hr (Vetted Elite Engineers)
Quote Negotiation Mechanics Single fixed price, instant buy Multi-tier revisions, MOQ checks, counter-offers
Payment & Escrow Splitting 100% upfront charge via Stripe Connect Milestone-based deposits (e.g., 30% upfront, 70% delivery)
Backend Extension Layer Flex Console & Integration API Flex CLI, Hosted Node.js/Rails microservices, Webhooks

2. Extending the Transaction State Machine via Flex CLI

To implement an RFQ process, you must define your state machine transitions inside your Flex application's transaction process configuration. This is managed using the Flex CLI.

Below is a production-grade transaction process snippet outlining how buyer quote requests and supplier counter-offers are structurally linked:


# processes/b2b_rfq_process.rb
# Conceptual definition of a Sharetribe Flex B2B RFQ State Machine
transition :start,
  from: :initial,
  to: :transition/request-quote

transition :supplier_quote,
  from: :transition/request-quote,
  to: :transition/submit-quote

transition :negotiate,
  from: :transition/submit-quote,
  to: :transition/counter-offer

transition :approve,
  from: [:transition/submit-quote, :transition/counter-offer],
  to: :transition/quote-approved

transition :deposit_paid,
  from: :transition/quote-approved,
  to: :transition/milestone-deposit-paid

When a buyer initiates an RFQ, the React frontend dispatches an SDK call to create a transition with custom metadata payloads stored securely in Extended Data (protectedData or publicData).

3. Implementing Multi-Tier Deposit Splitting with Stripe Connect

B2B transactions rarely use single-charge models. Suppliers often require a 30% deposit to begin manufacturing, followed by a 40% milestone payment upon quality inspection, and a final 30% upon freight delivery. Because Sharetribe's native Stripe integration handles simple upfront captures, we extend this by pairing Flex webhooks with a secondary Ruby on Rails backend service.

When a quote is approved, our microservice orchestrates the payment split:


# app/services/stripe_deposit_service.rb
class StripeDepositService
  def initialize(transaction_id, amount_cents, supplier_stripe_id)
    @transaction_id = transaction_id
    @amount_cents = amount_cents
    @supplier_stripe_id = supplier_stripe_id
  end

  def process_initial_deposit
    # Create a destination charge or separate transfer for the 30% milestone
    Stripe::PaymentIntent.create({
      amount: (@amount_cents * 0.30).to_i,
      currency: 'usd',
      payment_method_types: ['card'],
      transfer_data: {
        destination: @supplier_stripe_id,
      },
      metadata: {
        sharetribe_transaction_id: @transaction_id,
        milestone: 'initial_deposit'
      }
    })
  end
end

4. Securing Webhook Verification & State Synchronization

Ensuring absolute consistency between Sharetribe Flex, your backend database, and Stripe requires cryptographically secure webhook verification. Whenever a supplier updates a quote or a buyer submits an RFQ, Flex dispatches an HTTPS POST request to your endpoint.

Here is how TechVinta engineers secure ingestion endpoints in Rails 8:


# app/controllers/api/v1/webhooks_controller.rb
class Api::V1::WebhooksController < ApplicationController
  skip_before_action :verify_authenticity_token

  def receive
    payload = request.body.read
    sig_header = request.env['HTTP_X_SHARETRIBE_SIGNATURE']

    if SharetribeSignatureValidator.valid?(payload, sig_header)
      event = JSON.parse(payload)
      ProcessFlexEventJob.perform_async(event['event'], event['resource'])
      head :ok
    else
      head :unauthorized
    end
  end
end

Need help architecting your marketplace transaction flow? Partner with TechVinta. Our distributed engineering squads deliver enterprise-grade marketplace infrastructure on budget and on schedule.

Frequently Asked Questions

Can Sharetribe Flex handle custom B2B Request-For-Quote (RFQ) workflows natively?

No, Sharetribe Flex out-of-the-box is optimized for standardized booking and ecommerce checkout flows. To support multi-tier RFQs, negotiations, minimum order quantities (MOQs), and custom quote approvals, you must extend the Flex transaction state machine via the CLI and integrate a secondary backend microservice (such as Node.js or Ruby on Rails) to manage custom metadata and complex negotiations.

How do you handle split payments and milestone deposits for high-value B2B orders?

We accomplish milestone deposits by decoupling the initial checkout from full capture. When a buyer accepts a supplier's customized quote, our backend triggers a Stripe PaymentIntent for the initial deposit percentage (e.g., 30%). Subsequent milestone payments are locked via automated triggers that evaluate fulfillment verification statuses stored in Sharetribe's extended transaction metadata before executing subsequent Stripe transfers.

Why partner with TechVinta for custom Sharetribe Flex development?

TechVinta combines deep domain expertise in B2B marketplace architecture with elite, cost-effective engineering talent ($35-$65/hr). We provide reliable execution backed by a 4-6 hour US timezone overlap, ensuring rapid communication, rigorous code reviews, and production-ready deployments for complex systems requiring advanced API orchestration.

Interactive Tool

Marketplace Take Rate & Stripe Connect Fee Calculator

Calculate your true net margins after Stripe Connect processing, cross-border surcharges (+1%), FX (~1%), and dispute reserves.

Cross-Border Volume 20%
Gross Platform Rev
$5,000
Total Fees
$1,925
Estimated Net Monthly Margin
$3,075
Effective Take: 6.15%
Share this article:
TV

Written by TechVinta Team

We are a full-stack development agency specializing in Ruby on Rails, React.js, Vue.js, Flutter, Shopify, and Sharetribe. We write about web development, DevOps, and building scalable applications.

Keep Reading

TechVinta Assistant

Online - Ready to help

Hi there!

Need help with your project? We're online and ready to assist.

🍪

We use cookies for analytics to improve your experience. See our Cookie Policy.