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 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

Build Status Latest Stable Version Total Downloads GitHub Code Style Action Status

Accepting iDEAL, Apple Pay, Google Pay, Creditcard, Bancontact, SOFORT Banking, SEPA Bank transfer, SEPA Direct debit, PayPal, Belfius Direct Net, KBC/CBC, paysafecard, ING Home'Pay, Giropay, EPS, Przelewy24, Postepay, In3, Klarna (Pay now, Pay later, Slice it, Pay in 3), Giftcard and Voucher online payments without fixed monthly costs or any punishing registration procedures. Just use the Mollie API to receive payments directly on your website or easily refund transactions to your customers.

Requirements

To use the Mollie API client, the following things are required:

  • Get yourself a free Mollie account. No sign up costs.
  • Now you're ready to use the Mollie API client in test mode.
  • Follow a few steps to enable payment methods in live mode, and let us handle the rest.
  • PHP >= 7.4
  • cUrl >= 7.19.4
  • Up-to-date OpenSSL (or other SSL/TLS toolkit)

For leveraging Mollie Connect (advanced use cases only), we recommend also installing our OAuth2 client.

Installation

Using Composer

The easiest way to install the Mollie API client is by using Composer. You can require it with the following command:

composer require mollie/mollie-api-php

Usage

Initializing the Mollie API client, and setting your API key.

$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setToken("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");

The setToken method automatically detects whether you're using an API key (test_/live_) or an OAuth access token (access_). You can also use setApiKey() or setAccessToken() directly if you prefer to be explicit.

Find our full documentation online on docs.mollie.com.

Example usage

use Mollie\Api\Http\Data\Money;
use Mollie\Api\Http\Requests\CreatePaymentRequest;

/** @var Mollie\Api\Resources\Payment $payment */
$payment = $mollie->send(new CreatePaymentRequest(
    description: 'My first API payment',
    amount: new Money('EUR', '10.00'),
    redirectUrl: 'https://webshop.example.org/order/12345/',
    webhookUrl: 'https://webshop.example.org/mollie-webhook/'
));

Documentation

For an in-depth understanding of our API, please explore the Mollie Developer Portal. Our API documentation is available in English.

For detailed documentation about using this PHP client, see the following guides:

  • Endpoint Collections - Learn how to interact with all available API endpoints.
  • HTTP Adapters - Information on customizing HTTP communication.
  • Idempotency - Best practices and setup for idempotent requests.
  • Payments - Comprehensive guide on handling payments.
  • Requests - Overview and usage of request objects in the API client.
  • Responses - Handling and understanding responses from the API.
  • Testing - Guidelines for testing with the Mollie API client.
  • Debugging - How to debug API requests and responses safely.
  • Webhooks - How to process Webhook requests

These guides provide in-depth explanations and examples for advanced usage of the client.

Recipes

The Mollie API client comes with a variety of recipes to help you understand how to implement various API features. These recipes are a great resource for learning how to integrate Mollie payments into your application.

Here are some of the key recipes included:

For a full list of recipes, please refer to the recipes directory.

These recipes are designed to help you integrate Mollie into your application. Make sure to use your test API keys when testing the integration.

Upgrading

Please see UPGRADING for details.

Contributing to Our API Client

Would you like to contribute to improving our API client? We welcome pull requests. But, if you're interested in contributing to a technology-focused organization, Mollie is actively recruiting developers and system engineers. Discover our current job openings or reach out.

License

BSD (Berkeley Software Distribution) License. Copyright (c) 2013-2018, Mollie B.V.

Support

Contact: www.mollie.cominfo@mollie.com — +31 20 820 20 70

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
codifyo/ts-generator-bundle
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
christhompsontldr/laravel-inky
spatie/mailcoach-vapor