GoHighLevel Marketplace

Custom Payment Provider

Stripe Connect-powered payment processing for GoHighLevel. One-time payments, subscriptions, saved cards, and automatic platform fees.

Architecture

OAuth 2.0

Authorization code flow with auto token refresh. Encrypted token storage (AES-256-GCM).

Payment Iframe

Stripe Elements checkout embedded via postMessage protocol. Supports payment and card-on-file setup modes.

queryUrl Endpoint

Handles verify, refund, list payment methods, charge off-session, create subscription, cancel subscription.

Webhook Bridge

Bidirectional: GHL install/uninstall events + Stripe payment events forwarded to GHL.

Stripe Connect

Direct charges with platform fee. Each GHL location maps to a connected Express account.

Multi-tenant

PostgreSQL database with location-to-account mapping. Isolated payment processing per merchant.

Tech Stack

Next.js 14TypeScriptStripe ConnectPostgreSQLPrismaRedisNginxPM2

Endpoints

GET/api/auth/callback- OAuth code exchange
POST/api/query- queryUrl (verify, refund, charge, subscribe)
POST/api/webhooks/ghl- Install/Uninstall events
POST/api/webhooks/stripe- Payment events
POST/api/stripe/payment-intent- Create PaymentIntent
POST/api/stripe/setup-intent- Create SetupIntent
POST/api/stripe/connect- Create connected account
POST/api/provider/connect- Configure test/live mode
GET/api/health- System health check
GET/api/docs- Swagger UI