PHPackages                             krve/epay - 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. krve/epay

AbandonedArchivedLibrary

krve/epay
=========

Epay PHP Libary

v1.1.1(9y ago)01.4kMITPHPPHP &gt;=5.6.3

Since Oct 6Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/krve/epay)[ Packagist](https://packagist.org/packages/krve/epay)[ RSS](/packages/krve-epay/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (4)Used By (0)

[![Build Status](https://camo.githubusercontent.com/91af59f22e654ad8543e9e084916b901e9ccdfb2cadb8fc85b71747629d3888d/68747470733a2f2f7472617669732d63692e6f72672f6b7276652f657061792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/krve/epay)[![StyleCI](https://camo.githubusercontent.com/79978b59cbc9e002fa65807fbaab22c7ad0bd86b136936779d575ee780011857/68747470733a2f2f7374796c6563692e696f2f7265706f732f36393837383731392f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/69878719)[![Latest Stable Version](https://camo.githubusercontent.com/5ecf7e304d2a24c43d94e55b9ef89488eb6bec12deac3ac2739aa3334ce5d6ad/68747470733a2f2f706f7365722e707567782e6f72672f6b7276652f657061792f762f737461626c65)](https://packagist.org/packages/krve/epay)[![Latest Unstable Version](https://camo.githubusercontent.com/04dc15222e8766a903eb7d8c6b161e0c5d076b2a355e171db0e29abb5a30aa50/68747470733a2f2f706f7365722e707567782e6f72672f6b7276652f657061792f762f756e737461626c65)](https://packagist.org/packages/krve/epay)[![License](https://camo.githubusercontent.com/d28362e96e374686cf7971f2560828f46747c3f499fec9088b3fb1967d456d05/68747470733a2f2f706f7365722e707567782e6f72672f6b7276652f657061792f6c6963656e7365)](https://packagist.org/packages/krve/epay)

Epay PHP Libary
---------------

[](#epay-php-libary)

Warning

This is no longer supported

This is a PHP libary for [Epay](http://www.epay.dk/). It mimics the [Stripe PHP Libary](https://github.com/stripe/stripe-php) to allow for a cleaner and easier to use API.

Install the package by doing: `composer require krve/epay`

**Work in progress**

Current Todo
------------

[](#current-todo)

- Better test coverage
- Better Epay API Coverage
- Rewrite base API Class

Documentation
-------------

[](#documentation)

You will probably notice that in the documentation there is several references to `$customer_id`. Customer ID references the subscriptionid you get back after having used the Epay Payment window. Don't worry about the mismatch in naming, it's simply called `$customer_id` so it fits the class Epay/Customer.

To set the your Merchant ID, Epay Webservice password and default currency make use of Epay/Epay. **This needs to be done BEFORE making any calls to the api**

```
Epay::setMerchantNumber($merchant_number);
Epay::setPassword('secret');
Epay::useCurrency('EUR', 978)
```

#### Epay/Customer

[](#epaycustomer)

You can both retrieve and delete a Customer using the API. See examples below.

```
$customer = Customer::retrieve($customer_id);
```

```
$customer = Customer::retrieve($customer_id);
$customer->delete();
```

You can also get the customers subscriptions.

```
$subscriptions = $customer->subscriptions();
```

#### Epay/Charge

[](#epaycharge)

See example below.

```
$charge = Charge::create([
    'amount' => 1000,
    'customer' => $customer_id,
    'order' => uniqid(),
    'description' => 'Charge description'
]);
```

You also have the ability to specify a custom currency.

```
$charge = Charge::create([
    'amount' => 1000,
    'customer' => $customer_id,
    'order' => uniqid(),
    'description' => 'Charge description',
    'currency' => 840,
]);
```

#### Epay/Plan

[](#epayplan)

For the moment you can only create a very basic plan using the API. If you want more options (You probably do) make use of Epays Plan manager.

```
$plan = Plan::create([
    'amount' => 2000,
    'interval' => 'yearly',
    'name' => 'Test Plan',
]);
```

You can also use the Epay\\Plan to fetch the plans subscriptions.

```
$subscriptions = $plan->subscriptions();
```

#### Epay/Subscription

[](#epaysubscription)

You can create a subscription to a plan by doing the following:

```
$subscription = Subscription::create([
    'customer' => $customer_id,
    'plan' => $plan_id,
    'email' => 'test@email.com'
]);
```

This signs up the user to the plan. You also have the ability to retrieve and cancel a subscription

```
$subscription = Subscription::retrieve($subscription_id);
$subscription->cancel();
```

And fetch all subscriptions

```
$subscriptions = Subscription::all();
```

When you have a subscription you also have the ability to fetch the subscriptions customer. This will return a Epay\\Customer instance.

```
$customer = $subscription->customer();
```

And the plan. This will return a Epay\\Plan instance.

```
$plan = $subscription->plan();
```

Testing
-------

[](#testing)

Copy the .env.example to .env and fill out the values. Then run `phpunit`

Contributing
------------

[](#contributing)

If you see anything you think could be improved, feel free to fork and create a PR with your changes. Just remember to keep the same code style. (PSR-2)

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance45

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~7 days

Total

3

Last Release

3496d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/282614fe65a79cb27ea6a61e5e07342b945ce362f4168b80fb0a106e683bfad6?d=identicon)[krve](/maintainers/krve)

---

Top Contributors

[![krve](https://avatars.githubusercontent.com/u/5139119?v=4)](https://github.com/krve "krve (27 commits)")

---

Tags

epayepay-php-libaryphpphp-library

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/krve-epay/health.svg)

```
[![Health](https://phpackages.com/badges/krve-epay/health.svg)](https://phpackages.com/packages/krve-epay)
```

PHPackages © 2026

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