What is Bridge Payments? β
Bridge Payments is a universal payment processing backend built on the Pubflow platform. It provides a unified API for accepting payments through multiple providers while seamlessly integrating with Flowless authentication.
Universal Payment System
Bridge Payments is designed as an extensible, universal payment system. Currently supporting Stripe, PayPal, and Authorize.net, with the ability to add more payment providers on request. Need Square, Braintree, Adyen, or another provider? Learn how to request β
π― Overview β
Bridge Payments is designed to be the payment layer for your Pubflow application. It handles:
- Payment Processing: One-time payments, subscriptions, and refunds
- Payment Methods: Secure storage and management of payment information
- Customer Management: Authenticated users and guest checkout
- Webhooks: Real-time event processing and external notifications
- Multi-Provider: Universal system supporting Stripe, PayPal, Authorize.net, and more on request
ποΈ Architecture β
Bridge Payments follows the Pubflow 3-layer architecture:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Your Application β
β (React, Next.js, React Native) β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββ Authentication βββββββββββββββββ
β β
ββββββΌβββββββββ βββββββΌβββββββ
β Flowless β β Bridge β
β (Auth) βββββValidationββββββΊβ Payments β
βββββββββββββββ βββββββ¬βββββββ
β
ββββββββββββββββββββββββββββββββββββββ€
β β β
ββββββΌββββββ ββββββΌββββββ βββββββΌβββββββ
β Stripe β β PayPal β βAuthorize.netβ
ββββββββββββ ββββββββββββ ββββββββββββββKey Components β
- Flowless Integration: Validates user sessions and provides authentication
- Payment Providers: Stripe, PayPal, and Authorize.net adapters
- Database Layer: Multi-database support with Kysely ORM
- Webhook System: Provider webhooks and external webhook notifications
β¨ Key Features β
π³ Multi-Provider Support β
- Stripe: Credit cards, Apple Pay, Google Pay, 3D Secure
- PayPal: PayPal accounts, Venmo, credit cards
- Authorize.net: Credit cards and bank accounts
π Security First β
- PCI Compliant: Token-based payments, never store raw card data
- Session Validation: Automatic authentication with Flowless
- Client Secret Management: Automatic cleanup of sensitive data
- Rate Limiting: Built-in protection against abuse
π€ Flexible Customer Management β
- Authenticated Users: Full integration with Flowless user accounts
- Guest Checkout: Accept payments without requiring registration
- Organizations: Multi-tenant support for business accounts
π Subscription Management β
- Recurring Billing: Automatic billing with retry logic
- Trial Periods: Flexible trial configurations
- Billing Intervals: Daily, weekly, monthly, yearly
- Cancellation: Cancel at period end or immediately
πΎ Payment Method Storage β
- Secure Tokenization: Never handle raw card data
- Default Methods: Set preferred payment methods
- Duplicate Detection: Automatic duplicate prevention
- Billing Addresses: Link payment methods to addresses
π Webhook System β
- Provider Webhooks: Automatic event processing from Stripe, PayPal
- External Webhooks: Send events to Discord, Slack, custom endpoints
- Signature Validation: Secure webhook verification
- Retry Logic: Automatic retries for failed deliveries
π How It Works β
1. Create Instance β
Create your Bridge Payments instance from the Pubflow Platform dashboard at pubflow.com.
2. Configure Providers β
Enable and configure payment providers (Stripe, PayPal, Authorize.net) directly from the Pubflow dashboard.
3. Integrate β
Use the REST API or official client libraries to integrate payments into your application.
4. Accept Payments β
Start accepting payments from authenticated users or guests with a unified API.
π― Use Cases β
E-commerce β
- Product purchases with guest checkout
- Saved payment methods for returning customers
- Order management and refunds
SaaS Applications β
- Subscription billing with automatic renewals
- Trial periods and plan upgrades
- Usage-based billing
Donations & Fundraising β
- One-time donations with guest checkout
- Recurring donations (monthly, yearly)
- Multiple payment methods
Membership Sites β
- Membership subscriptions
- Access control based on payment status
- Automatic renewal reminders
π Integration with Pubflow β
Bridge Payments is designed to work seamlessly with the Pubflow ecosystem:
- Flowless: Automatic session validation and user authentication
- Flowfull: Backend business logic and custom workflows
- Flowfull-Client: Frontend applications (React, Next.js, React Native)
π Technology Stack β
- Runtime: Bun (high-performance JavaScript runtime)
- Framework: Hono (lightweight web framework)
- Database: Kysely ORM (PostgreSQL, MySQL, SQLite, LibSQL, Neon, PlanetScale)
- Validation: Zod (TypeScript-first schema validation)
- Caching: LRU Cache (in-memory caching)
- Payment Providers: Stripe SDK, PayPal SDK, Authorize.net SDK
π Built on Native Payments Standard β
Bridge Payments is based on Native Payments, an open-source payment standard created by Pubflow.
What is Native Payments? β
Native Payments is a comprehensive, open-source standard for building payment systems. It provides:
- Standardized Database Schemas: Consistent data models for payments, subscriptions, customers, and more
- API Design Patterns: Best practices for payment API endpoints and request/response formats
- Provider Integrations: Unified approach to integrating multiple payment providers
- Security Guidelines: PCI compliance, tokenization, and secure data handling
- Webhook Architecture: Event-driven design for real-time payment processing
Why Use a Standard? β
Using the Native Payments standard means:
- β Consistency: Same patterns across different payment implementations
- β Interoperability: Easy migration between payment systems
- β Best Practices: Battle-tested patterns for security and scalability
- β Community: Open-source contributions and improvements
- β Documentation: Comprehensive guides and examples
Learn more: github.com/pubflow/native-payments
π Need Another Payment Provider? β
Bridge Payments is built as a universal payment system with an extensible architecture. While we currently support Stripe, PayPal, and Authorize.net, we can integrate additional payment providers based on demand.
Popular providers available on request:
- Square, Braintree, Adyen, Razorpay, Mercado Pago, 2Checkout, Klarna, Mollie, Checkout.com, Worldpay, and many more...
To request a new provider: Contact us at support@pubflow.com
Learn more about requesting providers β
π Next Steps β
Ready to get started? Check out these resources:
- Getting Started - Set up your first payment
- Core Concepts - Understand key concepts
- API Reference - Explore the API
- Client Libraries - Use official integrations