PHPackages                             romansh/omnipay-creem - 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. [Payment Processing](/categories/payments)
4. /
5. romansh/omnipay-creem

ActiveLibrary[Payment Processing](/categories/payments)

romansh/omnipay-creem
=====================

Creem driver for Omnipay payment processing library

v1.0.1(2mo ago)16MITPHPPHP ^7.4 || ^8.0

Since Dec 25Pushed 2mo agoCompare

[ Source](https://github.com/romansh/omnipay-creem)[ Packagist](https://packagist.org/packages/romansh/omnipay-creem)[ Docs](https://github.com/romansh/omnipay-creem)[ RSS](/packages/romansh-omnipay-creem/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

Omnipay-Creem
=============

[](#omnipay-creem)

[Creem.io](https://creem.io/) gateway driver for the [Omnipay](https://omnipay.thephpleague.com/) payment processing library.

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

[](#installation)

```
composer require romansh/omnipay-creem
```

Features
--------

[](#features)

- **Hosted Checkout** — redirect customers to Creem-hosted payment page
- **Webhook verification** — HMAC SHA-256 signature validation
- **Customer Portal** — generate self-service billing URLs
- **Subscription lifecycle** — handle active, trialing, canceled, expired, and renewed events

Gateway Parameters
------------------

[](#gateway-parameters)

ParameterDescriptionDefault`apiKey`Your Creem API key`''``testMode`Enable sandbox/test mode`true``webhookSecret`Secret for verifying webhook signatures`''``productId`Default Creem Product ID`''`Usage
-----

[](#usage)

### Initialize the gateway

[](#initialize-the-gateway)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Creem');
$gateway->setApiKey('your_api_key');
$gateway->setTestMode(true);
```

### Create a checkout (purchase)

[](#create-a-checkout-purchase)

```
$response = $gateway->purchase([
    'productId'     => 'prod_xxxxxxxxx',   // Creem product ID
    'transactionId' => 'ORDER-12345',       // your unique order/request ID
    'returnUrl'     => 'https://your-site.com/return',
    'card' => [
        'email' => 'customer@example.com',
        'name'  => 'John Doe',
    ],
    'description' => 'Premium plan',
])->send();

if ($response->isRedirect()) {
    $response->redirect(); // send the customer to Creem checkout

    // — or get the URL to use in your own redirect / JS —
    // $checkoutUrl = $response->getRedirectUrl();
    // $checkoutId  = $response->getTransactionReference();
} else {
    echo 'Error: ' . $response->getMessage();
}
```

### Handle a webhook (completePurchase)

[](#handle-a-webhook-completepurchase)

`completePurchase()` reads the incoming HTTP request body and validates the `creem-signature` header automatically — no parameters are needed.

```
$gateway->setWebhookSecret('your_webhook_secret');

$response = $gateway->completePurchase()->send();

switch ($response->getEventType()) {
    case 'checkout.completed':
        $orderId  = $response->getTransactionId();   // your request_id
        $customer = $response->getCustomer();         // ['id' => …, 'email' => …]
        $product  = $response->getProduct();          // ['id' => …, 'name' => …]
        // mark order as paid …
        break;

    case 'subscription.active':
    case 'subscription.renewed':
        // grant / extend access
        break;

    case 'subscription.trialing':
        // grant trial access
        break;

    case 'subscription.canceled':
    case 'subscription.expired':
        // revoke access
        break;

    case 'refund.created':
        // process refund
        break;
}

http_response_code(200);
echo json_encode(['status' => 'ok']);
```

### Customer Portal

[](#customer-portal)

```
$response = $gateway->customerPortal([
    'customerId' => 'cust_xxxxxxxxx',
])->send();

if ($response->isSuccessful()) {
    $portalUrl = $response->getPortalUrl();
    header("Location: {$portalUrl}");
}
```

Full examples
-------------

[](#full-examples)

See [examples/usage.php](examples/usage.php) for a complete standalone script and a Laravel controller example.

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance85

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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 ~32 days

Total

3

Last Release

75d ago

Major Versions

v0.9.9 → v1.0.02026-02-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/b453f266005966bf6243a4834c93882f8c2de3e66194f8d086dc7484db29e7cb?d=identicon)[romansh](/maintainers/romansh)

---

Top Contributors

[![romansh](https://avatars.githubusercontent.com/u/10420314?v=4)](https://github.com/romansh "romansh (19 commits)")

---

Tags

paymentgatewaypaymerchantomnipaypurchasesaascreem

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/romansh-omnipay-creem/health.svg)

```
[![Health](https://phpackages.com/badges/romansh-omnipay-creem/health.svg)](https://phpackages.com/packages/romansh-omnipay-creem)
```

###  Alternatives

[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

587421.0k11](/packages/lokielse-omnipay-alipay)

PHPackages © 2026

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