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

ActiveLibrary[API Development](/categories/api)

paycoin/paycoin-laravel
=======================

Pay coin APIs library

031PHP

Since Aug 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Taiwo02/paycoins-laravel)[ Packagist](https://packagist.org/packages/paycoin/paycoin-laravel)[ RSS](/packages/paycoin-paycoin-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-paycoin
===============

[](#laravel-paycoin)

> A Laravel Package for working with paycoin easily

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

[](#installation)

[PHP](https://php.net) 5.4+ and [Composer](https://getcomposer.org) are required.

To get the latest version of Laravel Paycoin, simply require it

```
$ composer require paycoin/paycoin-laravel
```

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

[](#configuration)

You can publish the configuration file using this command:

```
$ php artisan vendor:publish

"then input 0 follow by enter key"
```

Usage
-----

[](#usage)

Open your .env file and add yoursecret key like so:

```
secret_key=xxxxxxxxxxxxxxxxxxxxxxxxxx
```

You can simply use these functons within your controllers:

### Get All Invoices

[](#get-all-invoices)

```
use Paycoin\Paycoins\Paycoins;

public function getAllInvoices()
{
    return Paycoins::getInvoices();
}
```

### Get Invoice By Ref

[](#get-invoice-by-ref)

```
use Paycoin\Paycoins\Paycoins;

public function getInvoiceByRef()
{
    return Paycoins::getInvoice("INV1626354432969");
}
```

### Create Invoice

[](#create-invoice)

```
use Paycoin\Paycoins\Paycoins;

public function createInvoice()
{
    return Paycoins::create_invoice(
        (object)[
            "amount" => 1000000,
            "currency" => 'NGN',
            "redirect_url"=> 'https://abc.com',
            "customer" => [
                'firstname' => "test",
                'lastname' => "name",
                'email' => "testname@mail.com"
            ],
            "customization" => [
                "title" => "Sales"
            ]
        ]
    );
}
```

### Get Current Market Exchange Rates of 1 NGN to all other cryptos and fiat currencies

[](#get-current-market-exchange-rates-of-1-ngn-to-all-other-cryptos-and-fiat-currencies)

```
use Paycoin\Paycoins\Paycoins;

public function getExchangeRates()
{
    return Paycoins::exchangeRate("NGN");
}
```

Webhooks
--------

[](#webhooks)

Webhooks allow you to configure a URL that will be notified every time an event occurs on your account. When one of the events you subscribe to happens, paycoins will send a json object representing that event through a HTTP POST request to your webhooks URL.

### Webhook configuration

[](#webhook-configuration)

You can either edit your existing webhook configurations, or click “Add Webhook” configurations in your paycoins developer account settings. The most important things is to provide the **URL** address that events should be sent to.

### Responding to webhook

[](#responding-to-webhook)

We do not expect any response from the endpoint you configure. You can respond with a customary HTTP 200 code, however this is not required. We currently do not support resending events that were failed to be properly delivered.

### Event types

[](#event-types)

This is a list of all the types of events we currently send. We may add more at any time, so you shouldn’t rely on only these types existing in your code.

#### `New deposited payment`

[](#new-deposited-payment)

Sent when new payment has been deposited to your wallet.

##### `Response results`

[](#response-results)

```
data: {
  currency: "BTC",
  amount: 0.001,
  type: "payment-successful",
  reference: "INV1608644446774",
},
```

#### `Payout`

[](#payout)

Sent when new payout/withdrawal is made on your wallet.

##### `Response results.`

[](#response-results-1)

N.B: This respnse may varies depending on the status of the payout action

`payout successful response`

```
data: {
  currency: "BTC",
  amount: 0.001,
  type: "payout",
  status: "successful"
},
```

`payout failed response`

```
data: {
  currency: "BTC",
  amount: 0.001,
  type: "payout",
  status: "failed"
},
```

`payout request expired response`

```
data: {
 currency: "BTC",
  amount: 0.001,
  type: "payout",
  status: "expired"
},
```

`payout cancelled response`

```
data: {
  currency: "BTC",
  amount: 0.001,
  type: "payout",
  status:"canceled"
},
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% 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/81621c2d92addb98de7ba667a5feed454610147f73c43cc837263d1f53637f74?d=identicon)[taiwoenoch](/maintainers/taiwoenoch)

---

Top Contributors

[![goldenglorys](https://avatars.githubusercontent.com/u/32324941?v=4)](https://github.com/goldenglorys "goldenglorys (11 commits)")[![Taiwo02](https://avatars.githubusercontent.com/u/45623496?v=4)](https://github.com/Taiwo02 "Taiwo02 (11 commits)")

### Embed Badge

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

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

###  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)
