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
Mollie Api Php

Mollie Api Php Laravel Package

mollie/mollie-api-php

Official Mollie API client for PHP. Create and manage payments, orders, customers, subscriptions, refunds, and settlements. Supports iDEAL, card, PayPal, Apple Pay, Google Pay, Bancontact, SEPA and more. Includes webhooks and OAuth support.

View on GitHub
Deep Wiki
Context7

Mollie API client for PHP

Frequently asked questions about Mollie Api Php
How do I install the Mollie API package in Laravel?
Use Composer to install the package with `composer require mollie/mollie-api-php`. Then, configure the API key in your `.env` file under `MOLLIE_API_KEY`. Bind the client in `AppServiceProvider` using `MollieApiClient::create()` for global access.
Which Laravel versions are supported by this package?
The package supports Laravel 8.x and 9.x, as it requires PHP 7.4+. Ensure your Laravel project uses a compatible PHP version (8.0+ recommended) to avoid deprecation issues with cURL or other dependencies.
Can I use Mollie for recurring payments or subscriptions in Laravel?
Yes, Mollie supports subscriptions via the API. Use the `createSubscription` method to set up recurring payments. For Laravel, pair this with Laravel’s scheduler to handle renewals, retries, or cancellations via queued jobs or observers.
How do I handle Mollie webhooks in Laravel securely?
Use Laravel’s middleware to validate Mollie’s webhook signatures (e.g., `ValidateSignature`). Process webhooks asynchronously with Laravel Queues for scalability. The package provides `WebhookEventMapper` to parse payloads like `payment.authorized` or `subscription.cancelled`.
What’s the best way to store Mollie payment data in Laravel?
Store Mollie-specific fields (e.g., `mollie_payment_id`, `status`) in Laravel’s database for reconciliation. Use migrations to add these columns to existing tables. For reporting, create Eloquent models or use Laravel’s query builder to fetch payment data.
Does Mollie support Apple Pay and Google Pay in Laravel?
Yes, Mollie’s package supports Apple Pay and Google Pay. Use the `createPayment` method with the `applePay` or `googlePay` payment method. Ensure your Laravel frontend integrates Mollie’s JavaScript SDK for seamless checkout flows.
How do I mock Mollie API responses for Laravel testing?
Use Mollie’s test mode (enabled via `testMode: true` in the client config) to simulate payments. For unit tests, mock the `MollieApiClient` using Laravel’s `Mockery` or `PHPUnit` to return fake responses without hitting Mollie’s servers.
What are the alternatives to Mollie for Laravel payments?
Alternatives include Stripe (`laravel-cashier`), PayPal (`paypal/checkout-sdk-php`), and Adyen (`adyen/adyen-php-api-library`). Mollie stands out for its European focus, local payment methods (e.g., iDEAL, SEPA), and transparent pricing with no monthly fees.
How do I handle failed payments or retries in Laravel?
Mollie returns `pending` or `failed` statuses for payments. Use Laravel’s observers or queued jobs to retry failed payments. For subscriptions, implement a cron job to check for failed renewals and trigger retries via Mollie’s `updateSubscription` method.
Can I use Mollie with Laravel Cashier for subscriptions?
No, Mollie’s package is independent of Laravel Cashier. However, you can replicate Cashier’s subscription logic using Mollie’s API directly. For example, create a service to handle subscription lifecycle events (creation, cancellation) via Mollie’s API and Laravel’s queues.
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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity