Skip to main content

Payment Methods Management

The Payment Methods Management submodule handles payment method retrieval and management for project services within the admin projects system.

🎯 Overview

This submodule provides administrative access to client payment methods associated with project subscriptions, enabling payment coordination and billing oversight.

🔧 Service Methods

Core Payment Operations

getPaymentMethods()

Retrieves payment methods associated with project accounts and subscriptions with comprehensive filtering and authorization.

Parameters:

  • accountIds - Array of account identifiers for payment method retrieval
  • dashclicks - User role and permission context for authorization
  • subscriptionIds - Optional subscription-specific filtering
  • activeOnly - Filter for active payment methods only

Key Features:

  • Multi-account Support: Retrieve payment methods across multiple client accounts
  • Subscription Integration: Link payment methods to specific project subscriptions
  • Role-based Access: Granular permission checking based on user roles
  • Active Status Filtering: Focus on currently valid and active payment methods

Response Structure:

  • Payment method details including type, status, and metadata
  • Account association and subscription linkage information
  • Billing history and usage tracking
  • Security-filtered sensitive payment information

🔐 Authorization Framework

Role Requirements

Payment method access requires appropriate PROJECT_ROLES permissions:

  • Admin: Full payment method visibility across all accounts
  • Account Manager: Account-specific payment method access
  • Billing Specialist: Payment-focused administrative access
  • Team Lead: Team-assigned account payment information

Permission Validation

  • Account Access: Validates user access to specific client accounts
  • Payment Data Access: Ensures proper authorization for sensitive payment information
  • Subscription Association: Validates access to subscription-linked payment methods
  • Data Filtering: Role-based filtering of payment method details

🏗️ Technical Architecture

Database Integration

  • Payment Method Storage: Secure storage of payment method metadata
  • Account Association: Links payment methods to client accounts
  • Subscription Integration: Associates payment methods with project subscriptions
  • Security Layer: Encrypted storage of sensitive payment information

Security Features

  • Data Encryption: Secure storage and transmission of payment information
  • Access Logging: Comprehensive audit trails for payment data access
  • Role Validation: Multi-level authorization checks
  • PCI Compliance: Adherence to payment industry security standards

📊 Data Management

Payment Method Types

The service supports various payment method types:

  • Credit Cards: Visa, MasterCard, American Express, Discover
  • Bank Accounts: ACH and direct bank transfer methods
  • Digital Wallets: PayPal, Apple Pay, Google Pay integration
  • Corporate Accounts: Business payment methods and corporate cards

Data Filtering

  • Active Status: Filter for currently valid payment methods
  • Account-specific: Payment methods associated with specific accounts
  • Subscription-linked: Payment methods tied to active subscriptions
  • Role-based: Data filtering based on user permissions and access levels

🔄 Integration Points

External Systems

  • Payment Processors: Integration with Stripe, PayPal, and other payment gateways
  • Banking Systems: ACH and bank account verification services
  • Security Services: PCI compliance and data encryption services
  • Fraud Detection: Payment fraud monitoring and prevention systems

Internal Services

  • Account Management: Client account association and relationship management
  • Subscription System: Project subscription and billing integration
  • User Management: Role validation and permission checking
  • Activity System: Payment access audit trails and logging

📈 Business Logic

Payment Method Lifecycle

  1. Method Registration: Initial payment method setup and validation
  2. Verification: Payment method verification and security checks
  3. Association: Linking payment methods to accounts and subscriptions
  4. Monitoring: Ongoing status monitoring and validation
  5. Maintenance: Updates, renewals, and method management

Administrative Oversight

  • Payment Health: Monitoring payment method status and validity
  • Account Coordination: Ensuring proper payment method assignment
  • Billing Support: Supporting billing operations with payment data
  • Compliance Monitoring: Ensuring PCI and security compliance

🛡️ Security Features

Data Protection

  • Encryption: End-to-end encryption of sensitive payment data
  • Tokenization: Secure tokenization of payment method information
  • Access Control: Granular role-based access to payment information
  • Audit Logging: Comprehensive logging of all payment data access

Compliance

  • PCI DSS: Payment Card Industry Data Security Standard compliance
  • Data Retention: Secure data retention and disposal policies
  • Access Monitoring: Continuous monitoring of payment data access
  • Security Validation: Regular security audits and compliance checks

📝 Usage Examples

Retrieving Account Payment Methods

const paymentMethods = await getPaymentMethods({
accountIds: ['acc_123', 'acc_456'],
dashclicks: userRoles,
activeOnly: true,
});

Subscription-specific Payment Methods

const subscriptionPayments = await getPaymentMethods({
accountIds: ['acc_123'],
subscriptionIds: ['sub_789'],
dashclicks: userRoles,
});

Admin Payment Overview

const allPaymentMethods = await getPaymentMethods({
accountIds: clientAccountIds,
dashclicks: adminRoles,
includeInactive: false,
});

⚠️ Important Notes

  • Security Critical: Payment method data requires highest security standards
  • PCI Compliance: All operations must maintain PCI DSS compliance
  • Role Dependencies: Access requires appropriate PROJECT_ROLES permissions
  • Audit Requirements: All payment method access generates audit trails
  • Data Sensitivity: Payment information requires special handling and encryption
  • Integration Dependencies: Relies on external payment processor integrations
  • Status Monitoring: Payment method status requires ongoing validation and monitoring
💬

Documentation Assistant

Ask me anything about the docs

Hi! I'm your documentation assistant. Ask me anything about the docs!

I can help you with:
- Code examples
- Configuration details
- Troubleshooting
- Best practices

Try asking: How do I configure the API?
09:31 AM