PHPackages                             pagomio/pagomio-sdk-php - 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. pagomio/pagomio-sdk-php

ActiveLibrary[Payment Processing](/categories/payments)

pagomio/pagomio-sdk-php
=======================

Pagomio SDK for PHP

1.1(8y ago)21.8k2MITPHPPHP &gt;=5.3.0

Since Sep 28Pushed 8y ago5 watchersCompare

[ Source](https://github.com/Pagomio/pagomio-sdk-php)[ Packagist](https://packagist.org/packages/pagomio/pagomio-sdk-php)[ Docs](https://github.com/Pagomio/pagomio-sdk-php)[ RSS](/packages/pagomio-pagomio-sdk-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Pagomío SDK PHP Library
=======================

[](#pagomío-sdk-php-library)

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

[](#installation)

### Install with Composer

[](#install-with-composer)

If you're using [Composer](https://github.com/composer/composer), add this to your composer.json `require`:

```
{
  "require" : {
    "pagomio/pagomio-sdk-php" : "dev-master"
  }
}
```

And load it using Composer's autoloader

```
require 'vendor/autoload.php';
```

### Install from GitHub

[](#install-from-github)

To install the source code:

```
$ git clone git@github.com:Pagomio/pagomio-sdk-php.git
$ git clone git@github.com:rmccue/Requests.git
```

Include `pagomio-sdk-php` in your code and autoload `requests`:

```
require_once '/path/to/pagomio-sdk-php/pagomio.php';
require_once '/path/to/Requests/library/Requests.php';
Requests::register_autoloader();
```

Usage
-----

[](#usage)

### Set your client\_id, secret\_id and `true` if is sandbox:

[](#set-your-client_id-secret_id-and-true-if-is-sandbox)

```
$pagomio = new Pagomio\Pagomio('client_id','secret_id',true);
```

### Generate Token

[](#generate-token)

You must generate a token with all your payment information.

```
//Customer information - Not required
$userData = new Pagomio\UserData();
$userData->names = 'Name User';
$userData->lastNames = 'Last name User';
$userData->identificationType = 'CC'; # Allow: CC, TI, PT, NIT
$userData->identification = '123456789';
$userData->email = 'email@domain.com';
$userData->phone = '1234567';

// Payment information - Is required
$paymentData = new Pagomio\PaymentData();
$paymentData->currency = 'COP';
$paymentData->reference = '1234';
$paymentData->totalAmount = '1160';
$paymentData->taxAmount = '160';
$paymentData->devolutionBaseAmount = '1000';
$paymentData->description = 'Description of your product';

// Url return to after payment - Is required
$enterpriseData = new Pagomio\EnterpriseData();
$enterpriseData->url_redirect = 'http://www.foo.com/response.php';
$enterpriseData->url_notify = 'http://www.foo.com/notify.php';

// Create the object
$aut = new Pagomio\AuthorizePayment();
$aut->enterpriseData = $enterpriseData;
$aut->paymentData = $paymentData;
$aut->userData = $userData;

// Generate the token
$response = $pagomio->getToken($aut);

// Redirect to Pagomio.com
if($response->success) {
    header("Location: " . $response->url);
}
```

### Response

[](#response)

After the payment `Pagomio.com` redirected to the page that you reported in the previous step.

```
// response.php
$pagomio = new Pagomio\Pagomio('client_id','secret_id',true);
$request = $pagomio->getRequestPayment();
switch ($request->status) {
	case  Pagomio\Pagomio::TRANSACTION_SUCCESS:
		// ...
		break;
	case  Pagomio\Pagomio::TRANSACTION_ERROR:
		// ...
		break;
	case Pagomio\Pagomio::TRANSACTION_PENDING:
		// ...
		break;
}
```

License
-------

[](#license)

Licensed under the MIT license.

Copyright (r) 2015 Pagomío.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.3% 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 ~237 days

Total

2

Last Release

3282d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/186686fce6214e2627ee04d57658cef630c814ee65393e2ed69002bd160f69bc?d=identicon)[pagomio](/maintainers/pagomio)

---

Top Contributors

[![juanesrios](https://avatars.githubusercontent.com/u/3535322?v=4)](https://github.com/juanesrios "juanesrios (26 commits)")[![duvanmonsa](https://avatars.githubusercontent.com/u/2709271?v=4)](https://github.com/duvanmonsa "duvanmonsa (1 commits)")

---

Tags

phpsdkpagosonlinepagomio

### Embed Badge

![Health badge](/badges/pagomio-pagomio-sdk-php/health.svg)

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

###  Alternatives

[yandex-money/yandex-money-sdk-php

Yandex.Money API SDK for PHP

105167.4k2](/packages/yandex-money-yandex-money-sdk-php)[cryptonator/merchant-php-sdk

Cryptonator.com Merchant API SDK for PHP

2713.7k](/packages/cryptonator-merchant-php-sdk)

PHPackages © 2026

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