Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cashier Mollie Laravel Package

laravel/cashier-mollie

Laravel Cashier integration for Mollie payments and subscriptions. This repository has moved to mollie/laravel-cashier-mollie (v1 and v2 continued) and will be closed Feb 1, 2022. Docs: cashiermollie.com.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Pros:

    • Seamlessly integrates with Laravel Cashier, leveraging its existing billing infrastructure (e.g., subscriptions, invoices, webhooks).
    • Mollie’s API alignment with Cashier’s patterns reduces custom integration overhead.
    • Supports recurring payments, one-time charges, and subscription management—core features for SaaS/membership models.
    • MIT license enables easy adoption without legal barriers.
  • Cons:

    • Archived Status: The original laravel/cashier-mollie is deprecated; migration to mollie/laravel-cashier-mollie (v2) is mandatory. This introduces technical debt if not addressed immediately.
    • Lack of Actively Maintained Dependents: No dependents suggest niche adoption; may lack community-driven fixes or updates.
    • PHP/Laravel Version Lock: Last release (2021) may not support newer Laravel (10.x) or PHP (8.2+) features without backporting or forks.

Integration Feasibility

  • High for Greenfield Projects: Ideal if starting fresh with Laravel 8/9 and Mollie as the sole payment provider.
  • Moderate for Existing Systems:
    • Requires alignment with Cashier’s subscription model (e.g., User model must extend Billable).
    • Webhook handling (e.g., mollie.webhook-cashier) must be configured for real-time updates (e.g., failed payments, cancellations).
    • Custom logic may be needed for Mollie-specific features (e.g., split payments, mandates for SEPA Direct Debit).
  • API Dependencies:
    • Mollie’s API changes post-2021 may break compatibility without updates.
    • Rate limits, retry logic, and idempotency must be handled (Cashier provides abstractions but may need tuning).

Technical Risk

  • Critical:
    • Deprecation Risk: Migration to mollie/laravel-cashier-mollie (v2) is non-trivial; breaking changes may exist (e.g., webhook payloads, method signatures).
    • Security: No recent releases → potential unpatched vulnerabilities in underlying dependencies (e.g., Guzzle HTTP client).
    • Testing: Lack of active maintenance means limited QA for edge cases (e.g., refunds, prorations).
  • Mitigable:
    • Fallback Mechanisms: Implement circuit breakers for Mollie API failures (e.g., queue failed payments for manual review).
    • Feature Gaps: Use Mollie’s native PHP SDK for unsupported features (e.g., payouts, multi-currency).
    • Monitoring: Log all Mollie API calls/responses to detect drift from documented behavior.

Key Questions

  1. Migration Path:
    • What’s the effort to upgrade from laravel/cashier-mollie (v1) to mollie/laravel-cashier-mollie (v2)? Are there migration tools or docs?
    • How will webhook signatures/validation change between versions?
  2. Compatibility:
    • Does the package support Laravel 10.x/PHP 8.2+? If not, what’s the backporting effort?
    • Are there conflicts with other Cashier drivers (e.g., Stripe) in the same project?
  3. Feature Parity:
    • Does v2 support all v1 features (e.g., subscription trials, dunning management)?
    • How are Mollie-specific features (e.g., "Issuer ID" for SEPA) exposed?
  4. Support:
    • Who maintains the package now? Mollie’s official repo or community?
    • Are there SLAs for critical issues (e.g., payment failures during peak loads)?
  5. Cost/Compliance:
    • Does Mollie’s pricing model (e.g., per-transaction fees) align with business needs?
    • Are there regional compliance requirements (e.g., PSD2 SCA for EU)?

Integration Approach

Stack Fit

  • Ideal For:
    • Laravel-based SaaS platforms with subscription models (e.g., B2B, B2C, or hybrid).
    • Projects already using Laravel Cashier (minimal additional setup).
    • Teams comfortable with PHP and Mollie’s API (low-code customization needed).
  • Less Suitable For:
    • Polyglot stacks (e.g., Node.js backend) or non-Laravel PHP frameworks.
    • Projects requiring multi-provider support (e.g., Stripe + PayPal) without abstraction layers.

Migration Path

  1. Assessment Phase:
    • Audit current billing flow (e.g., Stripe/Cashier usage) to identify gaps/dependencies.
    • Verify Mollie API access (test mode/live keys, webhook endpoints).
  2. Dependency Upgrade:
    • Replace laravel/cashier-mollie with mollie/laravel-cashier-mollie (v2).
    • Update composer.json and run composer update.
  3. Configuration:
    • Publish and configure Cashier’s Mollie config (config/cashier.php).
    • Set up Mollie webhook endpoint (e.g., /mollie/webhook-cashier) with HTTPS.
  4. Data Migration (if applicable):
    • Migrate existing subscriptions/invoices from old provider to Mollie (use Cashier’s Subscription::create() or Mollie’s API).
    • Handle legacy payment data (e.g., store Mollie id alongside old provider’s id temporarily).
  5. Testing:
    • Unit Tests: Mock Mollie API responses to test Cashier’s subscription logic.
    • Integration Tests: Use Mollie’s test mode to simulate payments, refunds, and cancellations.
    • Webhook Validation: Test all Mollie event types (e.g., payment.authorized, subscription.cancelled).
  6. Rollout:
    • Feature flag Mollie for a subset of users (canary release).
    • Monitor for failures (e.g., Mollie\Api\Exceptions\ApiException).

Compatibility

  • Laravel Versions:
    • Target Laravel 8/9 for v2; Laravel 10 may require manual patches or waiting for updates.
  • PHP Extensions:
    • Requires php-curl and php-openssl for API calls.
  • Database:
    • No schema changes needed if using Cashier’s default tables (subscriptions, invoices).
    • Custom tables may be needed for Mollie-specific fields (e.g., mandate_id for SEPA).
  • Third-Party Services:
    • Conflicts unlikely unless using another Cashier driver (e.g., Stripe). Use separate Billable models if needed.

Sequencing

  1. Phase 1: Replace package + configure basic subscriptions.
  2. Phase 2: Implement webhooks and retry logic for failed payments.
  3. Phase 3: Add Mollie-specific features (e.g., mandates, split payments).
  4. Phase 4: Deprecate old payment provider (if applicable) and clean up legacy data.

Operational Impact

Maintenance

  • Proactive Tasks:
    • Monitoring: Track Mollie API uptime (e.g., via Laravel Horizon or external tools like Pingdom).
    • Logging: Log all Mollie API interactions (request/response) for debugging.
    • Backups: Ensure subscription data is backed up before migrations.
  • Reactive Tasks:
    • Webhook Failures: Implement dead-letter queues for unprocessed webhook events.
    • Rate Limits: Handle 429 Too Many Requests via exponential backoff (Cashier may need customization).
    • Schema Updates: Mollie’s API changes may require Cashier updates (follow mollie/laravel-cashier-mollie releases).

Support

  • Internal:
    • Train devs on Mollie’s API (e.g., testing payments, refunds, and disputes).
    • Document common issues (e.g., "Payment failed due to insufficient funds").
  • External:
    • Provide user-facing docs for Mollie-specific flows (e.g., "How to update payment methods").
    • Set up Mollie’s customer support channels for merchant disputes.
  • Escalation Path:
    • Direct issues to Mollie’s support if related to API limits or fraud (use security@mollie.com for security issues).

Scaling

  • Performance:
    • API Calls: Batch webhook processing to avoid rate limits (e.g., use Laravel queues).
    • Database: Index subscriptions.user_id and invoices.subscription_id for large user bases.
    • Caching: Cache subscription plans (if static) to reduce API calls.
  • Load Testing:
    • Simulate high concurrency for subscription creation/cancellation.
    • Test webhook processing under load (e.g., 1000 events/minute).
  • Horizontal Scaling:
    • Stateless design (Cashier is stateless; Mollie API is external).
    • Use Laravel Forge/Vapor for auto-scaling if needed.

Failure Modes

| Failure Scenario | Impact | Mitigation | |-------------------------------------|-------------------------------------

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport