Case study
Voltigo
Engineering marketplace payment infrastructure with Stripe Connect V2
Voltigo is an anonymized name for a real EV charging marketplace. The brand and some details have been generalized to protect client confidentiality.
- Client
- Withheld under NDA
- Role
- Technical Consultant & Full-Stack Developer
- Focus
- Payment architecture, Stripe Connect, Stripe Tax
- Markets
- Canada and the United States
- Next.js
- React
- TypeScript
- Stripe Connect V2
- Stripe Tax
- Stripe Identity
- Upstash QStash
- SendGrid

Overview
Project overview
Voltigo connects electric vehicle drivers with independent charging station hosts across Canada and the United States. Drivers discover stations, request bookings, and pay online. Hosts list their stations, manage reservations, and earn revenue from completed charging sessions.
Behind that experience is the financial infrastructure for marketplace payments, host payouts, commissions, tax calculations, identity verification, and the booking operations those payments depend on.
I joined as technical consultant and full-stack developer to own that infrastructure: the architecture, the Stripe implementation, and the reliability work required to run it in production.
Challenge
The challenge
The client already had a marketplace application and needed help designing and implementing its payment infrastructure. Several problems had to be solved together:
- Selecting the Stripe Connect architecture that fit the marketplace’s business model.
- Designing a payment lifecycle for bookings made days or weeks in advance.
- Automating tax calculations across locations in Canada and the United States.
- Implementing identity verification and account onboarding.
- Handling payment authorizations, captures, cancellations, and refunds reliably.
- Addressing existing architectural and security weaknesses before introducing critical financial functionality.
The client needed someone who could understand the business requirements, make the architectural decisions, and take ownership of the technical implementation.
Approach
Architecture before implementation
I started with discovery meetings to understand the marketplace model, business requirements, commission structure, booking lifecycle, onboarding experience, and tax constraints. Rather than implementing Stripe immediately, I evaluated the available approaches and designed the payment architecture around the required business flows.
Key architectural decisions
- Selected Stripe Connect Accounts V2 as the foundation for marketplace payments.
- Chose the destination charges model to structure payments between the platform and connected hosts.
- Designed the funds flow to align with the marketplace's legal and commercial model, ensuring that host funds would not be held in the platform's Stripe balance.
- Defined the platform as the Merchant of Record (MoR), making the platform, rather than individual hosts, legally responsible for transactions with customers.
- Designed a booking-aware authorization and capture lifecycle to accommodate reservations made days or weeks in advance. Standard card authorization windows are typically limited to around seven days, making it impractical to authorize payments when bookings are accepted far in advance. I therefore separated payment method collection from authorization, using SetupIntents at booking time and scheduling off-session PaymentIntents closer to the charging session.
- Selected the appropriate connected account configuration for each supported market (Canada and the US).
- Designed the Stripe Tax integration around the marketplace's tax requirements.
- Chose Stripe Embedded Components to provide an integrated host onboarding and account management experience.
The objective was a payment infrastructure that could handle the complete marketplace transaction lifecycle, including failure scenarios.
Engineering
Engineering and implementation
Technical audit and application stabilization
Before implementing the payment infrastructure, I conducted a technical audit of the existing codebase and addressed the issues that would have made a payments integration unsafe.
- Fixed critical unauthorized-access vulnerabilities.
- Secured sensitive environment variables and API keys.
- Resolved architectural issues that could interfere with payment integration.
- Improved the development and testing workflow.
- Introduced a structured Git branching strategy: feature branches, then staging, then production.
That gave payment-related changes a safer path, so they could be validated in staging before reaching production.
Stripe Connect V2 marketplace payments
I implemented the marketplace’s payment infrastructure with Stripe Connect Accounts V2 and destination charges.
- Connected account creation and configuration for Canadian and US hosts.
- Host onboarding through Stripe embedded components.
- Embedded account management and payout visibility.
- Connected account readiness and verification checks.
- Marketplace commission and host payout handling.
- Separate account capability requirements for the supported markets.
Embedded components covered onboarding, account management, notifications, and a read-only payouts view inside the host experience. A listing could not go live until the required payout and tax-location prerequisites were satisfied.
Booking-aware payment lifecycle
One of the harder parts was payments for bookings that could take place days or weeks after the request. A standard authorization at booking time would not hold, because card authorizations expire.
I designed a lifecycle that follows the booking instead of authorizing every card up front.
- 1
Payment method setup
Every booking starts by saving the customer’s payment method through a Stripe SetupIntent.
- 2
Host acceptance
Once the payment method is saved, the booking can proceed to the host.
- 3
Authorization timing
Bookings inside the authorization window are authorized when the host accepts. Further-out bookings are authorized closer to their scheduled start.
- 4
Off-session payments
Future authorizations use off-session PaymentIntents, with a dedicated 3D Secure recovery flow when additional authentication is required.
- 5
Automatic capture
Authorized payments are captured when the charging session starts.
- 6
Cancellation handling
Depending on the payment state, cancellation releases the authorization or initiates a refund.
I also added concurrency safeguards for the case where payment capture and booking cancellation happen at the same time.
Stripe Tax
I configured Stripe Tax directly into the booking and payment infrastructure so tax followed the same lifecycle as the charge.
- Automatic tax calculation during booking.
- Tax calculated from the charging station’s location.
- Exclusive tax calculation on applicable booking amounts.
- Recalculation during payment authorization using the price locked at booking time.
- Tax transactions committed only after a successful payment capture.
- Tax transactions reversed when a payment is refunded.
That removed manual tax calculation from the booking flow and tied it to capture and refund, not just to checkout.
Stripe Identity
I implemented Stripe Identity so drivers could be verified during onboarding, without leaving the existing signup flow.
- Document verification.
- Matching selfie verification.
- Resumable verification sessions.
- Daily verification attempt limits.
- Integration with the existing onboarding experience.
Host verification stayed on Stripe Connect’s account verification process.
Payment reliability and webhooks
Financial operations have to stay consistent when requests are retried, webhooks arrive more than once, or several operations happen at the same time. Successful API calls were not enough.
- Idempotency keys for payment authorization, capture, refunds, and identity session creation.
- Two webhook destinations: one for platform events and one for Connect account events.
- Independent webhook signature verification.
- Database-based event claiming to prevent duplicate processing.
- Retry-safe webhook handling when processing fails.
- Transfer and application fee reversals during applicable refund scenarios.
- Conditional database updates to protect against payment capture and cancellation race conditions.
I also added recovery for missed scheduled operations, so the system does not depend entirely on each individual background job succeeding the first time.
Background processing and email
Using Upstash QStash, I built scheduled background processing for the operations that cannot happen inside the request that created the booking.
- Scheduled payment authorizations.
- Automatic payment captures.
- Abandoned checkout expiration.
- Unaccepted booking expiration.
- Automated cancellation and refund workflows.
- Recovery of missed operations through a scheduled reconciliation process.
I also built the transactional email system, about 20 templates covering authentication, booking updates, payment authorization, failed payments, 3D Secure, receipts, cancellations, refunds, and other marketplace messages.
Emails are queued through QStash and delivered with SendGrid in production. Ethereal is used in development. Immediate notifications use a booking snapshot. Scheduled notifications load the latest booking state so they do not send outdated information.
Decisions
Key engineering decisions
Financial consistency
Capture, cancellation, refunds, and transfer reversals are guarded so marketplace balances stay consistent when those operations overlap.
Tax calculation integrity
Tax uses the charging station’s location and the price locked at booking. The tax transaction is committed only after a successful capture.
Idempotent payment operations
Payment operations and scheduled jobs use idempotency and deduplication so a retry does not create a second charge, refund, or identity session.
Resilient asynchronous processing
Webhook retries, QStash scheduling, and a recovery process handle failed or missed operations instead of assuming every job runs once.
Outcome
Outcome
The engagement delivered an integrated marketplace payment infrastructure covering the booking-to-payment lifecycle.
- Stripe Connect V2 marketplace payments.
- Automated Stripe Tax calculations.
- Stripe Identity verification.
- Embedded host onboarding and account management.
- Booking-aware payment authorization and capture.
- Automated cancellation and refund handling.
- Reliable webhook and background job processing.
- A complete transactional email infrastructure.
- Stronger application security and a staging-to-production workflow.
Result
The result was a more robust technical foundation for a marketplace with complex booking, payment, and financial requirements.
Stack
Technology stack
Payment infrastructure
- Stripe Connect V2
- Stripe Tax
- Stripe Identity
- Stripe Embedded Components
- PaymentIntents
- SetupIntents
Application
- Next.js
- React
- TypeScript
Background processing
- Upstash QStash
- SendGrid
- Ethereal
Development and deployment
- GitHub
- Staging and production
- Vercel
Need this kind of payment infrastructure?
I design and build marketplace payments, billing, and the systems around them.