Payments · Development
Payment Agent
The billing engineer who closes the gap between Stripe's dashboard and your production code.
What it does
A senior payments engineer who reads your codebase first, then generates every layer of your billing system: subscription lifecycle, signature-verified webhooks, Stripe Connect marketplace payouts, dunning recovery, 3DS/SCA for EU compliance, and a test suite that covers failed cards, trial expiry, and disputed charges. Wired into your existing stack, not a generic template.
What it can do
Complete Subscription Billing System
Generates the entire subscription lifecycle in one pass: Stripe customer creation (idempotent, one per user), checkout session, customer self-serve portal, plan upgrade/downgrade with proration, trial periods, and status middleware that gates your routes by subscription state. Every event handler wired: payment succeeded, invoice failed, subscription updated, trial ending.
- “Add 3-tier subscription billing to our SaaS — starter, pro, enterprise — with a 14-day free trial and self-serve upgrade/cancel portal”
- “Implement plan proration: when a user upgrades mid-cycle, charge only for the remaining days at the new rate”
- “Build a subscription status gate — block access to paid features if subscription.status is not "active" or "trialing"”
Webhook Handler with Battle-Tested Security
Stripe webhook handlers are where most integrations have critical vulnerabilities: no signature verification means anyone on the internet can fake payment events. Generates handlers with stripe.webhooks.constructEvent() on the raw body (not parsed JSON — parsed JSON silently breaks verification), idempotency checks to skip replayed events, and a 200-always-on-success pattern so Stripe stops retrying.
- “Audit and rewrite our existing webhook handler — we're not sure if signature verification is correct”
- “Handle all critical Stripe events: payment succeeded, invoice failed, subscription canceled, dispute opened”
- “Add idempotency to our webhook handler so replayed events don't double-credit user accounts”
Stripe Connect Marketplace Payouts
Stripe Connect is the most complex part of Stripe — platform fees, connected account onboarding, split payments, payout schedules, negative balance handling. Generates the full flow: Express onboarding (fastest to production), account status webhooks, PaymentIntents with automatic fee split and transfer, and a dashboard link for sellers to view their earnings.
- “Our marketplace needs Stripe Connect — sellers keep 80%, we take 20%, with weekly automatic payouts”
- “Build connected account onboarding with Express flow and return/refresh URL handling”
- “Handle disputes on connected accounts — platform covers the negative balance until the seller repays”
Dunning & Failed Payment Recovery
When a subscription payment fails, most apps either cancel immediately or do nothing. Generates a full dunning system: Stripe Smart Retries configured for day 1/3/7, invoice.payment_failed webhook tracks attempt count, grace period logic keeps access alive for N days, recovery email sequence via sapixMail after each failed attempt, and a reactivation flow when the customer updates their card.
- “Wire up dunning: 3 retry attempts over 7 days, email after each failure, 14-day grace period, then downgrade to free”
- “Build the payment recovery flow: customer clicks email link, updates card, subscription resumes automatically”
- “Send a "trial ending in 3 days" email and an "update payment method" email when their card is about to expire”
Usage-Based & Metered Billing
Charges customers per API call, per seat, per GB processed — billing that scales with actual usage. Generates Stripe metered prices with configurable tiers, wires stripe.subscriptionItems.createUsageRecord() into your actual request handlers, builds a usage dashboard endpoint showing the current billing period, and handles overage tiers with graduated pricing.
- “Bill per API call: $0.001 each, aggregated daily, invoiced monthly with full usage breakdown”
- “Add seat-based billing: $10/seat/month, increment/decrement when users are added or removed”
- “Implement graduated tiers: first 1000 calls free, $0.001 each up to 100k, $0.0005 beyond that”
3DS / SCA for European Compliance
EU regulations require Strong Customer Authentication for most card payments. Without it, EU cards are declined at checkout. Generates PaymentIntents with the correct confirmation flow, Payment Element on the frontend to handle 3DS challenges natively, and off-session recovery: when a recurring charge triggers authentication_required, sends the customer a secure link to re-authenticate — instead of silently failing.
- “We're expanding to Europe and getting card declines — implement 3DS on checkout and subscriptions”
- “Handle authentication_required on off-session subscription renewals: email customer with a re-auth link”
- “Add SetupIntent flow to save cards for future off-session charges with proper SCA consent”
Full Billing Test Suite
Generates a complete test matrix: every Stripe test card number (success, 3DS required, insufficient funds, expired, stolen), Stripe test clock scenarios for trial expiry and failed renewal cycles, unit tests mocking the Stripe SDK, and integration tests hitting stripe-mock. No more discovering billing bugs in production.
- “Generate a full Vitest test suite — success, 3DS, declined, expired, and stolen card scenarios”
- “Use Stripe test clock to simulate a full 30-day subscription cycle: trial, first invoice, failed renewal, dunning, cancellation”
- “Write integration tests for our webhook handler covering every event type we handle”
Good for / not for
Great for
- Adding billing to a SaaS from scratch — full subscription lifecycle in one session
- Fixing insecure webhook handlers (missing signature verification = critical vulnerability)
- Stripe Connect marketplaces with split payments and seller payouts
- EU expansion needing 3DS/SCA compliance to stop EU card declines
- Replacing a broken dunning flow that silently cancels customers on first failed payment
Not the right fit for
- One-off refunds or manual adjustments — just use the Stripe dashboard
- Basic payment links with no custom code — Stripe's no-code tools handle that
- Billing analytics and reporting — use Stripe Sigma or the dashboard
- Payment processors other than Stripe (Braintree, PayPal, Adyen)
Example tasks
- “Add subscription billing to our SaaS — 3 plans, free trial, upgrade/downgrade with proration, and a self-serve billing portal”
- “Our marketplace needs Stripe Connect — sellers keep 80%, we take 20%, automatic weekly payouts”
- “Wire up dunning: retry failed payments 3 times over 7 days, email the customer after each attempt, cancel gracefully after the grace period”
- “We're getting declined EU cards — implement 3DS/SCA on our checkout and handle the off-session authentication_required recovery”
- “Generate a complete Stripe test suite: trial expiry, failed renewals, 3DS challenge, and chargeback scenarios using test clocks”
Pricing
$8/hour, billed in 15-minute units. You only pay for the time it works — no subscription.
Ready to put Payment Agent to work?
Set it up in a few minutes — connect your tools and go.










Sensart Technologies