Search by

payzu / pix

aelsonsamaral

SDK oficial PHP da API PayZu Pix: depósitos, saques, transferências internas, infrações, relatórios e callbacks.

3.0.0 2026-10-04 02:43 UTC

This package is auto-updated.

Last update: 2026-11-05 19:54:19 UTC


README

REST API for Pix operations on the PayZu platform, deposits, withdrawals, internal transfers, infractions, reports, and callback inspection. All amounts are in BRL (reais) unless explicitly noted. Authentication uses a Bearer token issued during onboarding.

SDKs oficiais

  • Node.js: npm install payzu-pix
  • Python: pip install payzu-pix
  • PHP: composer require payzu/pix
  • Ruby: gem install payzu-pix
  • Java: br.com.payzu:payzu-pix (Maven Central)
  • Go: go get github.com/PayZuAI/payzu-sdks/go

Repo: https://github.com/PayZuAI/payzu-sdks

For more information, please visit https://suporte.payzu.com.br.

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/PayZuAI/payzu-sdks.git"
    }
  ],
  "require": {
    "PayZuAI/payzu-sdks": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/PayZuPix/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure Bearer authorization: BearerAuth
$config = PayZu\Pix\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new PayZu\Pix\Api\AccountApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getUser();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getUser: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.payzu.processamento.com/v1

Class Method HTTP request Description
AccountApi getUser GET /user Account Info
AccountApi getUserBalance GET /user/balance Account Balance
CallbacksApi createUserCallbackSecret POST /user/callbacks/secret Create callback secret
CallbacksApi getUserCallbackById GET /user/callbacks/{id} Get Callback
CallbacksApi getUserCallbacks GET /user/callbacks List Callbacks
CallbacksApi resendUserCallbackSingle POST /user/callbacks/resend/{transactionId} Re-send callback (single)
CallbacksApi resendUserCallbacks POST /user/callbacks/resend Re-send callbacks (bulk)
CallbacksApi resendUserCallbacksWebhook POST /user/callbacks/resend/webhook/{webhookId} Resend callbacks by webhook
CallbacksApi resendUserCallbacksWebhooks POST /user/callbacks/resend/webhook Resend webhook callbacks by filters
CallbacksApi rotateUserCallbackSecret PATCH /user/callbacks/secret/rotate Rotate callback secret
InfractionsApi getInfractions GET /user/infractions List Infractions
InfractionsApi getInfractionsById GET /user/infractions/{id} Get Infraction
InfractionsApi getInfractionsDefenseById GET /user/infractions/{infractionId}/defenses/{defenseId} Get Defense
InfractionsApi getInfractionsDefenses GET /user/infractions/{id}/defenses List Defenses
InfractionsApi postInfractionsDefense POST /user/infractions/{id}/defenses Create Defense
InternalTransferApi getInternalTransfer GET /internal-transfer Get internal transfer
InternalTransferApi postInternalTransfer POST /internal-transfer Create internal transfer
KeysAndDICTApi getPixKey GET /pix/key Pix key lookup (DICT)
KeysAndDICTApi getUserDict GET /user/dict Resolve DICT key
KeysAndDICTApi postPixQrcodeRead POST /pix/qrcode/read Read QR Code
PixOperationsApi getPix GET /pix Retrieve Charge
PixOperationsApi getPixQrcode GET /pix/qr-code/{transactionId} Render Pix QR code (PNG)
PixOperationsApi getProof GET /proof/{id} Get Transaction Receipt
PixOperationsApi postPix POST /pix Create Charge (Pix deposit)
RefundsApi postRefund POST /refund/{transactionId} Refund a Pix
ReportsApi downloadUserReport POST /user/report/{id}/download Download report
ReportsApi getUserBankStatement GET /user/bank-statements/{id} Get bank statement
ReportsApi getUserBankStatements GET /user/bank-statements List bank statements
ReportsApi getUserDepositPending GET /user/deposit-pending List pending deposits
ReportsApi getUserDepositPendingById GET /user/deposit-pending/{id} Get pending deposit
ReportsApi getUserReport GET /user/report/{id} Get report job status
ReportsApi getUserSummary GET /user/summary Transaction summary
ReportsApi getUserTransactionById GET /user/transactions/{id} List transaction details
ReportsApi getUserTransactions GET /user/transactions List Transactions
ReportsApi listUserReports GET /user/report List report jobs
ReportsApi postUserReport POST /user/report Generate transactions report
WebhooksApi deleteUserWebhook DELETE /user/webhooks/{id} Delete webhook
WebhooksApi getUserWebhook GET /user/webhooks/{id} Get webhook
WebhooksApi getUserWebhookSentDetail GET /user/webhooks/{id}/sent/{callbackId} Get sent callback detail
WebhooksApi getUserWebhooks GET /user/webhooks List webhooks
WebhooksApi getUserWebhooksSentQuantity GET /user/webhooks/sent/quantity Count sent callbacks
WebhooksApi patchUserWebhook PATCH /user/webhooks/{id} Update webhook
WebhooksApi postUserWebhook POST /user/webhooks Create webhook
WebhooksApi postUserWebhookRotateSecret POST /user/webhooks/{id}/rotate-secret Rotate webhook secret
WithdrawalsApi getWithdraw GET /withdraw Retrieve Withdrawal
WithdrawalsApi getWithdrawProof GET /withdraw/proof/{id} Get Withdrawal Receipt
WithdrawalsApi postWithdraw POST /withdraw Create Withdrawal (Pix key)
WithdrawalsApi postWithdrawQrcode POST /withdraw/qrcode Create Withdrawal using QR Code

Models

Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: Bearer authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.8.0
    • Package version: 2.0.0
    • Generator version: 7.22.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen