PHPackages                             laulamanapps/ecurring-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. laulamanapps/ecurring-api

ActiveLibrary[API Development](/categories/api)

laulamanapps/ecurring-api
=========================

PHP eCurring API client

1101[1 issues](https://github.com/LauLamanApps/ecurring-api/issues)[1 PRs](https://github.com/LauLamanApps/ecurring-api/pulls)PHP

Since Oct 25Pushed 6y agoCompare

[ Source](https://github.com/LauLamanApps/ecurring-api)[ Packagist](https://packagist.org/packages/laulamanapps/ecurring-api)[ RSS](/packages/laulamanapps-ecurring-api/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

eCurring Api
============

[](#ecurring-api)

This package provides a simple integration of the [Official eCurring](https://developers.nest.com/documentation) for your PHP project.

[![Build Status](https://camo.githubusercontent.com/ec3e8835184fb753bb0b4707f6c38f3860643a14e3905e3e08aabe71ce314e8b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c61754c616d616e417070732f6563757272696e672d6170692f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/LauLamanApps/ecurring-api/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0962c70286ab4da5fab2640b3d067c59ed25a071503b8a3cbe7365535085ef69/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c61754c616d616e417070732f6563757272696e672d6170692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/LauLamanApps/ecurring-api/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/0f111b9680915b6a3e41f2f6608ca9db58a6d26b5a0182299492014da7559eae/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c61754c616d616e417070732f6563757272696e672d6170692f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/LauLamanApps/ecurring-api/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/17a0174c144ae84b3ac8d58ab4252ab7160d43aa7291d5467261b1ee44ddcb0f/68747470733a2f2f706f7365722e707567782e6f72672f6c61756c616d616e617070732f6563757272696e672d6170692f762f737461626c65)](https://packagist.org/packages/laulamanapps/ecurring-api)[![License](https://camo.githubusercontent.com/d4f5f3375677a2d754a48c7fcb613c2797d7dbe6fb1db81d3a2ffd29db52d3ff/68747470733a2f2f706f7365722e707567782e6f72672f6c61756c616d616e617070732f6563757272696e672d6170692f6c6963656e7365)](https://packagist.org/packages/laulamanapps/ecurring-api)

Installation
------------

[](#installation)

With [composer](http://packagist.org), add:

```
$ composer require laulamanapps/ecurring-api
```

This package has been created with flexability in mind, you can simply create your own http adapter by implementing the `LauLamanApps\eCurring\Http\ClientInterface`

Don't wanna do the hassle? make use of the provided Guzzle adapter: require guzzlehttp in your composer:

```
$ composer require guzzlehttp/guzzle
```

Get Access Token
----------------

[](#get-access-token)

[Sign up](https://app.ecurring.com/merchants/signup) at eCurring and get yourself an api key

Usage
-----

[](#usage)

#### Create new Customer

[](#create-new-customer)

```
use LauLamanApps\eCurring\eCurringClientFactory;
use LauLamanApps\eCurring\Resource\Customer;
use LauLamanApps\eCurring\Resource\Transaction\PaymentMethod;

$client = eCurringClientFactory::create('');

$customer = Customer::new(
    'Luke',
    'Skywalker',
    PaymentMethod::directDebit(),
    'L Skywalker',
    'NL17ABNA1171403585'
);

$customer = $client->createCustomer($customer);
```

#### Add Customer to subscription

[](#add-customer-to-subscription)

```
use LauLamanApps\eCurring\eCurringClientFactory;
use LauLamanApps\eCurring\Resource\Subscription;
use LauLamanApps\eCurring\Resource\Subscription\Mandate;

$client = eCurringClientFactory::create('');

$customer = $client->getCustomer(1);
$subscriptionPlan = $client->getSubscriptionPlan(2);

/**
 * Mandate is Optional, if you dont provide it eCurring wil create a
 * mandate for you and the customer can accept the mandate via eCurring
 * see https://docs.ecurring.com/subscriptions/create
 */
$mandate = new Mandate(
    'MDT-000001',
    true,
    new DateTimeImmutable('2018-10-16')
);

$subscription = Subscription::new(
    $customer,
    $subscriptionPlan,
    $mandate
);

$subscription = $client->createSubscription($subscription);
```

#### Create Payment for subscription

[](#create-payment-for-subscription)

```
use LauLamanApps\eCurring\eCurringClientFactory;
use LauLamanApps\eCurring\Resource\Transaction;
use Money\Money;

$client = eCurringClientFactory::create('');

$subscription = $client->getSubscription(1);

$transaction = Transaction::new(
    $subscription,
    Money::EUR(1000),
    new DateTimeImmutable('2018-11-20')
);

$transaction = $client->createTransaction($transaction);
```

#### List Customers and iterate over them

[](#list-customers-and-iterate-over-them)

```
use LauLamanApps\eCurring\eCurringClientFactory;
use LauLamanApps\eCurring\Resource\Curser\Pagination;

$client = eCurringClientFactory::create('');

$pagination =  new Pagination(2); //-- [optional] Lets start pagination on page 2
$customers = $client->getCustomers($pagination);

$customers->disableAutoload(); //-- just iterate over one page

foreach ($customers as $customer) {
    // Do something with the customer
}
```

Tests
-----

[](#tests)

This package comes with 2 types of tests: Unit and Integration. To run them you can use the make commands in the projects root.

```
$ make tests-unit
$ make tests-integration
```

Author
------

[](#author)

eCurring API has been developed by [LauLaman](https://github.com/LauLaman).

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/930ca3b1756d00a63c8ff3363e81f16f961cf3ef79ff0c9d362670c36d97e456?d=identicon)[LauLaman](/maintainers/LauLaman)

---

Top Contributors

[![LauLaman](https://avatars.githubusercontent.com/u/8283992?v=4)](https://github.com/LauLaman "LauLaman (9 commits)")

### Embed Badge

![Health badge](/badges/laulamanapps-ecurring-api/health.svg)

```
[![Health](https://phpackages.com/badges/laulamanapps-ecurring-api/health.svg)](https://phpackages.com/packages/laulamanapps-ecurring-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
