PHPackages                             istpay/istpay-php-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. [API Development](/categories/api)
4. /
5. istpay/istpay-php-sdk

ActiveLibrary[API Development](/categories/api)

istpay/istpay-php-sdk
=====================

SDK para a REST API da Istpay Bank

v1.0.2(2y ago)123proprietaryPHPPHP &gt;=7.4

Since Aug 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Oseias-Isidoro/istpay-php-sdk)[ Packagist](https://packagist.org/packages/istpay/istpay-php-sdk)[ RSS](/packages/istpay-istpay-php-sdk/feed)WikiDiscussions main Synced 1mo ago

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

istpay-php-sdk
==============

[](#istpay-php-sdk)

SDK para a REST API da Istpay Bank

INSTALAÇÃO
==========

[](#instalação)

```
composer require istpay/istpay-php-sdk

```

BOLETO
======

[](#boleto)

Gerando uma cobrança no Boleto.

```
use IstpaySDK\SDK\Istpay;

$istpay = new Istpay('token');
$istpayGateway = $istpay->gateway();

$istpayGateway->setCart([
    [
        "title" => 'product 1',
        "price" => 6,
        "quantity" => 1
    ],
    [
        "title" => 'product 2',
        "price" => 12,
        "quantity" => 2
    ]
]);
$istpayGateway->setCustomer([
    "name" => 'fulano da silva',
    "document" => '111.222.333-44',
    "phone" => '55 999112233',
    "email" => 'fulanodasilva@gmail.com',
    "address" => [
        "zipcode" => '0000000',
        "city" => 'Cidade',
        "street" => 'Rua',
        "number" => '434',
        "district" => 'Bairro',
        "adjunct" => 'sem complemento',
        "state" => 'Estado',
        "codIbge" => '0000000'
    ]
]);
$istpayGateway->setShipping(["title" => "free", "price" => 0]);
$istpayGateway->setNotificationUrl('https://mysystem.com.br/webhook');
$istpayGateway->setCustomerIP('45.234.1.68');

$response = $istpayGateway->boleto();

echo $response->success(); // TRUE se a cobrança foi gerada com sucesso
echo $response->orderID(); // ID da ordem gerada na Istpay Checkout, retorna NULL em caso de erro 422 (http code error)
var_dump($response->getErrors()); // Array de erros
echo $response->paymentCode(); // barcode do boleto
echo $response->paymentStatus(); // status da cobrança, pode ser 'paid', 'pending', 'canceled' ou 'failed', em caso de erro 422 retornara  NULL
echo $response->transactionID(); // id da transação, em caso de erro pode retornar NULL
echo $response->boletoPDFLink(); // link para acessar o PDF do boleto
echo $response->boletoDueDate(); // data de vencimento do boleto
echo $response->isPaid(); // TRUE se o status retornado for 'paid'
echo $response->isPending(); // TRUE se o status retornado for 'pending'
echo $response->isCanceled(); // TRUE se o status retornado for 'canceled'
echo $response->isFailed(); // TRUE se o status retornado for 'failed'
```

PIX
===

[](#pix)

Gerando uma cobrança no PIX.

```
//apenas mude essa linha do codigo acima
$response = $istpayGateway->boleto();
//para
$response = $istpayGateway->pix();

// os metodos listados aqui são os que mudam seu comportamento quando a cobrança for no pix
echo $response->paymentCode(); // chave pix para pagamento
echo $response->boletoPDFLink(); // retornara NULL
echo $response->boletoDueDate(); // retornara NULL
```

CARTÃO DE CREDITO
=================

[](#cartão-de-credito)

Gerando uma cobrança no Cartão de credito.

```
// campos a acrecentar
$istpayGateway->setCardFlag('visa');
$istpayGateway->setHolder('fulano da silva');
$istpayGateway->setCvv('123');
$istpayGateway->setCardHolderDocument('111.222.333-44'); // cpf do titular do cartão
$istpayGateway->setCardNumber('111 222 3333 4444');
$istpayGateway->setCardExpiringDate('04/25'); // mm/yy
$istpayGateway->setInstallments(4); // de 1 a 12

//apenas mude essa linha do codigo acima
$response = $istpayGateway->boleto();
//para
$response = $istpayGateway->creditCard();

// os metodos listados aqui são os que mudam seu comportamento quando a cobrança for no cartão de credito
echo $response->paymentCode(); // retornara NULL
echo $response->boletoPDFLink(); // retornara NULL
echo $response->boletoDueDate(); // retornara NULL
```

---

WITHDRAW
========

[](#withdraw)

- Verificar chave pix

```
use IstpaySDK\SDK\Istpay;

$istpay = new Istpay('token');
$istpayWithdraw = $istpay->withdraw();

$response = $istpayWithdraw->checkPixKey([
    'pix_key' => 'chave pix',
    'type_key' => 'tipo da chave' // document, phoneNumber, email, randomKey, paymentCode
]);

if ($response->success())
{
    $res_obj = $response->responseToObject();
    echo $res_obj->value;                               // 0,
    echo $res_obj->typeKey;                             // "cpf",
    echo $res_obj->destinationAccountOwnerName;         // "Salvatore Strandburg",
    echo $res_obj->destinationAccountOwnerSocialNumber; // "***.893.450-**",
    echo $res_obj->destinationAccountOwnerSocialType;   // "individual",
    echo $res_obj->destinationAccountType;              // "payment",
    echo $res_obj->destinationBankIspb;                 // "39231527",
    echo $res_obj->destinationBank;                     // "UNICRED COSTA DO SOL RJ",
    echo $res_obj->destinationAgency;                   // "3964",
    echo $res_obj->destinationAccountNumber;            // "6981656148545163",
    echo $res_obj->active;                              // true
} else {
    var_dump($response->getErrors()); // array de erros
}
```

- Transferência via PIX

```
use IstpaySDK\SDK\Istpay;

$istpay = new Istpay('token');
$istpayWithdraw = $istpay->withdraw();

$response = $istpayWithdraw->pixTransfer([
    'pix_key' => 'chave pix',
    'type_key' => 'tipo da chave', // document, phoneNumber, email, randomKey, paymentCode
    'amount' => 5,
    'internal_identifier' => "user-0001"
]);

if ($response->success())
{
    $res_obj = $response->responseToObject();
    echo $res_obj->status;
    echo $res_obj->amount;
    echo $res_obj->pix_key;
    echo $res_obj->key_type;
    echo $res_obj->transaction_id;
    echo $res_obj->message;
} else {
    var_dump($response->getErrors()); // array de erros
}
```

Demais endpoints
================

[](#demais-endpoints)

### Carrinho Abandonado

[](#carrinho-abandonado)

- Listar carrinhos abandonados por Shop

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->abandonedCart();

$response = $istpay->get();

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Buy Buttons

[](#buy-buttons)

- Listar botões de compra por shop id

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->buyButtons();

$response = $istpay->get(
    123, //shop_id
    [
        'product_ids' => [1, 2, 3] // opcional
    ]
);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Customers

[](#customers)

- Listar clientes por Shop

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->customers();

$response = $istpay->get(
    [
        'id' => 12, // opcional
        'name' => 'fulano da silva', // opcional
        'email' => 'fulanodasilva@gmail.com', // opcional
        'document' => '111.222.333-44' // opcional
    ]
);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Dashboard

[](#dashboard)

- Listar dados dashboard do shop via token

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->dashboard();

$response = $istpay->get(
    'shop_token',
    '01/01/2022',
    '01/01/2023',
);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Discounts

[](#discounts)

- Listar descontos por shop id

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->discounts();

$response = $istpay->get(
    123, // shop_id
    [
        'product_id' => 123, // opcional
        'payment_method' => \IstpaySDK\SDK\Gateway\Gateway::PAYMENT_METHOD_PIX, // pix|boleto|credit_Cart - opcional
        'automatic_apply' => 1, // opcional
        'newsletter_abandoned_carts' => 1, // opcional
    ]
);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

- Validar desconto via cupom

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->discounts();

$response = $istpay->validateCoupon(
    123, // shop_id
    [
        'code' => 'OIVCGC74F',
        'total_order' => 100,
        'email_customer' => "fulanodasilva@gmail.com",
        'payment_method' => \IstpaySDK\SDK\Gateway\Gateway::PAYMENT_METHOD_PIX, //pix|boleto|credit_Cart
        'product_ids' => "999,1000",
    ]
);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Notifications

[](#notifications)

- Listar notificações por shop

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->notifications();

$response = $istpay->list('shop_token');

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Order Bumps

[](#order-bumps)

- Listar order bumps por shop id

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->orderBumps();

$response = $istpay->get(
    123, // shop_id
    [
        'product_id' => 10471, // opcinal
        'products_ids' => '10471,5435', // opcinal
        'rules_to_show' => 'always', // opcinal
        'values_rules_to_show' => '>100', // opcinal
        'payment_method' => \IstpaySDK\SDK\Gateway\Gateway::PAYMENT_METHOD_CREDIT_CARD, //pix|boleto|credit_Cart - opcinal
    ]
);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Orders

[](#orders)

- Listar pedidos por Shop

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->orders();

$response = $istpay->get([
        'id' => 10471, // opcinal
        'start_date' => '01/01/2023', // opcinal
        'end_date' => '01/09/2023', // opcinal
        'product' => 343, // opcinal
        'customer' => 455, // opcinal
        'external_identification' => '2dc0204d-4971-4bf3-a1e8-13c8fnf65sp784ce55', // opcinal
        'payment_method' => \IstpaySDK\SDK\Gateway\Gateway::PAYMENT_METHOD_CREDIT_CARD, //pix|boleto|credit_Cart - opcinal
    ]);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Payments

[](#payments)

- Listar pagamentos pedidos por Shop

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->payments();

$response = $istpay->get([
        'order_id' => 10471, // opcinal
        'status' => \IstpaySDK\SDK\Gateway\Gateway::PAYMENT_STATUS_PAID, // paid|failed|pending|canceled - opcional
        'method' => \IstpaySDK\SDK\Gateway\Gateway::PAYMENT_METHOD_CREDIT_CARD, //pix|boleto|credit_Cart - opcional
    ]);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Pixels

[](#pixels)

- Listar pixels por shop id

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->pixels();

$response = $istpay->get(
    5 // shop_id
);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Shipping Options

[](#shipping-options)

- Listar opções de frete por shop id

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->shippingOptions();

$response = $istpay->get(
    5, // shop_id
    [
        'total_amount_items_order' => 100, // opcional
        'product_ids' => '1,2,3', // opcional
        'states' => 'PR', // opcional
    ]
);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Shop

[](#shop)

- Listar dados do shop via token

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->shop();

$response = $istpay->get();

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### User Devices

[](#user-devices)

- Listar dispositivos registrados por Shop

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->userDevices();

$response = $istpay->list('shop_token');

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

- Registrar novo dispositivo por Shop

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->userDevices();

$response = $istpay->store(
    'shop_token',
    'device_id'
);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Products

[](#products)

- Criar produto digital por shop

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->products();

$response = $istpay->create([
    'title' => 'auto test',
    'description' => 'description auto test',
    'price' => 10.5,
    'redirect_url_card' => 'url',
    'type' => Products::TYPE_DIGITAL,
]);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

- Criar produto digital por shop

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->products();

$response = $istpay->update(
    3423, // product_id
    [
        'title' => 'auto test',
        'description' => 'description auto test',
        'price' => 10.5,
        'redirect_url_card' => 'url',
        'type' => Products::TYPE_DIGITAL,
    ]
);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

- Deletar produto digital por shop

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->products();

$response = $istpay->delete(
    3423, // product_id
);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

- Listar produtos por Shop

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->products();

$response = $istpay->get([
    'id' => 123, //product_id - opcional
    'title' => 'product title', // opcional
]);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

### Integrações

[](#integrações)

- Integrar com o WooCommerce

```
use IstpaySDK\SDK\Istpay;

$istpay = (new Istpay('token'))->integrations();

$response = $istpay->woo_integration([
    "woo_url_store" => "www.myshop.com",
    "woo_consumer_key" => "ck_47549572a85fdbf8d4a82b85gfd877d4d7d4e2da",
    "woo_consumer_secret" => "cs_f5167a95f9ce7ecb62fhgd6c193f758052554df2",
    "allow_woo_cart" => false
]);

if ($response->success())
{
    var_dump($response->responseToArray());
} else {
    var_dump($response->getErrors()); // array de erros
}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

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

Total

3

Last Release

965d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ee7a65c2996a1e6d6186d22e6c530a54ba9e35ccf2629d5f322ede073c136cfe?d=identicon)[Oseias-Isidoro](/maintainers/Oseias-Isidoro)

---

Top Contributors

[![Oseias-Isidoro](https://avatars.githubusercontent.com/u/39608787?v=4)](https://github.com/Oseias-Isidoro "Oseias-Isidoro (75 commits)")

---

Tags

istpaysdk-php

### Embed Badge

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

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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