Stripe Integration

Payment processing with Stripe for subscriptions and one-time payments.

APIsGitHub

Overview

The Stripe Integration qBit provides full-featured payment processing for qqq applications. Built on Stripe's latest API, this qBit handles the complexity of payment processing so you can focus on your business logic.

Why We Built This

Payment integration is one of the most critical—and error-prone—parts of any application. We've spent years refining this qBit to handle edge cases that most developers don't think about until they're losing money: failed webhook deliveries, currency conversion issues, subscription proration bugs, and PCI compliance headaches.

This qBit abstracts away all of that complexity while still giving you full control when you need it.

Core Capabilities

  • Subscriptions - Recurring billing with metered and licensed models, automatic proration, trial periods, and grace periods for failed payments
  • One-Time Payments - Checkout sessions and payment intents with support for 135+ currencies and dozens of payment methods
  • Invoicing - Automatic invoice generation, PDF delivery, and payment reminders with customizable templates
  • Customer Portal - Self-service subscription management so your users can update payment methods and view billing history
  • Webhooks - Real-time event processing with automatic retry, signature verification, and idempotency handling
  • Architecture

    The qBit follows qqq's standard patterns: it provides MetaData producers for Stripe-related tables (Customers, Subscriptions, Invoices, PaymentMethods), processes for common workflows (CreateSubscription, CancelSubscription, RefundPayment), and a webhook handler that automatically routes events to your custom handlers.

    Java
    // Example: Creating a subscription is one line
    Subscription sub = stripeService.createSubscription(customerId, priceId);

    What's New in v4

  • Payment Links - Generate shareable payment URLs without any frontend code
  • Improved webhook reliability - Automatic retries with exponential backoff and dead letter queue
  • Tax calculation - Native Stripe Tax integration for automatic tax calculation
  • Multi-currency checkout - Let customers pay in their preferred currency
  • Expanded payment methods - Support for Klarna, Afterpay, BLIK, and 20+ additional methods
  • Production Ready

    This qBit powers payment processing for dozens of production applications, handling millions in monthly transaction volume. It's been battle-tested with edge cases like timezone-sensitive billing cycles, partial refunds, subscription upgrades mid-cycle, and webhook storms during Stripe outages.

    Installation

    Maven

    XML
    <dependency>
        <groupId>io.qrun</groupId>
        <artifactId>qbit-stripe</artifactId>
        <version>4.0.2</version>
    </dependency>

    Configuration

    YAML
    stripe:
      apiKey: ${STRIPE_API_KEY}
      webhookSecret: ${STRIPE_WEBHOOK_SECRET}
      testMode: false

    Requirements

  • qqq 1.3.0 or higher
  • Java 17+
  • Stripe API version 2023-10-16 or later
  • Powered by qqq