PHPackages                             agile-pay/sdk - 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. agile-pay/sdk

ActiveLibrary[Payment Processing](/categories/payments)

agile-pay/sdk
=============

v1.0.2(8y ago)027MITPHPPHP &gt;=5.5

Since Sep 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/agile-pay/php-sdk)[ Packagist](https://packagist.org/packages/agile-pay/sdk)[ RSS](/packages/agile-pay-sdk/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (5)Used By (0)

**Code climate**  [![](https://camo.githubusercontent.com/e0cbaf352d7518824e37b43856b286b0a97e152e5d4e4fc86fc7c48c422171c8/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f35643632613134633262346462353439306162612f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/agile-pay/php-sdk/maintainability) Install
-------

[](#install)

```
$ composer require agile-pay/sdk
```

Usage
-----

[](#usage)

```
$agilePay = new \AgilePay\Sdk\AgilePay([
    'api_key' => '',
    'api_secret' => ''
]);
```

Gateways
--------

[](#gateways)

#### To create a new gateway :

[](#to-create-a-new-gateway-)

```
$gateway = $agilePay->gateway()->create('stripe', [
    'secret_key' => ''
]);
```

The response will contain a gateway **reference** which is used to perform transactions against the gateway

```
$gateway->reference;
```

Payment methods
---------------

[](#payment-methods)

#### To create a new payment method type of gateway token:

[](#to-create-a-new-payment-method-type-of-gateway-token)

In this case the payment method will be retained with the provided gateway, please check the availability of transaction store in the gateways

Gateways list -&gt;

Gateway token -&gt;

```
$paymentMethod = $agilePay->paymentMethod()->createGatewayToken($gateway->reference, [
    'number' => '',
    'holder_name' => '',
    'cvv' => '',
    'expiry_month' => '', //mm
    'expiry_year' => '',  //yy
]);
```

The response will contain a payment method **token** which is used to perform transactions against the payment method

```
$paymentMethod->token;
```

Transactions
------------

[](#transactions)

#### Auth (Charge a credit card with a payment method type of gateway token):

[](#auth-charge-a-credit-card-with-a-payment-method-type-of-gateway-token)

```
$transaction = $agilePay->transaction()
                ->setPaymentMethod($paymentMethod->token;)
                ->auth(500, 'eur'); //Charging 5.00 euros
```

The response will contain a **reference** which can be used for second steps transactions such as **void**, **capture** and **refund**

```
$transaction->reference;
```

#### Void (Cancel an authorized transaction):

[](#void-cancel-an-authorized-transaction)

```
$response = $agilePay->transaction($transaction->reference)->void();
```

#### Capture (Settle an authorized transaction):

[](#capture-settle-an-authorized-transaction)

```
$response = $agilePay->transaction($transaction->reference)->capture();
```

#### Credit (Refund a settled transaction):

[](#credit-refund-a-settled-transaction)

```
$response = $agilePay->transaction($transaction->reference)->credit();
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~13 days

Total

4

Last Release

3158d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fd50e89a6977104581ab5e24ce15ab3c775851f65163a704dce17dc91e33c12?d=identicon)[a-colaneri](/maintainers/a-colaneri)

---

Top Contributors

[![alessandro-c](https://avatars.githubusercontent.com/u/8146332?v=4)](https://github.com/alessandro-c "alessandro-c (29 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/agile-pay-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/agile-pay-sdk/health.svg)](https://phpackages.com/packages/agile-pay-sdk)
```

###  Alternatives

[aws/aws-sdk-php

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

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

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

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

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

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[imdhemy/google-play-billing

Google Play Billing

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

PHPackages © 2026

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