PHPackages                             jobmetric/voucher-usd - 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. jobmetric/voucher-usd

ActiveLibrary[Payment Processing](/categories/payments)

jobmetric/voucher-usd
=====================

This package handles payment via the USD voucher website.

1.0.0(1y ago)54MITPHPPHP &gt;=8.0.1

Since Nov 28Pushed 1y ago2 watchersCompare

[ Source](https://github.com/jobmetric/voucher-usd)[ Packagist](https://packagist.org/packages/jobmetric/voucher-usd)[ Docs](https://doc.jobmetric.net/package/voucher-usd)[ GitHub Sponsors](https://github.com/sponsors/majidmohammadian)[ RSS](/packages/jobmetric-voucher-usd/feed)WikiDiscussions master Synced 1w ago

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

[![Contributors](https://camo.githubusercontent.com/87d85e6ccf62a99ad65164f4a7dce17b7c1b075c0f58516e2be4ebf1a575fa7f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6a6f626d65747269632f766f75636865722d7573642e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/jobmetric/voucher-usd/graphs/contributors)[![Forks](https://camo.githubusercontent.com/544e9fbd5c37a04ada5fe7c55daf6d07a823701507536b230f3bbd7a3a944152/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6a6f626d65747269632f766f75636865722d7573642e7376673f7374796c653d666f722d7468652d6261646765266c6162656c3d466f726b)](https://github.com/jobmetric/voucher-usd/network/members)[![Stargazers](https://camo.githubusercontent.com/e3bf8a9280fe20fc05d4cb3bc829001565b4d576c7e5c2c0a80c9ac00610d24f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6a6f626d65747269632f766f75636865722d7573642e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/jobmetric/voucher-usd/stargazers)[![MIT License](https://camo.githubusercontent.com/dfef81efa2bb8e01a7b1f3d0a747bb0da57bd382534c09db0fcc2dd2944e51aa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6f626d65747269632f766f75636865722d7573642e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/jobmetric/voucher-usd/blob/master/LICENCE.md)[![LinkedIn](https://camo.githubusercontent.com/eb590f47a3fca74584d18db8dd3e985ae3d786f50cd41b7530c3af3885da233c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4c696e6b6564496e2d626c75652e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6c696e6b6564696e26636f6c6f72423d353535)](https://linkedin.com/in/majidmohammadian)

Voucher USD
===========

[](#voucher-usd)

A Laravel package for managing `voucher USD`, including authentication, balance checking, voucher creation, and retrieval.

Install via composer
--------------------

[](#install-via-composer)

Run the following command to pull in the latest version:

```
composer require jobmetric/voucher-usd
```

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

[](#documentation)

Add the required environment variables in your .env file:

```
VOUCHER_USD_CLIENT_ID=your_client_id
VOUCHER_USD_CLIENT_SECRET=your_client_secret
VOUCHER_USD_AUTH_URL=https://example.com
VOUCHER_USD_BASE_URL=https://example.com
```

### Usage

[](#usage)

#### Authentication

[](#authentication)

To authenticate and retrieve an access token:

```
use JobMetric\VoucherUsd\Facades\VoucherUsd;

$response = VoucherUsd::auth();

if ($response['ok']) {
    echo "Access Token: " . $response['data']['token'];
} else {
    echo "Error: " . $response['message'];
}
```

#### Check Balance

[](#check-balance)

To check the account balance:

```
$response = VoucherUsd::balance();

if ($response['ok']) {
    echo "Available Balance: " . $response['data']['available'];
    echo "Actual Balance: " . $response['data']['actual'];
} else {
    echo "Error: " . $response['message'];
}
```

#### Create a Voucher

[](#create-a-voucher)

To create a new voucher:

```
$data = [
    'amount' => 100, // Amount in USD
    'note' => 'Test voucher creation',
];

$response = VoucherUsd::createVoucher($data);

if ($response['ok']) {
    echo "Voucher Code: " . $response['data']['voucher_code'];
} else {
    echo "Error: " . $response['message'];
}
```

#### Retrieve All Vouchers

[](#retrieve-all-vouchers)

To retrieve a list of all vouchers:

```
$response = VoucherUsd::getVouchers();

if ($response['ok']) {
    echo "Vouchers: " . print_r($response['data']['vouchers'], true);
    echo "Report: " . print_r($response['data']['report'], true);
} else {
    echo "Error: " . $response['message'];
}
```

#### Retrieve a Single Voucher

[](#retrieve-a-single-voucher)

To retrieve details of a specific voucher by its code:

```
$voucherCode = 'ABC123';

$response = VoucherUsd::showVoucher($voucherCode);

if ($response['ok']) {
    echo "Voucher Details: " . print_r($response['data'], true);
} else {
    echo "Error: " . $response['message'];
}
```

#### Events

[](#events)

This package contains several events for which you can write a listener as follows

EventDescription`CreateVoucherUsdEvent`Triggered after a voucher is successfully created.`InsufficientBalanceEvent`Triggered when voucher creation fails due to insufficient balance.Contributing
------------

[](#contributing)

Thank you for considering contributing to the Laravel Ban Ip! The contribution guide can be found in the [CONTRIBUTING.md](https://github.com/jobmetric/voucher-usd/blob/master/CONTRIBUTING.md).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/jobmetric/voucher-usd/blob/master/LICENCE.md) for more information.

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.5% 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

Unknown

Total

1

Last Release

627d ago

### Community

Maintainers

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

---

Top Contributors

[![MajidMohammadian](https://avatars.githubusercontent.com/u/2099965?v=4)](https://github.com/MajidMohammadian "MajidMohammadian (21 commits)")[![hassan7303](https://avatars.githubusercontent.com/u/128932029?v=4)](https://github.com/hassan7303 "hassan7303 (1 commits)")

---

Tags

laravelpackagepaymentvoucherpayment methodUSDjobmetric

### Embed Badge

![Health badge](/badges/jobmetric-voucher-usd/health.svg)

```
[![Health](https://phpackages.com/badges/jobmetric-voucher-usd/health.svg)](https://phpackages.com/packages/jobmetric-voucher-usd)
```

###  Alternatives

[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3622.8k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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