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

ActiveLibrary

iopay-payments/sdk-php
======================

Software to integrate IoPay Api with PHP systems

v2.0.0(3y ago)231OSL-3.0PHPPHP &gt;=5.6.0

Since Feb 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/iopay-payments/sdk-php-v2)[ Packagist](https://packagist.org/packages/iopay-payments/sdk-php)[ RSS](/packages/iopay-payments-sdk-php/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)DependenciesVersions (3)Used By (0)

SDK para PHP - IOPAY
====================

[](#sdk-para-php---iopay)

[![IoPay](https://camo.githubusercontent.com/706df1f07ea843b09baa473be5f5240cd4bef317a5db079a2af1ec39e1593e51/68747470733a2f2f7374617469632e696f7061792e6465762f6173736574732f696d672f636170615f6769742e6a7067)](https://camo.githubusercontent.com/706df1f07ea843b09baa473be5f5240cd4bef317a5db079a2af1ec39e1593e51/68747470733a2f2f7374617469632e696f7061792e6465762f6173736574732f696d672f636170615f6769742e6a7067)

💡 Requisitos
------------

[](#-requisitos)

PHP 5.6 ou superior

💻 Instalação via Composer
-------------------------

[](#-instalação-via-composer)

1. Download [Composer](https://getcomposer.org/doc/00-intro.md) caso não tenha instalado
2. Baixe o IOPAY SDK dentro do seu projeto: `composer require "iopay-payments/sdk-php"`

💻 Instalação Manual
-------------------

[](#-instalação-manual)

1. Baixe o pacote SDK na última versão [Download](https://github.com/iopay-payments/sdk-php)
2. Extraia o conteúdo do pacote dentro do seu projeto (pasta lib ou vendor, de acordo com seu framework)

Pronto, seu SDK está instalado com sucesso e pronto para utilizar!

### Configuração do Ambiente

[](#configuração-do-ambiente)

Acesse o arquivo de configuração de ambientes: `src/Environment.php`

1. Configure o ambiente (para realizar os testes, sugerimos utilizar nosso ambiente `sandbox`)

```
/**
 * true para sandbox
 * false para production
 */
 const IS_SANDBOX = true;
```

2. Configure as credenciais de acordo com a sua conta de vendedor

```
/**
  * Credenciais da conta do seller
  * https://minhaconta.iopay.com.br
  */
 const IOPAY_EMAIL       = "integracao@iopay.com.br";
 const IOPAY_SECRET      = "bdSt_xTiKcbMj2348EiDBuGjKdn5hKqv+GmqRNFTwK39HFKf=Ecf-";
 const IOPAY_SELLER_ID   = "076b53180-6e5d9-47a1-rb1c4-973747fbb6de0";
```

3. Habilite a criação de logs (importante para debug das saídas do módulo)

```
/*
 * Habilitar ou desabilitar o sistema de logger/debug
 */
const LOGGER = true;
```

Pronto, seu SDK está instalado!

🌟 Exemplos de uso
-----------------

[](#-exemplos-de-uso)

Todos os testes e exemplos estão escritos em `examples`

### tokenização

[](#tokenização)

```
require_once __DIR__ . '/../../vendor/autoload.php'; // Autoload files using Composer autoload

use IoPay\Authentication\Auth;

$logger = new IoPay\Logger\Log();
$auth   = new Auth();
$token  = $auth->token();

if (!$token) {
    $logger->log("Não foi possivel gerar o token");
} else {
    $logger->log("Token {$token} gerado com sucesso");
}
```

### transação com PIX

[](#transação-com-pix)

```
require_once __DIR__ . '/../../vendor/autoload.php'; // Autoload files using Composer autoload

use IoPay\Environment;
use IoPay\Logger\Log;
use IoPay\Source\Payment;
use IoPay\Transaction\Transaction;

$customerId = "30cdb54284424e10b9beae475c8c9879";

$transaction = new Transaction();
$transaction->setCustomerId($customerId);
$transaction->setAmount("4509");
$transaction->setCurrency(Payment::CURRENCY);
$transaction->setDescription("Venda na loja ABC");
$transaction->setStatementDescriptor("Pedido 12345");
$transaction->setIoSellerId(Environment::IOPAY_SELLER_ID);
$transaction->setPaymentType(Payment::TYPE_PIX);
$transaction->setReferenceId("123456");

/* Testando a saída do array para a transaction */
$logger = new Log();
$logger->log($transaction->getData());

/* Criando a transação e conectando */
$response = $transaction->createTransactionPix();
$logger->log("---- Transação com Pix ----");
$logger->log($response);
```

📚 Documentação
--------------

[](#-documentação)

🏻 License
---------

[](#-license)

```
MIT license. Copyright (c) 2022 - IOPAY
http://www.apache.org/licenses/LICENSE-2.0

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

Total

2

Last Release

1141d ago

Major Versions

v1.0.0 → v2.0.02023-03-27

### Community

Maintainers

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

---

Top Contributors

[![jrmaia](https://avatars.githubusercontent.com/u/19672685?v=4)](https://github.com/jrmaia "jrmaia (11 commits)")

### Embed Badge

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

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

PHPackages © 2026

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