Documentation

    Documentation

    Documentation

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    1. /
    2. /Payment Gateway Integration

    Updated Jun 12, 20263 min listen

    1. /
    2. /Payment Gateway Integration

    Updated Jun 12, 20263 min listen

    1. /
    2. /Payment Gateway Integration

    Updated Jun 12, 20263 min listen

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    Database migrations
    First Success Validation
    Troubleshooting
    Next Steps
    Architecture
    Backend modes and databases
    Data Model
    Authentication Architecture
    Email AI-CRM architecture
    PaymentConductor architecture
    Refcodes architecture
    News Kingdom architecture
    Proxy and internationalization
    Real Time
    Discovery Mutation Sync
    Security
    Features
    Doc System
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Web3 Wallet
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payment Integration
    PaymentConductor
    VideoConductor
    WayForPay Payment Integration
    News Module - Digital Newspaper Experience
    Member Blogs
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    CLI
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Database Backend Selection
    Token Economics Setup
    Payment Gateway Integration
    AI Agent Customization
    Reference Ring deployments
    Branding
    Features
    Localization
    Themes
    Components
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Roadmap
    Examples
    Quick Start
    Authentication
    Email AI-CRM developer guide
    API Integration Examples
    Web3 Integration
    White Label
    Real World
    API Examples (cURL)
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    Database migrations
    First Success Validation
    Troubleshooting
    Next Steps
    Architecture
    Backend modes and databases
    Data Model
    Authentication Architecture
    Email AI-CRM architecture
    PaymentConductor architecture
    Refcodes architecture
    News Kingdom architecture
    Proxy and internationalization
    Real Time
    Discovery Mutation Sync
    Security
    Features
    Doc System
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Web3 Wallet
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payment Integration
    PaymentConductor
    VideoConductor
    WayForPay Payment Integration
    News Module - Digital Newspaper Experience
    Member Blogs
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    CLI
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Database Backend Selection
    Token Economics Setup
    Payment Gateway Integration
    AI Agent Customization
    Reference Ring deployments
    Branding
    Features
    Localization
    Themes
    Components
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Roadmap
    Examples
    Quick Start
    Authentication
    Email AI-CRM developer guide
    API Integration Examples
    Web3 Integration
    White Label
    Real World
    API Examples (cURL)
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    Database migrations
    First Success Validation
    Troubleshooting
    Next Steps
    Architecture
    Backend modes and databases
    Data Model
    Authentication Architecture
    Email AI-CRM architecture
    PaymentConductor architecture
    Refcodes architecture
    News Kingdom architecture
    Proxy and internationalization
    Real Time
    Discovery Mutation Sync
    Security
    Features
    Doc System
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Web3 Wallet
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payment Integration
    PaymentConductor
    VideoConductor
    WayForPay Payment Integration
    News Module - Digital Newspaper Experience
    Member Blogs
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    CLI
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Database Backend Selection
    Token Economics Setup
    Payment Gateway Integration
    AI Agent Customization
    Reference Ring deployments
    Branding
    Features
    Localization
    Themes
    Components
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Roadmap
    Examples
    Quick Start
    Authentication
    Email AI-CRM developer guide
    API Integration Examples
    Web3 Integration
    White Label
    Real World
    API Examples (cURL)
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)
    Docs
    Customization
    Docs
    Customization
    Docs
    Customization

    Payment Gateway Integration

    Executive summary

    Ring v1.6.0 routes card and credit flows through PaymentConductor — one ledger (payment_transactions), one webhook dispatcher, config-driven processors. Operators configure env vars and PSP dashboards; developers read PaymentConductor architecture.

    PaymentConductor feature

    Purposes, rails, env overview

    Architecture deep dive

    Handlers, ledger, idempotency, API routes

    Environment block

    Full PAYMENT_* and PSP secrets

    Checkout → webhook → fulfillment

    Payment purposes

    PurposeTypical useHandler
    store_orderMulti-vendor store checkouthandlers/store-order.ts
    membership_upgradeSUBSCRIBER → MEMBERhandlers/membership-upgrade.ts
    news_promotionNews Kingdom paid promotionhandlers/news-promotion.ts
    wallet_topupWallet credit top-upconductor + wallet services

    Processors: WayForPay (default), Stripe, internal credit. PayPal is not in the OSS tree.

    Rails: merchant_redirect · internal_credit (PAYMENT_STORE_ALLOW_CREDIT) · native_token (PAYMENT_STORE_ALLOW_TOKEN=true).

    Apply data/migrations/004_payment_transactions.sql before production payments.

    Environment variables

    Full commented block: Environment — PaymentConductor.

    Webhook endpoints

    Register canonical URLs in your PSP merchant cabinet (replace yourdomain.com):

    ProviderService URL / endpoint
    WayForPayhttps://yourdomain.com/api/payments/wayforpay/webhook
    Stripehttps://yourdomain.com/api/payments/stripe/webhook
    Do not register

    Legacy paths /api/payments/wayforpay/callback, /success, /failure — not implemented in v1.6.

    Deprecated aliases (still work — migrate when convenient):

    • /api/store/payments/wayforpay/webhook
    • /api/news/promotion/wayforpay-webhook

    PSP setup

    Recommended for: Ukraine / Europe — hosted cards, Apple Pay, Google Pay.

    1. 1

      Create a merchant account at wayforpay.com — complete KYC and note merchant account, secret key, approved domain.

    2. 2

      Set Ring env vars:

    3. 3

      In the WayForPay cabinet, set service URL (callback):

    4. 4

      Verify in staging: migration 004 applied → test checkout → confirm payment_transactions row + fulfillment (order paid / role upgraded / promotion active).

    Pre-launch checklist

    1. 1

      Migration 004_payment_transactions.sql applied on production Postgres.

    2. 2

      PAYMENT_* and PSP credentials in secrets manager (never commit .env.local).

    3. 3

      Canonical webhook URLs registered; WAYFORPAY_DOMAIN matches approved merchant domain.

    4. 4

      Staging smoke: store checkout, membership upgrade, news promotion (if used).

    5. 5

      Post go-live: monitor payment_transactions for stuck pending / redirected rows.

    Payments feature

    Membership flow and overview

    Store API

    Checkout and order endpoints

    Migrations

    Apply order including migration 004

    Need hands-on help? Ring customization opportunities

    Payment Gateway Integration

    Executive summary

    Ring v1.6.0 routes card and credit flows through PaymentConductor — one ledger (payment_transactions), one webhook dispatcher, config-driven processors. Operators configure env vars and PSP dashboards; developers read PaymentConductor architecture.

    PaymentConductor feature

    Purposes, rails, env overview

    Architecture deep dive

    Handlers, ledger, idempotency, API routes

    Environment block

    Full PAYMENT_* and PSP secrets

    Checkout → webhook → fulfillment

    Payment purposes

    PurposeTypical useHandler
    store_orderMulti-vendor store checkouthandlers/store-order.ts
    membership_upgradeSUBSCRIBER → MEMBERhandlers/membership-upgrade.ts
    news_promotionNews Kingdom paid promotionhandlers/news-promotion.ts
    wallet_topupWallet credit top-upconductor + wallet services

    Processors: WayForPay (default), Stripe, internal credit. PayPal is not in the OSS tree.

    Rails: merchant_redirect · internal_credit (PAYMENT_STORE_ALLOW_CREDIT) · native_token (PAYMENT_STORE_ALLOW_TOKEN=true).

    Apply data/migrations/004_payment_transactions.sql before production payments.

    Environment variables

    Full commented block: Environment — PaymentConductor.

    Webhook endpoints

    Register canonical URLs in your PSP merchant cabinet (replace yourdomain.com):

    ProviderService URL / endpoint
    WayForPayhttps://yourdomain.com/api/payments/wayforpay/webhook
    Stripehttps://yourdomain.com/api/payments/stripe/webhook
    Do not register

    Legacy paths /api/payments/wayforpay/callback, /success, /failure — not implemented in v1.6.

    Deprecated aliases (still work — migrate when convenient):

    • /api/store/payments/wayforpay/webhook
    • /api/news/promotion/wayforpay-webhook

    PSP setup

    Recommended for: Ukraine / Europe — hosted cards, Apple Pay, Google Pay.

    1. 1

      Create a merchant account at wayforpay.com — complete KYC and note merchant account, secret key, approved domain.

    2. 2

      Set Ring env vars:

    3. 3

      In the WayForPay cabinet, set service URL (callback):

    4. 4

      Verify in staging: migration 004 applied → test checkout → confirm payment_transactions row + fulfillment (order paid / role upgraded / promotion active).

    Pre-launch checklist

    1. 1

      Migration 004_payment_transactions.sql applied on production Postgres.

    2. 2

      PAYMENT_* and PSP credentials in secrets manager (never commit .env.local).

    3. 3

      Canonical webhook URLs registered; WAYFORPAY_DOMAIN matches approved merchant domain.

    4. 4

      Staging smoke: store checkout, membership upgrade, news promotion (if used).

    5. 5

      Post go-live: monitor payment_transactions for stuck pending / redirected rows.

    Payments feature

    Membership flow and overview

    Store API

    Checkout and order endpoints

    Migrations

    Apply order including migration 004

    Need hands-on help? Ring customization opportunities

    Payment Gateway Integration

    Executive summary

    Ring v1.6.0 routes card and credit flows through PaymentConductor — one ledger (payment_transactions), one webhook dispatcher, config-driven processors. Operators configure env vars and PSP dashboards; developers read PaymentConductor architecture.

    PaymentConductor feature

    Purposes, rails, env overview

    Architecture deep dive

    Handlers, ledger, idempotency, API routes

    Environment block

    Full PAYMENT_* and PSP secrets

    Checkout → webhook → fulfillment

    Payment purposes

    PurposeTypical useHandler
    store_orderMulti-vendor store checkouthandlers/store-order.ts
    membership_upgradeSUBSCRIBER → MEMBERhandlers/membership-upgrade.ts
    news_promotionNews Kingdom paid promotionhandlers/news-promotion.ts
    wallet_topupWallet credit top-upconductor + wallet services

    Processors: WayForPay (default), Stripe, internal credit. PayPal is not in the OSS tree.

    Rails: merchant_redirect · internal_credit (PAYMENT_STORE_ALLOW_CREDIT) · native_token (PAYMENT_STORE_ALLOW_TOKEN=true).

    Apply data/migrations/004_payment_transactions.sql before production payments.

    Environment variables

    Full commented block: Environment — PaymentConductor.

    Webhook endpoints

    Register canonical URLs in your PSP merchant cabinet (replace yourdomain.com):

    ProviderService URL / endpoint
    WayForPayhttps://yourdomain.com/api/payments/wayforpay/webhook
    Stripehttps://yourdomain.com/api/payments/stripe/webhook
    Do not register

    Legacy paths /api/payments/wayforpay/callback, /success, /failure — not implemented in v1.6.

    Deprecated aliases (still work — migrate when convenient):

    • /api/store/payments/wayforpay/webhook
    • /api/news/promotion/wayforpay-webhook

    PSP setup

    Recommended for: Ukraine / Europe — hosted cards, Apple Pay, Google Pay.

    1. 1

      Create a merchant account at wayforpay.com — complete KYC and note merchant account, secret key, approved domain.

    2. 2

      Set Ring env vars:

    3. 3

      In the WayForPay cabinet, set service URL (callback):

    4. 4

      Verify in staging: migration 004 applied → test checkout → confirm payment_transactions row + fulfillment (order paid / role upgraded / promotion active).

    Pre-launch checklist

    1. 1

      Migration 004_payment_transactions.sql applied on production Postgres.

    2. 2

      PAYMENT_* and PSP credentials in secrets manager (never commit .env.local).

    3. 3

      Canonical webhook URLs registered; WAYFORPAY_DOMAIN matches approved merchant domain.

    4. 4

      Staging smoke: store checkout, membership upgrade, news promotion (if used).

    5. 5

      Post go-live: monitor payment_transactions for stuck pending / redirected rows.

    Payments feature

    Membership flow and overview

    Store API

    Checkout and order endpoints

    Migrations

    Apply order including migration 004

    Need hands-on help? Ring customization opportunities