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.

v1.0.6(1y ago)46140.3k—8.4%31[2 PRs](https://github.com/kamerk22/AmazonGiftCode/pulls)MITPHPCI failing

Since Dec 7Pushed 1y 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 1mo ago

READMEChangelog (7)Dependencies (5)Versions (8)Used By (0)

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

[](#amazongiftcode)

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

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/cbf34fb607175519db47a1b2d2b3d932034e2cc3afaf740fbe35117b8ed05891/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b616d65726b32322f416d617a6f6e47696674436f64652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d617374657226733d30633462376431613838623435313964663266326139353238326566303763353331353961636132)](https://scrutinizer-ci.com/g/kamerk22/AmazonGiftCode/?branch=master)[![Build Status](https://camo.githubusercontent.com/18e5c6c3056d54c9fdf397570157b6d3197df93fcb4bb720138789d2576d5ad1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b616d65726b32322f416d617a6f6e47696674436f64652f6261646765732f6275696c642e706e673f623d6d617374657226733d38393731373138393635616661653032393964653637356266316131663638646430353132303761)](https://scrutinizer-ci.com/g/kamerk22/AmazonGiftCode/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/1d7a2ba88c744890ed90a3a19105a75ba9ac976b59064b9ee1881e7b2a8791af/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b616d65726b32322f416d617a6f6e47696674436f64652f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d617374657226733d65343939386332393337636135366231643766636230626237316436373862336131353166666338)](https://scrutinizer-ci.com/code-intelligence)[![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.

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();
```

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

48

—

FairBetter than 95% of packages

Maintenance45

Moderate activity, may be stable

Popularity47

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity66

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

Recently: every ~442 days

Total

7

Last Release

423d ago

### Community

Maintainers

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

---

Top Contributors

[![kamerk22](https://avatars.githubusercontent.com/u/11503211?v=4)](https://github.com/kamerk22 "kamerk22 (17 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

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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