payzu-pix
v0.1.0
Published
OpenAPI client for payzu-pix
Readme
[email protected]
A TypeScript SDK client for the api.payzu.processamento.com API.
Usage
First, install the SDK from npm.
npm install payzu-pix --saveNext, try it out.
import {
Configuration,
AccountApi,
} from 'payzu-pix';
import type { GetUserRequest } from 'payzu-pix';
async function example() {
console.log("🚀 Testing payzu-pix SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: BearerAuth
accessToken: "YOUR BEARER TOKEN",
});
const api = new AccountApi(config);
const body = {
// 'application/json' | Obrigatório em toda chamada PayZu.
contentType: contentType_example,
} satisfies GetUserRequest;
try {
const data = await api.getUser(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);Documentation
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 | 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) 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 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) ReportsApi | downloadUserReport | POST /user/report/{id}/download | Download report ReportsApi | getUserReport | GET /user/report/{id} | List report job status 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 WithdrawalsApi | getPixKey | GET /pix/key | Dict Pix Key Lookup WithdrawalsApi | getWithdraw | GET /withdraw | Retrieve Withdrawal WithdrawalsApi | getWithdrawProof | GET /withdraw/proof/{id} | Get Withdrawal Receipt WithdrawalsApi | postPixQrcodeRead | POST /pix/qrcode/read | Read QR Code WithdrawalsApi | postWithdraw | POST /withdraw | Create Withdrawal (Pix key) WithdrawalsApi | postWithdrawQrcode | POST /withdraw/qrcode | Create Withdrawal using QR Code
Models
- CallbackDetail
- CallbackListResponse
- CallbackListResponsePagination
- Defense
- DefenseFilesInner
- DownloadUserReport200Response
- GetPix400Response
- GetPixKey400Response
- GetPixKey404Response
- GetProof200Response
- GetUser200Response
- GetUser200ResponseDailyWithdrawLimit
- GetUser200ResponseServiceFee
- GetUserBalance200Response
- GetUserTransactionById200Response
- GetUserTransactionById200ResponseAllOfCallbackLogsInner
- GetUserTransactionById200ResponseAllOfInfractionsInner
- GetUserTransactions200Response
- InfractionDetail
- InfractionDetailTransaction
- InfractionListResponse
- InfractionListResponsePagination
- ListUserReports200Response
- PixKeyInfo
- PostInternalTransferRequest
- PostPixQrcodeRead400Response
- PostPixQrcodeReadRequest
- PostPixRequest
- PostUserReportRequest
- PostWithdrawQrcode400Response
- PostWithdrawQrcodeRequest
- PostWithdrawRequest
- QRCodeReadResponse
- ReportJob
- ResendUserCallbackSingle200Response
- ResendUserCallbacks200Response
- ResendUserCallbacksRequest
- Transaction
- TransactionInfraction
Authorization
Authentication schemes defined for the API:
BearerAuth
- Type: HTTP Bearer Token authentication
About
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
1.5.0 - Package version:
0.1.0 - Generator version:
7.22.0 - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
For more information, please visit https://suporte.payzu.com.br
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run buildPublishing
Once you've built the package, you can publish it to npm:
npm publish