Skip to main content

PayZu Pix API

Project description

payzu-pix

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
  • Go: go get github.com/PayZuPlus/payzu-sdks/go
  • PHP: composer require payzu/pix

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

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

  • API version: 1.7.0
  • Package version: 0.1.0
  • Generator version: 7.22.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://suporte.payzu.com.br

Requirements.

Python 3.10+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import payzu_pix

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import payzu_pix

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import payzu_pix
from payzu_pix.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.payzu.processamento.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = payzu_pix.Configuration(
    host = "https://api.payzu.processamento.com/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: BearerAuth
configuration = payzu_pix.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with payzu_pix.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = payzu_pix.AccountApi(api_client)

    try:
        # Account Info
        api_response = api_instance.get_user()
        print("The response of AccountApi->get_user:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AccountApi->get_user: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
AccountApi get_user GET /user Account Info
AccountApi get_user_balance GET /user/balance Account Balance
CallbacksApi get_user_callback_by_id GET /user/callbacks/{id} Get Callback
CallbacksApi get_user_callbacks GET /user/callbacks List Callbacks
CallbacksApi resend_user_callback_single POST /user/callbacks/resend/{transactionId} Re-send callback (single)
CallbacksApi resend_user_callbacks POST /user/callbacks/resend Re-send callbacks (bulk)
InfractionsApi get_infractions GET /user/infractions List Infractions
InfractionsApi get_infractions_by_id GET /user/infractions/{id} Get Infraction
InfractionsApi get_infractions_defense_by_id GET /user/infractions/{infractionId}/defenses/{defenseId} Get Defense
InfractionsApi get_infractions_defenses GET /user/infractions/{id}/defenses List Defenses
InfractionsApi post_infractions_defense POST /user/infractions/{id}/defenses Create Defense
InternalTransferApi get_internal_transfer GET /internal-transfer Get internal transfer
InternalTransferApi post_internal_transfer POST /internal-transfer Create internal transfer
PixOperationsApi get_pix GET /pix Retrieve Charge
PixOperationsApi get_pix_qrcode GET /pix/qr-code/{transactionId} Render Pix QR code (PNG)
PixOperationsApi get_proof GET /proof/{id} Get Transaction Receipt
PixOperationsApi post_pix POST /pix Create Charge (Pix deposit)
ReportsApi download_user_report POST /user/report/{id}/download Download report
ReportsApi get_user_report GET /user/report/{id} Get report job status
ReportsApi get_user_transaction_by_id GET /user/transactions/{id} List transaction details
ReportsApi get_user_transactions GET /user/transactions List Transactions
ReportsApi list_user_reports GET /user/report List report jobs
ReportsApi post_user_report POST /user/report Generate transactions report
WithdrawalsApi get_pix_key GET /pix/key Dict Pix Key Lookup
WithdrawalsApi get_withdraw GET /withdraw Retrieve Withdrawal
WithdrawalsApi get_withdraw_proof GET /withdraw/proof/{id} Get Withdrawal Receipt
WithdrawalsApi post_pix_qrcode_read POST /pix/qrcode/read Read QR Code
WithdrawalsApi post_withdraw POST /withdraw Create Withdrawal (Pix key)
WithdrawalsApi post_withdraw_qrcode POST /withdraw/qrcode Create Withdrawal using QR Code

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: Bearer authentication

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

payzu_pix-0.1.0.tar.gz (64.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

payzu_pix-0.1.0-py3-none-any.whl (121.8 kB view details)

Uploaded Python 3

File details

Details for the file payzu_pix-0.1.0.tar.gz.

File metadata

  • Download URL: payzu_pix-0.1.0.tar.gz
  • Upload date:
  • Size: 64.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for payzu_pix-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f58974407bef65eb4eb10131ffe85367b1edc451eba65af4d4f63aee07374e5f
MD5 8041bf3a2b1eef1c34028282626e5ba5
BLAKE2b-256 c1a2e847673741fe8e26395f7301da72019bd4d684ef016bb5012ecf1d3b9e50

See more details on using hashes here.

File details

Details for the file payzu_pix-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: payzu_pix-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 121.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for payzu_pix-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b651aab9e97221f94b74ca61e1ff7973bb6c8a889b7bad53e1b2986fa1296ffa
MD5 a5c803e59ab35ed1dbc8b8fbc2ee9c4e
BLAKE2b-256 ce4621b1b1ebd543daeb4ad9739494783e2299822ef4a57abf4fc5aab0abcf85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page