PHPackages                             coinpay/laravel-integration - 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. coinpay/laravel-integration

ActiveLibrary[Payment Processing](/categories/payments)

coinpay/laravel-integration
===========================

laravel-integration-package for https://coinpay.finance/en

v0.5.3(7mo ago)051MITPHP

Since May 20Pushed 7mo agoCompare

[ Source](https://github.com/coinpay-finance/laravel-integration-package)[ Packagist](https://packagist.org/packages/coinpay/laravel-integration)[ RSS](/packages/coinpay-laravel-integration/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (16)Used By (0)

CoinPay
=======

[](#coinpay)

Safe, fast and instant payments; Anytime, anywhere with CoinPay.

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

[](#installation)

Install with composer:

```
composer require coinpay/laravel-integration
```

Publish Vendor Files:

```
php artisan vendor:publish --tag=coinpay-config
```

Configuration
-------------

[](#configuration)

After publishing, a configuration file `config/coinpay.php` will be available. You can set your API key and webhook route:

```
return [
     /**
     * Your CoinPay API Key.
     *
     * You should set this value in your `.env` file as `COINPAY_API_KEY`.
     *
     * @var string
     */
    'api_key' => env('COINPAY_API_KEY'),          // Your CoinPay API key

	 /**
     * Webhook Route.
     *
     * This is the URI path where CoinPay will send asynchronous payment
     * notifications (webhooks). You can customize it in your `.env` file
     * as `COINPAY_WEBHOOK_ROUTE`.
     *
     * Example: '/coinpay/webhook'
     *
     * @var string
     */
    'webhook_route' => '/coinpay/webhook',       // The route for receiving webhook callbacks

	    /**
     * Webhook Service.
     *
     * This must implement the `WebhookServiceInterface`. By default, the package
     * provides a basic implementation. You can override it by binding your own
     * class in a ServiceProvider.
     *
     * Example:
     * $this->app->bind(
     *     \Coinpay\Finance\Services\CoinPay\Webhook\WebhookServiceInterface::class,
     *     \App\Services\MyCustomWebhookService::class
     * );
     *
     * @var class-string
     */
    'webhook_service' => \Coinpay\Finance\Services\CoinPay\Webhook\WebhookService::class,

	/**
     * Redirect URL.
     *
     * This is the URL where the user will be redirected after completing
     * the payment process on the CoinPay gateway.
     *
     * You should set this value in your `.env` file as `COINPAY_REDIRECT_URL`.
     *
     * Example: 'https://your-app.com/payment/callback'
     *
     * @var string
     */
    'redirect_url' => env('COINPAY_REDIRECT_URL', 'https://your-website.com/callback'), // Redirect URL after payment
];
```

Add these to your `.env` file:

```
COINPAY_API_KEY=your_api_key_here
COINPAY_REDIRECT_URL=https://your-website.com/callback

```

Usage
-----

[](#usage)

### Creating a Payment

[](#creating-a-payment)

```
use Coinpay\Finance\Services\CoinPayPaymentRequest;
use Coinpay\Finance\Facades\CoinPay;

$paymentRequest = new CoinPayPaymentRequest(
    amount: 100000,                     // Amount in smallest currency unit
    clientRefId: 'INV12345',            // Unique reference ID
    payerIdentity: 'user@example.com',  // Payer identity (email/phone)
    name: 'John Doe',                   // Payer name
    description: 'Invoice Payment',     // Payment description
    nationalCode: '1234567890'          // National code of payer
);

$response = CoinPay::createPayment($paymentRequest);

$url = $response->url;
// Optionally store $response->transactionId in your database
```

### Handling Webhook

[](#handling-webhook)

Extend `WebhookService` to handle webhook callbacks:

```
namespace App\Services;

use App\Models\Payment;
use Coinpay\Finance\Services\CoinPay\Webhook\WebhookServiceInterface;

class MyCustomWebhookService implements WebhookServiceInterface
{
    public function handleWebhook(string $gateway, array $payload): array
    {
        // Save payment data to database
        Payment::create([
            'transaction_id' => $payload['transaction_id'],
            'amount' => $payload['amount'],
            'status' => $payload['status'],
        ]);

        return [
            'is_success' => true,
            'message' => 'Stored successfully',
        ];
    }
}
```

Notes
-----

[](#notes)

- Always use `route('coinpay.webhook')` for the webhook callback URL to respect any custom route defined by the user.
- The `redirect_url` is fetched from the config, so you can change it per environment without editing code.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance63

Regular maintenance activity

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 68% 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 ~12 days

Total

15

Last Release

229d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c39231b2e49bf4990854ffd6aa6e548257fa3e600685241ba51aabb288d28b6d?d=identicon)[samholding.coinpay](/maintainers/samholding.coinpay)

---

Top Contributors

[![khajavii](https://avatars.githubusercontent.com/u/35679286?v=4)](https://github.com/khajavii "khajavii (17 commits)")[![alimoeini308](https://avatars.githubusercontent.com/u/46076850?v=4)](https://github.com/alimoeini308 "alimoeini308 (7 commits)")[![bahramiholding](https://avatars.githubusercontent.com/u/35418407?v=4)](https://github.com/bahramiholding "bahramiholding (1 commits)")

### Embed Badge

![Health badge](/badges/coinpay-laravel-integration/health.svg)

```
[![Health](https://phpackages.com/badges/coinpay-laravel-integration/health.svg)](https://phpackages.com/packages/coinpay-laravel-integration)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.5M9](/packages/chargebee-chargebee-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[imdhemy/google-play-billing

Google Play Billing

491.5M5](/packages/imdhemy-google-play-billing)

PHPackages © 2026

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