PHPackages                             kamerk22/amazongiftcode - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kamerk22/amazongiftcode

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kamerk22/amazongiftcode
=======================

Laravel Package for Amazon Gift Codes.

v2.0.0(3w ago)46155.3k—7.1%31[1 issues](https://github.com/kamerk22/AmazonGiftCode/issues)MITPHPCI passing

Since Dec 7Pushed 3w ago2 watchersCompare

[ Source](https://github.com/kamerk22/AmazonGiftCode)[ Packagist](https://packagist.org/packages/kamerk22/amazongiftcode)[ Docs](https://github.com/kamerk22/amazongiftcode)[ RSS](/packages/kamerk22-amazongiftcode/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (8)Dependencies (8)Versions (10)Used By (0)

AmazonGiftCode
==============

[](#amazongiftcode)

[![Buy Me A Coffee](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/kamerk22)

[![Tests](https://github.com/kamerk22/AmazonGiftCode/actions/workflows/run-tests.yml/badge.svg?branch=master)](https://github.com/kamerk22/AmazonGiftCode/actions/workflows/run-tests.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/104fb27afdc6bd7762129ac5d006966e7e36ae3a78316ee6b057ef3d48d19d2d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b616d65726b32322f616d617a6f6e67696674636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kamerk22/amazongiftcode)[![Total Downloads](https://camo.githubusercontent.com/c35eae9f4c294d9311f9f0989858a2f4247fbb19da2343699c7433b5382c500d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b616d65726b32322f616d617a6f6e67696674636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kamerk22/amazongiftcode)

AmazonGiftCode is Laravel package for Amazon Gift Codes On Demand (AGCOD). Integration for Amazon Incentive API. Read more at

This package will give you a simplest APIs to Create/Cancel Amazon Gift Code On Demand.

Requirements
------------

[](#requirements)

- PHP 8.2 or higher (PHP 8.3+ for Laravel 13)
- Laravel 12 or 13

Older Laravel versions (5 to 11) remain installable, but the test suite and CI target 12 and 13. Laravel 11 and below are past their security support window.

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

[](#installation)

You can install this package via Composer.

```
$ composer require kamerk22/amazongiftcode
```

Set the following Environment Variable in `.env` file.

```
GIFT_CARD_ENDPOINT=agcod-v2-gamma.amazon.com
GIFT_CARD_KEY=AWS_ACCESS_KEY
GIFT_CARD_SECRET=AWS_SECRET
GIFT_CARD_PARTNER_ID=AWS_PARTNER_ID
```

The package will register itself automatically. Optionally publish config file of package

```
$ php artisan vendor:publish --provider="kamerk22\AmazonGiftCode\AmazonGiftCodeServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

To Create Amazon Gift Card

```
$aws = AmazonGiftCode::make()->buyGiftCard($value);
```

Create a Amazon Gift Card with your own `$creationRequestId` (otherwise generated)

```
$aws = AmazonGiftCode::make()->buyGiftCard($value, $creationRequestId);
```

To Cancel Amazon Gift Card

```
$aws = AmazonGiftCode::make()->cancelGiftCard($creationRequestId, $gcId);
```

To Get Available Funds Balance

```
$aws = AmazonGiftCode::make()->getAvailableFunds();
```

Available Methods
-----------------

[](#available-methods)

To change client configuration dynamic. If you pass only `$key` or other parameter will takes value from default config.

```
$aws = AmazonGiftCode::make($key, $secret, $partner, $endpoint, $currency)->buyGiftCard($value);
```

### CreateGiftCard

[](#creategiftcard)

`getStatus()`

Get the status of perform request. (`status`)

```
$status = $aws->getStatus();
```

---

`getId()`

To get unique Amazon Gift Card id. (`gcId`)

```
$gcId = $aws->getId();
```

---

`getCreationRequestId()`

Original Creation Request Id. (`creationRequestId`)

```
$creationRequestId = $aws->getCreationRequestId();
```

---

`getClaimCode()`

Amazon Gift Card Claim Code to be used. (`gcClaimCode`)

```
$gcClaimCode = $aws->getClaimCode();
```

---

`getValue()`

Amount of generated Gift Card. (`amount`)

```
$amount = $aws->getValue();
```

---

`getCurrency()`

Currency Code of generated Gift Card. (`currencyCode`)

```
$currencyCode = $aws->getCurrency();
```

---

`getRawJson()`

Get the raw JSON response. (original response)

```
$rawJson = $aws->getRawJson();
```

---

### CancelGiftCard

[](#cancelgiftcard)

`getStatus()`

Get the status of perform request. (`status`)

```
$status = $aws->getStatus();
```

---

`getId()`

To get unique Amazon Gift Card id. (`gcId`)

```
$gcId = $aws->getId();
```

---

`getCreationRequestId()`

Original Creation Request Id. (`creationRequestId`)

```
$creationRequestId = $aws->getCreationRequestId();
```

---

`getRawJson()`

Get the raw JSON response. (original response)

```
$rawJson = $aws->getRawJson();
```

---

### GetAvailableFunds

[](#getavailablefunds)

`getStatus()`

Get the status of perform request. (`status`)

```
$status = $aws->getStatus();
```

---

`getAmount()`

To get available balance amount. (`amount`)

```
$amount = $aws->getAmount();
```

---

`getCurrency()`

To get currency. (`currency`)

```
$currency = $aws->getCurrency();
```

---

`getTimestamp()`

Get request timestamp. (`getTimestamp`)

```
$timestamp = $aws->getTimestamp();
```

---

`getRawJson()`

Get the raw JSON response. (original response)

```
$rawJson = $aws->getRawJson();
```

Testing
-------

[](#testing)

```
$ composer test
```

The test suite runs against Laravel 12 and 13 on PHP 8.2 to 8.4 (Laravel 13 requires PHP 8.3+).

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Kashyap Merai](https://github.com/kamerk22)
- [All Contributors](../../contributors%5D)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

61

—

FairBetter than 98% of packages

Maintenance95

Actively maintained with recent releases

Popularity48

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~428 days

Total

8

Last Release

22d ago

Major Versions

v1.0.6 → v2.0.02026-06-12

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11503211?v=4)[Kashyap Merai](/maintainers/kamerk22)[@kamerk22](https://github.com/kamerk22)

---

Top Contributors

[![kamerk22](https://avatars.githubusercontent.com/u/11503211?v=4)](https://github.com/kamerk22 "kamerk22 (18 commits)")[![davemorris80](https://avatars.githubusercontent.com/u/13767771?v=4)](https://github.com/davemorris80 "davemorris80 (11 commits)")[![goaround](https://avatars.githubusercontent.com/u/5927337?v=4)](https://github.com/goaround "goaround (10 commits)")[![charlesreffett](https://avatars.githubusercontent.com/u/59833910?v=4)](https://github.com/charlesreffett "charlesreffett (2 commits)")[![AndrewMonty](https://avatars.githubusercontent.com/u/2057194?v=4)](https://github.com/AndrewMonty "AndrewMonty (1 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (1 commits)")

---

Tags

amazonawscomposergift-cardsincentiveslaravellaravel-packagepackagepackagistlaravelamazongiftcardAmazonGiftCodeAGCODIncentives APIAmazon Incentives API

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kamerk22-amazongiftcode/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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