azaharizaman/nexus-payment-recurring

Payment recurring extension providing subscription billing, usage-based billing, and recurring payment management

Maintainers

Package info

github.com/azaharizaman/nexus-payment-recurring

pkg:composer/azaharizaman/nexus-payment-recurring

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0-alpha1 2026-05-05 02:28 UTC

This package is auto-updated.

Last update: 2026-05-05 03:04:21 UTC


README

Version: 0.1.0
Status: In Development
PHP: ^8.3
Extends: azaharizaman/nexus-payment

Overview

Nexus\PaymentRecurring is an extension package for Nexus\Payment providing subscription billing, usage-based billing, and recurring payment management. It supports payment schedules, billing cycles, proration, and dunning management.

Installation

composer require azaharizaman/nexus-payment-recurring

Features

  • Subscription Billing - Fixed, tiered, and per-seat pricing
  • Usage-Based Billing - Metered billing with thresholds
  • Payment Schedules - Weekly, monthly, quarterly, annual
  • Proration - Mid-cycle upgrades/downgrades
  • Dunning Management - Retry logic for failed payments
  • Trial Periods - Free trial with auto-conversion

Quick Start

use Nexus\PaymentRecurring\Contracts\SubscriptionManagerInterface;

final readonly class BillingService
{
    public function __construct(
        private SubscriptionManagerInterface $subscriptionManager,
    ) {}

    public function createSubscription(CreateSubscriptionRequest $request): Subscription
    {
        return $this->subscriptionManager->create($request);
    }

    public function processRenewals(): RenewalResult
    {
        return $this->subscriptionManager->processRenewals();
    }
}

Billing Models

Model Description Use Case
Fixed Same amount each period SaaS plans
Tiered Volume-based pricing API calls
Per-Seat Per user/license Enterprise software
Usage Metered consumption Utilities, Cloud

Documentation

License

MIT License. See LICENSE for details.