PHPackages                             starkpay/omnipay - 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. starkpay/omnipay

ActiveLibrary[Payment Processing](/categories/payments)

starkpay/omnipay
================

Stark driver for the Omnipay payment processing library

v0.0.4(4y ago)16.3k↓33.3%2MITPHP

Since May 2Pushed 4y ago2 watchersCompare

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

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

Omnipay: Stark
==============

[](#omnipay-stark)

**Stark driver for the Omnipay PHP payment library**

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Stark support for Omnipay so you can accept crypto currency payments.

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

[](#installation)

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply require `league/omnipay` and `starkpay/omnipay` with Composer:

```
composer require league/omnipay starkpay/omnipay

```

Basic Usage
-----------

[](#basic-usage)

This package provide Stark Payment Solution.

For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay)repository.

### Basic purchase example

[](#basic-purchase-example)

API key will be available in your Stark Merchant Console. Visit : ()

```
$gateway = \Omnipay\Omnipay::create('Stark');
$gateway->setApiKey('key_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM');

$response = $gateway->purchase(
    [
        "amount" => "10.00",
        "currency" => "EUR",
        "description" => "My first Payment",
        "returnUrl" => "https://webshop.example.org/return-page.php"
    ]
)->send();

// Process response
if ($response->isSuccessful()) {

    // Payment was successful
    print_r($response);

} elseif ($response->isRedirect()) {
    // You can get Transaction id by  $response->getTransactionId();
    // Redirect to offsite payment gateway
    $response->redirect();

} else {

    // Payment failed
    echo $response->getMessage();
}
```

### Purchase example with Customer

[](#purchase-example-with-customer)

```
$gateway = \Omnipay\Omnipay::create('Stark');
$gateway->setApiKey('key_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM');

$response = $gateway->purchase(
    [
        "amount" => "10.00",
        "currency" => "EUR",
        "description" => "My first Payment",
        "returnUrl" => "https://webshop.example.org/return-page.php",
        'metadata' => array(
            'customer' => array(
                'name' => 'Customer Full name',
                'email' => 'customeremail@email.com',
                'verified' => true,
            )
        )
    ]
)->send();

// Process response
if ($response->isSuccessful()) {
    // Payment was successful
    print_r($response);

} elseif ($response->isRedirect()) {
    // You can get Transaction id by  $response->getTransactionId();
    // Redirect to offsite payment gateway
    $response->redirect();

} else {
    // Payment failed
    echo $response->getMessage();
}
```

##### Response Page

[](#response-page)

We will post the transaction `id` &amp; the `status` to your `returnUrl` during purchase. Once the transaction is completed you will get a [webhook](https://en.wikipedia.org/wiki/Webhook) notification which is configured in dashboard.starkpayments.net

Example Return Page : return-page.php

```
echo "Your transaction id is : " . $_POST['id'] ." and status is : ".$_POST['status'];
```

#### Fetch Transaction Details

[](#fetch-transaction-details)

Fetch Transaction details using transaction id

```
$gateway = Omnipay::create('Stark');

$gateway->setApiKey('key_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM');

// Send purchase request
$response = $gateway->fetchTransaction([
    'transactionReference' => '5eb165796a7b7'
])->send();

// Process response
if ($response->isSuccessful()) {
    // Transaction Details
    print_r($response->getMetaData());
    /*
    Sample Response
    Array
    (
        [id] => 5eb165796a7b7
        [amount] => 15.00
        [currency] => USD
        [crypto_amount] => 0.001694
        [crypto] => BTC
        [status] => success
        [customer_name] => John Doe
        [customer_email] => john.doe@mail.com
        [transaction_hash] => 76a3e766bf49b0e36ffcd8636cf546f8a4bf1908e176139fdc42e508ba38a7d7
    )
     */
} else {
    // Get Error Message
    echo $response->getMessage();
}
```

#### Payment Status Details

[](#payment-status-details)

StatusDescriptionprocessingPayment is under processingsuccessSuccessfully verified the crypto paymentfailedPayment failed or Cancelled by the customerSupport
-------

[](#support)

If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which you can subscribe to.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/starkpay/omnipay/issues), or better yet, fork the library and submit a pull request.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

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

Total

4

Last Release

1820d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b7f208e126284fd418bdabc158e3088edee334647480dd02c5412c7b9ba9766?d=identicon)[starkpay](/maintainers/starkpay)

---

Top Contributors

[![starkpay](https://avatars.githubusercontent.com/u/59176791?v=4)](https://github.com/starkpay "starkpay (10 commits)")

---

Tags

omnipaypaymentstarkgatewaybitcoinmerchantomnipaycryptocurrencystarkstarkpayments

### Embed Badge

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

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

###  Alternatives

[omnipay/payflow

Payflow driver for the Omnipay payment processing library

20976.8k3](/packages/omnipay-payflow)[omnipay/payfast

PayFast driver for the Omnipay payment processing library

24626.9k3](/packages/omnipay-payfast)[omnipay/bitpay

BitPay driver for the Omnipay payment processing library

1383.2k1](/packages/omnipay-bitpay)[coingate/omnipay-coingate

CoinGate driver for the Omnipay payment processing library

1037.0k1](/packages/coingate-omnipay-coingate)

PHPackages © 2026

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