tempest_fastapi_sdk.integrations.payment.openpix¶
A superfície do OpenPix: cliente, schemas e webhook.
OpenPixClient
¶
OpenPixClient(client: HTTPClient)
Client for Woovi (version 1.0.0).
Initialize the client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
HTTPClient
|
The transport to issue requests
through. Build it with
|
required |
get_charge_qr_code_base64
async
¶
Get a base64 encoded QR Code image from a Charge.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
charge ID, payment link ID, or QR code ID |
required |
size
|
str | None
|
Size for the image. This size should be between 600 and 4096. If the size parameter is not passed, the default value will be 1024. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
GetChargeQrCodeBase64Response |
GetChargeQrCodeBase64Response
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 500. |
list_accounts
async
¶
list_accounts(
*, email: str | None = None, skip: int | None = None, limit: int | None = None
) -> ListAccountsResponse
Get a list of Accounts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
email
|
str | None
|
You can use the email to filter accounts. Omitted from the query when None. |
None
|
skip
|
int | None
|
Number of items to skip for pagination. Omitted from the query when None. |
None
|
limit
|
int | None
|
Maximum number of items to return. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ListAccountsResponse |
ListAccountsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
duplicate_account
async
¶
Duplicates the Account.
Duplicates the account associated with the authorization appId. Requires the bank account feature to be enabled.
Returns:
| Name | Type | Description |
|---|---|---|
DuplicateAccountResponse |
DuplicateAccountResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403. |
get_account_register
async
¶
Get account register by CorrelationID.
Retrieves an existing account registration by CorrelationID
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
CorrelationID of the account register |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetAccountRegisterResponse |
GetAccountRegisterResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 404, 500. |
delete_account_register
async
¶
Delete an account registration.
Deletes an account registration that is in PENDING status
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
CorrelationID of the account register to delete |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DeleteAccountRegisterResponse |
DeleteAccountRegisterResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 404, 500. |
get_account
async
¶
Get an Account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
str
|
ID of the Account |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetAccountResponse |
GetAccountResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
close_account
async
¶
Close an Account.
Closes an Account.
Notes: - Accounts with balance cannot be closed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
str
|
ID of the Account |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CloseAccountResponse |
CloseAccountResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403, 404, 500. |
withdraw_from_account
async
¶
withdraw_from_account(
account_id: str, *, body: WithdrawFromAccountBody
) -> WithdrawFromAccountResponse
Withdraw from an Account.
An additional fee may be charged depending on the minimum free withdrawal amount. See more about at https://developers.openpix.com.br/docs/FAQ/faq-virtual-account/#onde-posso-consultar-as-taxas-da-minha-conta-virtual
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
str
|
ID of the Account |
required |
body
|
WithdrawFromAccountBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
WithdrawFromAccountResponse |
WithdrawFromAccountResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_anticipation_requests
async
¶
list_anticipation_requests(
*, status: AnticipationRequestStatus | None = None, limit: int | None = None
) -> ListAnticipationRequestsResponse
List anticipation requests.
Lists the company's anticipation requests. Poll ?status=PENDING to discover
requests awaiting your approval before settlement. Requires the
anticipation.request.read scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status
|
AnticipationRequestStatus | None
|
Filter by status. Omitted from the query when None. |
None
|
limit
|
int | None
|
Max items to return (default 100, capped at 1000). Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ListAnticipationRequestsResponse |
ListAnticipationRequestsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
sync_anticipation_balances
async
¶
sync_anticipation_balances(
*, body: AnticipationBalanceBatchPayload
) -> AnticipationBalanceBatchResult
Bulk-sync beneficiary balances.
Absolute set of availableAmount/maxAdvanceableAmount for up to 1000 beneficiaries in one call (nightly payroll sync). Returns a per-item report so partial failures can be reconciled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
AnticipationBalanceBatchPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AnticipationBalanceBatchResult |
AnticipationBalanceBatchResult
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403. |
create_anticipation_beneficiary
async
¶
create_anticipation_beneficiary(
*, body: AnticipationBeneficiaryCreatePayload, return_existing: bool | None = None
) -> CreateAnticipationBeneficiaryResponse
Register a beneficiary.
Registers a beneficiary bound to the company resolved from the app_id.
Idempotent on the payout key: send ?return_existing=true to get the existing
beneficiary (200) instead of a 409.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
AnticipationBeneficiaryCreatePayload
|
The request body. |
required |
return_existing
|
bool | None
|
When |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
CreateAnticipationBeneficiaryResponse |
CreateAnticipationBeneficiaryResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 409. |
activate_anticipation_beneficiary
async
¶
Activate a beneficiary.
Reactivates a beneficiary previously deactivated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tax_id
|
str
|
Payout key (CPF or CNPJ), with or without mask. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ActivateAnticipationBeneficiaryResponse |
ActivateAnticipationBeneficiaryResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404. |
deactivate_anticipation_beneficiary
async
¶
Deactivate a beneficiary.
Deactivates a beneficiary; blocks new anticipations and app login.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tax_id
|
str
|
Payout key (CPF or CNPJ), with or without mask. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DeactivateAnticipationBeneficiaryResponse |
DeactivateAnticipationBeneficiaryResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404. |
approve_anticipation
async
¶
Approve an anticipation request.
Approves a PENDING request and triggers the Pix Out to the beneficiary.
Idempotent: re-approving an already-approved request returns 200 with the
current state; a rejected/terminal one returns 409. Requires the
anticipation.request.approve scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Anticipation request id. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ApproveAnticipationResponse |
ApproveAnticipationResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 409. |
reject_anticipation
async
¶
reject_anticipation(
id: str, *, body: RejectAnticipationBody | None = None
) -> RejectAnticipationResponse
Reject an anticipation request.
Rejects a PENDING request (releases the reserved cycle limit). Idempotent:
re-rejecting a canceled request returns 200; an approved/terminal one returns
409. Requires the anticipation.request.approve scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Anticipation request id. |
required |
body
|
RejectAnticipationBody
|
The request body. Optional. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
RejectAnticipationResponse |
RejectAnticipationResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 409. |
create_application
async
¶
Create a new application.
Creates a new application for a company. If the company has the APPLICATION_SCOPES_REQUIRED feature enabled, the scopes field is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
ApplicationPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateApplicationResponse |
CreateApplicationResponse
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403, 500. |
delete_application
async
¶
Delete an application.
Deactivates an application by setting isActive to false and adding a removedAt timestamp
Returns:
| Name | Type | Description |
|---|---|---|
DeleteApplicationResponse |
DeleteApplicationResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 404, 500. |
list_boleto_transactions
async
¶
list_boleto_transactions(
*,
type: BoletoTransactionType | None = None,
status: BoletoTransactionStatus | None = None,
start: datetime | None = None,
end: datetime | None = None,
settled_start: datetime | None = None,
settled_end: datetime | None = None,
skip: int | None = None,
limit: int | None = None,
) -> BoletoTransactionListResponse
List boleto transactions.
Lists the boleto transactions of your company, most recent first, so you can reconcile boleto receivables and payments against your own records.
A transaction is either a BOLETO_IN — a boleto your payer paid — or a
BOLETO_OUT — a boleto your company paid. All monetary values are in cents.
value is the amount that actually moved, which for a boleto paid after the due
date is above the emitted amount in charge.value because of interest and fine.
finesValue and interestsValue split that difference, as charged by the bank,
so you can reconcile an overdue boleto without recomputing it from the charge
settings. Each is absent when there was none, so a boleto paid on time carries
neither.
Two independent date ranges are offered because they answer different questions:
start/end filter by when the transaction was created, and
settledStart/settledEnd by when Woovi credited the amount to your account.
Both dates come back on every item.
Requires the BOLETO_TRANSACTION_GET_LIST scope on the application.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type
|
BoletoTransactionType | None
|
Only transactions of this type. Omitted from the query when None. |
None
|
status
|
BoletoTransactionStatus | None
|
Only transactions in this status. Omitted from the query when None. |
None
|
start
|
datetime | None
|
Only transactions created from this date on. Omitted from the query when None. |
None
|
end
|
datetime | None
|
Only transactions created up to this date. Omitted from the query when None. |
None
|
settled_start
|
datetime | None
|
Only transactions settled from this date on. Omitted from the query when None. |
None
|
settled_end
|
datetime | None
|
Only transactions settled up to this date. Omitted from the query when None. |
None
|
skip
|
int | None
|
Rows to skip. Capped at 10000 — past that, narrow the window with the date filters instead of paginating deeper. Omitted from the query when None. |
None
|
limit
|
int | None
|
Rows to return. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
BoletoTransactionListResponse |
BoletoTransactionListResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 422. |
get_boleto_transaction
async
¶
Get a boleto transaction.
Returns one boleto transaction of your company.
The id is the boletoTransactionID delivered in the BOLETO_SETTLED webhook,
so you can confirm a settlement you were notified about.
Requires the BOLETO_TRANSACTION_GET scope on the application.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
boleto_transaction_id
|
str
|
The boleto transaction id, as delivered in the webhook. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetBoletoTransactionResponse |
GetBoletoTransactionResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 404. |
validate_boleto
async
¶
Validate a boleto by barcode.
Validates a boleto by its barcode before paying it. This is step 1 of the Boleto OUT flow: it confirms the amount, due date and beneficiary so you can review the boleto before creating the payment.
The barcode must have 44, 47 or 48 digits. All monetary values are returned in cents.
Requires the BOLETO_VALIDATE_POST scope on the application.
After validating, create the payment with POST /api/v1/payment using type:
"BOLETO" and the boletoBarcode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
BoletoValidateRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
BoletoValidateResponse |
BoletoValidateResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403. |
create_cashback_fidelity
async
¶
Get or create cashback for a customer.
Create a new cashback exclusive for the customer with a given taxID. If the customer already has a pending excluisve cashback, this endpoint will return it instead.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreateCashbackFidelityBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateCashbackFidelityResponse |
CreateCashbackFidelityResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_cashback_fidelity_balance
async
¶
Get the exclusive cashback amount an user still has to receive by taxID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tax_id
|
str
|
The raw tax ID from the customer you want to get the balance. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetCashbackFidelityBalanceResponse |
GetCashbackFidelityBalanceResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_charges
async
¶
list_charges(
*,
start: datetime | None = None,
end: datetime | None = None,
status: ChargeStatus | None = None,
customer: str | None = None,
subscription: str | None = None,
) -> ListChargesResponse
Get a list of charges.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
datetime | None
|
The start value. Omitted from the query when None. |
None
|
end
|
datetime | None
|
The end value. Omitted from the query when None. |
None
|
status
|
ChargeStatus | None
|
The status value. Omitted from the query when None. |
None
|
customer
|
str | None
|
Customer Correlation ID. Omitted from the query when None. |
None
|
subscription
|
str | None
|
Subscription Correlation ID. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ListChargesResponse |
ListChargesResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_charge
async
¶
create_charge(
*, body: ChargePayload, return_existing: bool | None = None
) -> CreateChargeResponse
Create a new Charge.
Endpoint to create a new Charge for a customer.
Split¶
You can split the value of a charge across other accounts by sending the
splits array in the request body. Each item accepts:
value: amount in cents that will be split to the destination. -pixKey: Pix key of the account that will receive this split. -splitType: how the split is processed — one ofSPLIT_INTERNAL_TRANSFER,SPLIT_SUB_ACCOUNTorSPLIT_PARTNER. See how each split type is processed.
See the Charge with Split Internal Transfer and Charge with Split Subaccounts request body examples below for the full payload shape.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
ChargePayload
|
The request body. |
required |
return_existing
|
bool | None
|
Make the endpoint idempotent, will return an existent charge if already has a one with the correlationID. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
CreateChargeResponse |
CreateChargeResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_charge
async
¶
Get one charge.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
charge ID or correlation ID. You will need URI encoding if your correlation ID has characters outside the ASCII set or reserved characters (%, #, /). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetChargeResponse |
GetChargeResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
update_charge
async
¶
Edit expiration date of a charge.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
correlation ID. You will need URI encoding if your correlation ID has characters outside the ASCII set or reserved characters (%, #, /). |
required |
body
|
ChargePatchPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UpdateChargeResponse |
UpdateChargeResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
delete_charge
async
¶
Delete a charge.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
charge ID or correlation ID. You will need URI encoding if your correlation ID has characters outside the ASCII set or reserved characters (%, #, /). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DeleteChargeResponse |
DeleteChargeResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_charge_refunds
async
¶
Get all refunds of a charge.
Endpoint to get all refunds of a charge
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The correlation ID of the charge. You will need URI encoding if your correlation ID has characters outside the ASCII set or reserved characters (%, #, /). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ListChargeRefundsResponse |
ListChargeRefundsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
refund_charge
async
¶
Create a new refund for a charge.
Endpoint to create a new refund for a charge
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The correlation ID of the charge. You will need URI encoding if your correlation ID has characters outside the ASCII set or reserved characters (%, #, /). |
required |
body
|
ChargeRefundPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
RefundChargeResponse |
RefundChargeResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_company
async
¶
Get a Company.
Returns:
| Name | Type | Description |
|---|---|---|
GetCompanyResponse |
GetCompanyResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_customers
async
¶
Get a list of customers.
Returns:
| Name | Type | Description |
|---|---|---|
ListCustomersResponse |
ListCustomersResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_customer
async
¶
Create a new Customer.
Endpoint to create a new Customer
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CustomerPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateCustomerResponse |
CreateCustomerResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_customer
async
¶
Get one customer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Correlation ID or Tax ID |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetCustomerResponse |
GetCustomerResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
update_customer
async
¶
Update a Customer.
Endpoint to update a Customer
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
correlation ID |
required |
body
|
CustomerPatchPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UpdateCustomerResponse |
UpdateCustomerResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
decode_emv
async
¶
Parse EMV (PIX) QR code and optionally resolve COB/REC locations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
DecodeEmvBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DecodeEmvResponse |
DecodeEmvResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 500. |
list_disputes
async
¶
list_disputes(
*, start: datetime | None = None, end: datetime | None = None
) -> ListDisputesResponse
Get a list of disputes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
datetime | None
|
The start value. Omitted from the query when None. |
None
|
end
|
datetime | None
|
The end value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ListDisputesResponse |
ListDisputesResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_dispute
async
¶
Get one dispute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id must be the endToEndId of the transaction that originated the Dispute |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetDisputeResponse |
GetDisputeResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 500. |
upload_dispute_evidence
async
¶
upload_dispute_evidence(
id: str, *, body: UploadDisputeEvidenceBody
) -> UploadDisputeEvidenceResponse
Upload new evidence.
Upload evidence files for a dispute (MED).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
id of the dispute the evidence belongs to |
required |
body
|
UploadDisputeEvidenceBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UploadDisputeEvidenceResponse |
UploadDisputeEvidenceResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403. |
upload_file
async
¶
upload_file(
*, file: bytes, purpose: FilePurpose, correlation_id: str | None = None
) -> FilePayload
Upload a file.
Uploads a file and returns its metadata with a pre-signed download URL. The file
is sent as multipart/form-data on the file field, together with the
purpose that describes what the file is for.
Send exactly one file per request, of one of the supported content types, up to
10 MiB (10485760 bytes).
When you send a correlationID, repeating the request with the same
correlationID and purpose returns the file already stored (200) instead of
uploading a second copy, so the request is safe to retry. Without a
correlationID one is generated for you and every call stores a new file.
The url in the response is temporary and expires at urlExpiresAt; ask for
the file again to get a fresh one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
bytes
|
The file itself. Its content type must be one of
|
required |
purpose
|
FilePurpose
|
What the file will be used for |
required |
correlation_id
|
str | None
|
Your own identifier for this upload. Reusing it for the same purpose returns the file stored on the first call. Defaults to a generated UUID. Omitted from the form body when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
FilePayload |
FilePayload
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 413, 415, 502. |
create_funds_recovery
async
¶
Open a funds recovery (MED).
Endpoint to open a funds recovery (MED) for a Pix transaction sent from your account.
Only one funds recovery can be opened per transaction. The transaction must have been sent from your account and cannot have been rejected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
FundsRecoveryPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
FundsRecovery |
FundsRecovery
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404, 422. |
get_funds_recovery
async
¶
Get one funds recovery (MED).
Endpoint to get a funds recovery (MED). Use it to follow the progress of the
funds recovery through the status and events fields.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
UUID
|
The |
required |
Returns:
| Name | Type | Description |
|---|---|---|
FundsRecovery |
FundsRecovery
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404. |
cancel_funds_recovery
async
¶
Cancel a funds recovery (MED).
Endpoint to cancel a funds recovery (MED). The request does not need a body.
Only funds recoveries opened by your account that have not reached a terminal
status (COMPLETED or CANCELLED) can be cancelled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
UUID
|
The |
required |
Returns:
| Name | Type | Description |
|---|---|---|
FundsRecovery |
FundsRecovery
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404, 422. |
get_installment
async
¶
Get one installment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The globalID of the installment or the endToEndId from transaction. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetInstallmentResponse |
GetInstallmentResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_installment_cobr
async
¶
create_installment_cobr(
id: str, *, body: CreateInstallmentCobrBody | None = None
) -> dict[str, Any]
Create a new Cobr Manually.
Create a new Cobr Manually.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The globalID of the installment. |
required |
body
|
CreateInstallmentCobrBody
|
The request body. Optional. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
retry_installment_cobr
async
¶
retry_installment_cobr(
id: str, *, body: RetryInstallmentCobrBody | None = None
) -> dict[str, Any]
Create a new Retry Manually.
Create a new Retry Manually.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The globalID of the installment. |
required |
body
|
RetryInstallmentCobrBody
|
The request body. Optional. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_invoices
async
¶
list_invoices(
*,
start: str | None = None,
end: str | None = None,
skip: int | None = None,
limit: int | None = None,
) -> Any
Get invoices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
str | None
|
The start value. Omitted from the query when None. |
None
|
end
|
str | None
|
The end value. Omitted from the query when None. |
None
|
skip
|
int | None
|
The skip value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403. |
create_invoice
async
¶
Create a new invoice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
Any
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateInvoiceResponse |
CreateInvoiceResponse
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403. |
get_invoice_integration
async
¶
Get the NFe.io integration status and config for the authenticated company.
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401, 403, 404. |
upsert_invoice_integration
async
¶
upsert_invoice_integration(
*, body: UpsertInvoiceIntegrationBody | None = None
) -> UpsertInvoiceIntegrationResponse
Create or upsert the NFe.io integration for the authenticated company.
Upserts the NFe.io integration for the authenticated company and sets its tax fields. Optionally activates it (only allowed once configured).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
UpsertInvoiceIntegrationBody
|
The request body. Optional. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
UpsertInvoiceIntegrationResponse |
UpsertInvoiceIntegrationResponse
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404, 409. |
update_invoice_integration_tax_fields
async
¶
update_invoice_integration_tax_fields(
*, body: UpdateInvoiceIntegrationTaxFieldsBody
) -> UpdateInvoiceIntegrationTaxFieldsResponse
Update the tax fields of the invoice integration.
Updates the tax configuration of the authenticated company's existing NFEIO integration (city service code, municipal subscription, rps number, special tax, tax regime, legal nature and tax determination fields). The integration must already exist; otherwise a 404 is returned. The response never echoes credentials.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
UpdateInvoiceIntegrationTaxFieldsBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UpdateInvoiceIntegrationTaxFieldsResponse |
UpdateInvoiceIntegrationTaxFieldsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 404. |
set_invoice_integration_status
async
¶
set_invoice_integration_status(
*, body: SetInvoiceIntegrationStatusBody
) -> SetInvoiceIntegrationStatusResponse
Activate or deactivate the NFe.io integration for the authenticated company.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
SetInvoiceIntegrationStatusBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SetInvoiceIntegrationStatusResponse |
SetInvoiceIntegrationStatusResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404. |
upload_invoice_integration_certificate
async
¶
upload_invoice_integration_certificate(
*, body: UploadInvoiceIntegrationCertificateBody
) -> UploadInvoiceIntegrationCertificateResponse
Upload the NFe.io A1 certificate for the invoice integration.
Uploads the company's NFe.io A1 certificate (base64-encoded pkcs12) to the configured NFEIO integration. The response returns only the resulting integration status and never echoes the certificate, passphrase or credentials.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
UploadInvoiceIntegrationCertificateBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UploadInvoiceIntegrationCertificateResponse |
UploadInvoiceIntegrationCertificateResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404. |
test_invoice_integration
async
¶
Issue a NFe.io test invoice for the invoice integration.
Issues a test NFe.io invoice for the authenticated company's NFEIO integration. This is the bootstrap step that moves the integration to VALIDATING; once NFe.io confirms the test note via webhook the integration becomes CONFIGURED and active, which unblocks real invoice issuance. A configured integration can no longer issue test invoices.
Returns:
| Name | Type | Description |
|---|---|---|
TestInvoiceIntegrationResponse |
TestInvoiceIntegrationResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 404. |
cancel_invoice
async
¶
Cancel an invoice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
correlation_id
|
str
|
The correlationID value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CancelInvoiceResponse |
CancelInvoiceResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404. |
get_invoice_pdf
async
¶
Get invoice PDF document.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
correlation_id
|
str
|
The correlationID value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The 200 response body, undecoded — the operation answers application/pdf, which is handed over as bytes rather than parsed. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401, 403, 404, 500. |
get_invoice_xml
async
¶
Get invoice XML document.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
correlation_id
|
str
|
The correlationID value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The 200 response body, undecoded — the operation answers application/xml, which is handed over as bytes rather than parsed. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401, 403, 404, 500. |
create_kyc_validation
async
¶
Create a KYC validation for a Tax ID.
Screens a CPF or CNPJ against fraud, dispute, sanctions, PEP and lawsuit signals and returns a verdict.
Requires the KYC_VALIDATION feature on the company and the
KYC_VALIDATION_POST scope on the application.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
KycValidationRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
KycValidation |
KycValidation
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 502. |
get_kyc_validation
async
¶
Get a KYC validation by correlationID.
Reads back a validation created with POST /api/v1/kyc-validation/taxid, scoped
to your own company. Free — reading a validation is never billed.
Poll this until status leaves PROCESSING, or subscribe to the
KYC_VALIDATION_COMPLETED / KYC_VALIDATION_FAILED webhook events and skip the
polling entirely.
Requires the KYC_VALIDATION feature on the company and the
KYC_VALIDATION_GET scope on the application.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
correlation_id
|
str
|
The |
required |
Returns:
| Name | Type | Description |
|---|---|---|
KycValidation |
KycValidation
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401, 403, 404. |
create_kyc_onboarding
async
¶
Create a KYC onboarding.
Creates a new KYC onboarding for a merchant. Returns a link that should be sent to the merchant so they can fill in their registration data.
The API is idempotent by correlationID. If the same correlationID is sent
again for the same company, the API returns the existing onboarding link (200
OK) instead of creating a new one.
The fields officialName, tradeName and representatives[].name are
automatically populated via data enrichment when available. You do not need to
send them in the request.
If redirectUrl is provided, the merchant is automatically redirected to that
URL 5 seconds after completing the onboarding flow (terminal states: submitted,
approved, or rejected). The redirectUrl is bound to the onboarding link at
creation time and cannot be changed later — subsequent idempotent calls will
return the original value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
KycOnboardingRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateKycOnboardingResponse |
CreateKycOnboardingResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 500. |
get_account_limits
async
¶
Get account limits.
Retrieves the most recent account limits configured for a given bank account. Only the public-safe fields are returned; internal-only fields are stripped from the response.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
str
|
Bank account identifier (ObjectId) for which limits should be returned |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetAccountLimitsResponse |
GetAccountLimitsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404. |
list_partner_affiliates
async
¶
Get every affiliate company that is managed by you.
Returns:
| Name | Type | Description |
|---|---|---|
ListPartnerAffiliatesResponse |
ListPartnerAffiliatesResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_partner_application
async
¶
create_partner_application(
*, body: CreatePartnerApplicationBody
) -> CreatePartnerApplicationResponse
Create a new application to some of your preregistration's company.
As a partner company, you can create a new application to some of your companies. The application should give access to our API to this companies, so they can use it too.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreatePartnerApplicationBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreatePartnerApplicationResponse |
CreatePartnerApplicationResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403. |
list_partner_companies
async
¶
Get every preregistration that is managed by you.
Returns:
| Name | Type | Description |
|---|---|---|
ListPartnerCompaniesResponse |
ListPartnerCompaniesResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_partner_company
async
¶
Create a pre registration with a partner reference (your company).
As a partner company, you can create a new pre registration referencing your company as a partner.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
PreRegistrationPayloadObject
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PreRegistrationPayloadObject |
PreRegistrationPayloadObject
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403. |
get_partner_company
async
¶
Get an specific preregistration via taxID param.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tax_id
|
str
|
The raw tax ID from the preregistration that you want to get. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetPartnerCompanyResponse |
GetPartnerCompanyResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_payments
async
¶
Get a list of payments.
Returns:
| Name | Type | Description |
|---|---|---|
ListPaymentsResponse |
ListPaymentsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_payment
async
¶
Create a Payment Request.
Endpoint to request a payment. Supports four payment types: Pix Key (PIX_KEY),
QR Code (QR_CODE), Manual (MANUAL), and Boleto (BOLETO).
For QR Code payments, the system decodes the BR Code string and extracts the destination and value automatically.
For Boleto payments, send type: "BOLETO" and the boletoBarcode. The amount,
due date and beneficiary are resolved from the boleto, so value and
destination are not sent in the body. Validate the barcode first with POST
/api/v1/boleto/validate.
Set autoApprove: true to create and immediately approve the payment in a
single call, returning the enriched response with transaction and destination
data. Without this flag, the payment is created in CREATED status and can be
approved later via POST /api/v1/payment/approve.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreatePaymentBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreatePaymentResponse |
CreatePaymentResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
approve_payment
async
¶
Approve a Payment Request.
Endpoint to approve a payment
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
PaymentApprovePayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ApprovePaymentResponse |
ApprovePaymentResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_payment
async
¶
Get one Payment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
payment ID or correlation ID |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetPaymentResponse |
GetPaymentResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_pix_keys
async
¶
Get all Pix keys.
Retrieves a list of all Pix keys
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
skip
|
int | None
|
The skip value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ListPixKeysResponse |
ListPixKeysResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403. |
create_pix_key
async
¶
Create a new Pix key.
Creates a new Pix key
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
PixKeyCreate
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PixKey |
PixKey
|
The 201 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403. |
check_pix_key
async
¶
Check data from a Pix key.
Get data from a Pix key if it exists.
This endpoint is not enabled by default. It queries the DICT for the holder of a Pix key that is not yours, so it has to be requested from support and goes through an internal review before being turned on. Calls are billed per query.
If what you need is to confirm that an account belongs to who you expect, use bank data validation instead — it is available to every account with no approval:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CheckPixKeyBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PixKeyCheck |
PixKeyCheck
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404, 429. |
list_pix_key_tokens
async
¶
Get tokens data.
Returns:
| Name | Type | Description |
|---|---|---|
PixKeyTokens |
PixKeyTokens
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
list_pix_key_token_logs
async
¶
list_pix_key_token_logs(
*,
skip: int | None = None,
limit: int | None = None,
company_bank_account: str | None = None,
) -> ListPixKeyTokenLogsResponse
Get token bucket logs.
Get a list of token bucket operation logs
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
skip
|
int | None
|
The skip value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
company_bank_account
|
str | None
|
Filter logs by company bank account ID. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ListPixKeyTokenLogsResponse |
ListPixKeyTokenLogsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403. |
delete_pix_key
async
¶
Delete a Pix key.
Deletes a specific Pix key, you cannot delete the default pix key
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pix_key
|
str
|
The Pix key to delete |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 204 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404. |
check_pix_key_by_key
async
¶
Check data from a Pix key.
Get data from a Pix key if it exists.
This endpoint is not enabled by default. It queries the DICT for the holder of a Pix key that is not yours, so it has to be requested from support and goes through an internal review before being turned on. Calls are billed per query.
If what you need is to confirm that an account belongs to who you expect, use bank data validation instead — it is available to every account with no approval:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pix_key
|
str
|
The Pix key to check |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PixKeyCheck |
PixKeyCheck
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 404, 429. |
set_default_pix_key
async
¶
Set a pix key as default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pix_key
|
str
|
The pix key to set as default |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PixKey |
PixKey
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
list_psps
async
¶
list_psps(
*, ispb: str | None = None, name: str | None = None, compe: str | None = None
) -> ListPspsResponse
Get a list of PSPs (Payment Service Providers).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ispb
|
str | None
|
Filter PSPs by ISPB code. Omitted from the query when None. |
None
|
name
|
str | None
|
Filter PSPs by name. Omitted from the query when None. |
None
|
compe
|
str | None
|
Filter PSPs by COMPE code. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ListPspsResponse |
ListPspsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 500. |
list_static_qr_codes
async
¶
Get a list of Pix QrCodes.
Returns:
| Name | Type | Description |
|---|---|---|
ListStaticQrCodesResponse |
ListStaticQrCodesResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_static_qr_code
async
¶
Create a new Pix QrCode Static.
Endpoint to create a new Pix QrCode Static
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
PixQrCodePayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateStaticQrCodeResponse |
CreateStaticQrCodeResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_static_qr_code
async
¶
Get one Pix QrCode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
pixQrCode ID, correlation ID or emv identifier |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetStaticQrCodeResponse |
GetStaticQrCodeResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
delete_static_qr_code
async
¶
Delete a Pix QrCode Static.
Endpoint to delete a Pix QrCode Static
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
QrCode ID, correlationID or identifier |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DeleteStaticQrCodeResponse |
DeleteStaticQrCodeResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_receipt
async
¶
Get a PDF document related to a payment transaction formatted as a receipt by type (pix-in, pix-out or pix-refund).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
receipt_type
|
GetReceiptReceiptType
|
The ReceiptType from the payment transaction to export. |
required |
end_to_end_id
|
str
|
The EndToEndId from the payment transaction to export. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The 200 response body, undecoded — the operation answers application/pdf, which is handed over as bytes rather than parsed. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
list_refunds
async
¶
Get a list of refunds.
Returns:
| Name | Type | Description |
|---|---|---|
ListRefundsResponse |
ListRefundsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_refund
async
¶
Create a new refund.
Endpoint to create a new refund for a customer
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
RefundPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateRefundResponse |
CreateRefundResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_refund
async
¶
Get one refund.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
refund ID or correlation ID |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetRefundResponse |
GetRefundResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_stablecoin_deposit
async
¶
Create a stablecoin deposit.
Creates a stablecoin deposit (PIX-in to stable-out) for a company. The deposit converts a BRL amount (in cents) into the requested stablecoin on the chosen network and returns a quote with the applied fees.
The company must have a stable subaccount in CONFIRMED status (a completed
KYB). Otherwise the request is rejected with a 400.
Not every asset is available on every network. The supported matrix is: - USDT: POLYGON, ETHEREUM, CELO, TRON, BNB - USDC: POLYGON, ETHEREUM, BASE, CELO, BNB - BRLA: POLYGON, ETHEREUM, BASE, CELO
If network is omitted it defaults to POLYGON. Sending an asset/network
combination outside the matrix above returns a 400.
Idempotency is supported via correlationId.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
StablecoinDepositRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
StablecoinDepositResponse |
StablecoinDepositResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
approve_stablecoin_deposit
async
¶
approve_stablecoin_deposit(
*, body: ApproveStablecoinDepositBody
) -> ApproveStablecoinDepositResponse
Approve (settle) a stablecoin deposit.
Approves a previously created stablecoin deposit identified by its
correlationId, triggering the on-chain settlement (pay the stable qrcode) for
the company's deposit.
The deposit moves to PROCESSING while settlement is in flight. The call is
rejected with 400 when the deposit cannot be approved, e.g. it was already
COMPLETED, it is already PROCESSING, there is no source account to pay it,
or the provider quote/payment fails.
Requires the STABLECOIN_DEPOSIT_CREATE scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
ApproveStablecoinDepositBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ApproveStablecoinDepositResponse |
ApproveStablecoinDepositResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
get_stablecoin_payout_by_correlation_id
async
¶
Get the current status of a payout by correlationId.
Same as GET /api/v1/stablecoin/payout/{payoutId}, looked up by the
correlationId sent on create.
Requires the STABLECOIN_PAYOUT_CREATE scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
correlation_id
|
str
|
The idempotency key sent on create. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404. |
create_stablecoin_payout
async
¶
Pay out INTERNAL balance to BRL via Pix.
Converts a stablecoin balance held on the company's INTERNAL float into BRL and
sends it to the given Pix key. Supported input assets: USDT, USDC, BRLA.
value is the amount to spend from the INTERNAL balance, in cents of the input
asset. The subaccount is resolved from the Application's companyBankAccount,
same as the wallets endpoint.
Flow: balance check → consume Woovi OUT limit → resolve Pix beneficiary → provider quote/ticket. There is no deposit or approval step.
Fund the INTERNAL float first via GET /api/v1/stablecoin/wallets (send
USDT/USDC/BRLA on-chain to a returned address), then call this endpoint.
Idempotency is supported via correlationId: reusing one returns the payout
already created for it.
Requires the STABLECOIN_PAYOUT_CREATE scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreateStablecoinPayoutBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateStablecoinPayoutResponse |
CreateStablecoinPayoutResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401. |
quote_stablecoin_payout
async
¶
quote_stablecoin_payout(
*, value: int, currency: StablecoinDepositRequestCurrency
) -> QuoteStablecoinPayoutResponse
Quote an INTERNAL balance off-ramp to BRL via Pix.
Returns a quote for converting a stablecoin balance held on the company's
INTERNAL float into BRL delivered via Pix. Supported input assets: USDT,
USDC, BRLA.
value is the amount to spend from the INTERNAL balance, in cents of the input
asset.
Requires the STABLECOIN_PAYOUT_CREATE scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
int
|
Amount to quote, in cents of the input asset. |
required |
currency
|
StablecoinDepositRequestCurrency
|
Stablecoin asset to spend from the INTERNAL balance. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
QuoteStablecoinPayoutResponse |
QuoteStablecoinPayoutResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 502. |
get_stablecoin_payout
async
¶
Get the current status of a payout.
Returns the current state of a payout created through POST
/api/v1/stablecoin/payout.
While the payout is still in flight the provider ticket is re-read and the payout is updated before responding. Terminal payouts are served from storage.
Requires the STABLECOIN_PAYOUT_CREATE scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payout_id
|
str
|
The |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401, 404. |
get_stablecoin_quote
async
¶
get_stablecoin_quote(
*, value: int, currency: StablecoinDepositRequestCurrency | None = None
) -> GetStablecoinQuoteResponse
Get a stablecoin quote without creating a deposit.
Returns a PIX (BRL) -> stablecoin quote for the given value and currency
without creating a deposit. Use it to display the exact amount of stablecoin the
customer would receive before confirming.
The quote is fetched from the provider and cached for 60 seconds.
Requires the STABLECOIN_DEPOSIT_CREATE scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
int
|
Amount to quote, in cents (BRL). Must be positive. |
required |
currency
|
StablecoinDepositRequestCurrency | None
|
Stablecoin to receive. Defaults to USDT. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
GetStablecoinQuoteResponse |
GetStablecoinQuoteResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 502. |
list_stablecoin_subaccounts
async
¶
List a company's stablecoin subaccounts.
Lists the authenticated company's stablecoin subaccounts, most recent first.
A subaccount is created when the company completes a KYB with the stablecoin
provider. Use this endpoint to discover the subAccountId values available to
the company.
Requires the STABLECOIN_SUBACCOUNT_LIST scope.
Returns:
| Name | Type | Description |
|---|---|---|
StablecoinSubAccountListResponse |
StablecoinSubAccountListResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401. |
create_stablecoin_subaccount
async
¶
create_stablecoin_subaccount(
*, body: StablecoinSubAccountCreateRequest
) -> StablecoinSubAccountCreateResponse
Request a new stablecoin subaccount (KYB).
Requests the creation of a stablecoin subaccount for the authenticated company, reusing the KYC data already on the referenced account register.
Pass the company's accountRegisterId; the provider subaccount is created
immediately and a StableSubAccount is persisted with status IN_REVIEW while
the KYB is processed. When the KYB resolves, the merchant receives a
STABLECOIN_SUBACCOUNT_CONFIRMED or STABLECOIN_SUBACCOUNT_REJECTED webhook.
The request is idempotent on accountRegisterId: a repeat call returns the
existing subaccount (HTTP 200) instead of creating a duplicate. The first,
creating call returns HTTP 201.
Requires the STABLECOIN_SUBACCOUNT_CREATE scope and the company STABLECOIN
feature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
StablecoinSubAccountCreateRequest
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
StablecoinSubAccountCreateResponse |
StablecoinSubAccountCreateResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 502. |
get_stablecoin_subaccount
async
¶
Get a stablecoin subaccount by id.
Fetches a single stablecoin subaccount for the authenticated company by its
provider subAccountId.
Returns 404 when no subaccount with that subAccountId exists for the
company.
Requires the STABLECOIN_SUBACCOUNT_LIST scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sub_account_id
|
str
|
The provider subaccount id. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
StablecoinSubAccountGetResponse |
StablecoinSubAccountGetResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401, 404. |
get_stablecoin_subaccount_balances
async
¶
get_stablecoin_subaccount_balances(
sub_account_id: str,
) -> GetStablecoinSubaccountBalancesResponse
Read the INTERNAL balances of a subaccount's float.
Returns the provider's INTERNAL balance per asset for this subaccount — exactly
the balance POST /api/v1/stablecoin/payout debits.
Poll this after sending funds to one of the addresses from GET
/api/v1/stablecoin/wallets (or the subaccount wallets route) and only create
the payout once the credit has landed.
Only subaccounts belonging to the authenticated company resolve; any other id
returns 404.
Requires the STABLECOIN_SUBACCOUNT_LIST scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sub_account_id
|
str
|
Provider subaccount id ( |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetStablecoinSubaccountBalancesResponse |
GetStablecoinSubaccountBalancesResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401, 404, 502. |
list_stablecoin_subaccount_wallets
async
¶
list_stablecoin_subaccount_wallets(
sub_account_id: str,
) -> ListStablecoinSubaccountWalletsResponse
List the deposit addresses of a subaccount's float.
Returns the wallets the provider holds for this subaccount. Sending an asset
on-chain to one of these addresses credits the subaccount's INTERNAL balance —
the same balance POST /api/v1/stablecoin/swap spends and POST
/api/v1/stablecoin/withdraw pays out from.
Use this to resolve where to prefund instead of hardcoding an address: funding a different account's wallet leaves the swap float empty and the swap fails for lack of balance.
Only subaccounts belonging to the authenticated company resolve; any other id
returns 404.
Requires the STABLECOIN_SUBACCOUNT_LIST scope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sub_account_id
|
str
|
Provider subaccount id ( |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ListStablecoinSubaccountWalletsResponse |
ListStablecoinSubaccountWalletsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 401, 404, 502. |
list_stablecoin_wallets
async
¶
List custodian deposit wallets for the AppID bank account.
Returns the deposit addresses for the stable sub-account linked to the
authenticated Application's companyBankAccount (live from the provider — not
stored in Mongo).
A company can have more than one bank account / KYB sub-account. The sub-account
is resolved from Application.companyBankAccount (the account bound to the
AppID), not from the company alone.
Sending an asset on-chain to one of these addresses credits the INTERNAL float
used by POST /api/v1/stablecoin/payout (USDT/USDC/BRLA → Pix).
For an explicit provider id use GET
/api/v1/stablecoin/subaccount/{subAccountId}/wallets. To read the float balance
after funding use GET /api/v1/stablecoin/subaccount/{subAccountId}/balances.
Requires the STABLECOIN_SUBACCOUNT_LIST scope.
Returns:
| Name | Type | Description |
|---|---|---|
ListStablecoinWalletsResponse |
ListStablecoinWalletsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 404, 502. |
get_statement
async
¶
get_statement(
*,
start: datetime | None = None,
end: datetime | None = None,
skip: int | None = None,
limit: int | None = None,
company_bank_account: str | None = None,
) -> list[GetStatementResponseItem]
Get statement by company.
Retrieves the statement/ledger entries for a company's bank account
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
datetime | None
|
The start value. Omitted from the query when None. |
None
|
end
|
datetime | None
|
The end value. Omitted from the query when None. |
None
|
skip
|
int | None
|
The skip value. Omitted from the query when None. |
None
|
limit
|
int | None
|
The limit value. Omitted from the query when None. |
None
|
company_bank_account
|
str | None
|
Read the statement of another bank account of your company instead of the one linked to the appID. Only a MASTER application of a company with the MASTER_APP_READ_ANY_ACCOUNT feature can use it. Use the accountId returned by GET /api/v1/account. Omitted from the query when None. |
None
|
Returns:
| Type | Description |
|---|---|
list[GetStatementResponseItem]
|
list[GetStatementResponseItem]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 401, 403, 500. |
list_subaccounts
async
¶
Get a list of subaccounts.
Returns:
| Name | Type | Description |
|---|---|---|
ListSubaccountsResponse |
ListSubaccountsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_subaccount
async
¶
Create a subaccount.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
SubAccountPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateSubaccountResponse |
CreateSubaccountResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
transfer_between_subaccounts
async
¶
transfer_between_subaccounts(
*, body: SubAccountTransferPayload
) -> SubAccountTransferResponsePayload
Transfer between subaccounts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
SubAccountTransferPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SubAccountTransferResponsePayload |
SubAccountTransferResponsePayload
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_subaccount
async
¶
Get subaccount details.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
pix key registered to the subaccount |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetSubaccountResponse |
GetSubaccountResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
delete_subaccount
async
¶
Delete a Sub Account.
Deletes a Sub Account if it has no remaining balance
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Pix key registered to the subaccount |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DeleteSubaccountResponse |
DeleteSubaccountResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403. |
credit_subaccount
async
¶
Credit subaccount.
Transfers the amount from the main account to the subaccount.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Pix key registered to the subaccount |
required |
body
|
CreditSubaccountBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreditSubaccountResponse |
CreditSubaccountResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403. |
debit_subaccount
async
¶
Debit subaccount.
Transfers the amount from the subaccount to the main account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Pix key registered to the subaccount |
required |
body
|
DebitSubaccountBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DebitSubaccountResponse |
DebitSubaccountResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403. |
get_subaccount_statement
async
¶
get_subaccount_statement(
id: str,
*,
skip: int | None = None,
limit: int | None = None,
start: datetime | None = None,
end: datetime | None = None,
) -> list[GetSubaccountStatementResponseItem]
Get Sub Account statement.
Returns the ledger entries (statement) for a specific subaccount.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Pix key registered to the subaccount |
required |
skip
|
int | None
|
Number of entries to skip for pagination. Omitted from the query when None. |
None
|
limit
|
int | None
|
Maximum number of entries to return. Omitted from the query when None. |
None
|
start
|
datetime | None
|
Start date for filtering entries (ISO 8601 format). Omitted from the query when None. |
None
|
end
|
datetime | None
|
End date for filtering entries (ISO 8601 format). Omitted from the query when None. |
None
|
Returns:
| Type | Description |
|---|---|
list[GetSubaccountStatementResponseItem]
|
list[GetSubaccountStatementResponseItem]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403. |
withdraw_from_subaccount
async
¶
withdraw_from_subaccount(
id: str, *, body: SubAccountWithdrawPayload
) -> WithdrawFromSubaccountResponse
Withdraw from a Sub Account.
Withdraw from a Sub Account and return the withdrawal transaction information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
pix key registered to the subaccount |
required |
body
|
SubAccountWithdrawPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
WithdrawFromSubaccountResponse |
WithdrawFromSubaccountResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_subscriptions
async
¶
Get a list of subscriptions.
Returns:
| Name | Type | Description |
|---|---|---|
ListSubscriptionsResponse |
ListSubscriptionsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_subscription
async
¶
Create a new Subscription.
Endpoint to create a new Subcription
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
SubscriptionPayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateSubscriptionResponse |
CreateSubscriptionResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_subscription
async
¶
Get one subscription.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The globalID or correlationID of the subscription. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GetSubscriptionResponse |
GetSubscriptionResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
cancel_subscription
async
¶
Cancel an Subscription.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The globalID or correlationID of the subscription. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_subscription_installments
async
¶
Get a list of installments by subscription.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The globalID of the subscription. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ListSubscriptionInstallmentsResponse |
ListSubscriptionInstallmentsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
update_subscription_value
async
¶
Update the value of the next installments of the subscription. It is only possible if pix automatic accepts dynamic value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The globalID or correlationID of the subscription. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_transactions
async
¶
list_transactions(
*,
start: datetime | None = None,
end: datetime | None = None,
charge: str | None = None,
pix_qr_code: str | None = None,
withdrawal: str | None = None,
has_webhook: bool | None = None,
type: ListTransactionsType | None = None,
) -> ListTransactionsResponse
Get a list of transactions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
datetime | None
|
The start value. Omitted from the query when None. |
None
|
end
|
datetime | None
|
The end value. Omitted from the query when None. |
None
|
charge
|
str | None
|
You can use the charge ID or correlation ID or transaction ID of charge to get a list of transactions related of this transaction. Omitted from the query when None. |
None
|
pix_qr_code
|
str | None
|
You can use the QrCode static ID or correlation ID or identifier field of QrCode static to get a list of QrCode related of this transaction. Omitted from the query when None. |
None
|
withdrawal
|
str | None
|
You can use the ID or EndToEndId of a withdrawal transaction to get all transactions related to the withdrawal. Omitted from the query when None. |
None
|
has_webhook
|
bool | None
|
Filter transactions by webhook delivery status. Use true to get only transactions that had a successful webhook delivery (HTTP 200), or false to get transactions without successful webhook delivery. Omitted from the query when None. |
None
|
type
|
ListTransactionsType | None
|
Filter transactions by type. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ListTransactionsResponse |
ListTransactionsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_transaction
async
¶
Get a Transaction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
you can use the transaction id from openpix or the endToEndId of transaction from bank |
required |
company_bank_account
|
str | None
|
Restrict the lookup to another bank account of your company instead of the one linked to the appID. Only a MASTER application of a company with the MASTER_APP_READ_ANY_ACCOUNT feature can use it. Use the accountId returned by GET /api/v1/account. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
GetTransactionResponse |
GetTransactionResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400, 403. |
create_transfer
async
¶
Create a Transfer.
Endpoint to to transfer values between accounts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
TransferCreatePayload
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateTransferResponse |
CreateTransferResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_webhooks
async
¶
Get a list of webhooks.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str | None
|
You can use the url to filter all webhooks. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ListWebhooksResponse |
ListWebhooksResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
create_webhook
async
¶
Create a new Webhook.
Endpoint to create a new Webhook
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
CreateWebhookBody
|
The request body. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CreateWebhookResponse |
CreateWebhookResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_webhook_events
async
¶
Get a list of webhook events.
Returns:
| Name | Type | Description |
|---|---|---|
ListWebhookEventsResponse |
ListWebhookEventsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
list_webhook_ips
async
¶
Get a list of webhook IPs.
Returns:
| Name | Type | Description |
|---|---|---|
ListWebhookIpsResponse |
ListWebhookIpsResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
list_webhook_public_keys
async
¶
Get the public keys that verify the webhook signature.
Retorna a chave pública usada para verificar o header x-webhook-signature,
presente em todo webhook enviado pela Woovi.
A assinatura é base64(RSA-SHA256) sobre o corpo bruto da request —
verifique antes de fazer parse do JSON, porque reserializar muda os bytes e
invalida a assinatura.
Este endpoint não exige autenticação: a chave é pública por definição, e quem recebe webhook normalmente valida a assinatura em um contexto que não tem o AppID em mãos.
A resposta é uma lista, e não uma chave só, para permitir rotação: durante uma
troca de chave publicamos a antiga e a nova ao mesmo tempo, com is_current
indicando qual está assinando agora. Aceite qualquer chave da lista ao verificar
e você não quebra quando a rotação acontecer.
Returns:
| Name | Type | Description |
|---|---|---|
ListWebhookPublicKeysResponse |
ListWebhookPublicKeysResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents no error status. |
delete_webhook
async
¶
Delete a Webhook.
Endpoint to delete a Webhook
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
webhook ID |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DeleteWebhookResponse |
DeleteWebhookResponse
|
The 200 response body, validated. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
get_charge_qr_code_image
async
¶
Get an image of Qr Code from a Charge.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
charge link payment ID |
required |
size
|
str | None
|
Size for the image. This size should be between 600 and 4096. if the size parameter was not passed, the default value will be 1024. Omitted from the query when None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
Nothing — the operation answers 200 with no body. |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
For any non-2xx response. The specification documents 400. |
OpenPixEnvironmentEnum
¶
Bases: BaseStrEnum
An OpenPix API environment.
Attributes:
| Name | Type | Description |
|---|---|---|
PRODUCTION |
Live money. |
|
SANDBOX |
Test environment. |
base_url
property
¶
Return the API base URL for this environment.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The host, with no trailing slash, ready for |
str
|
|
OpenPixEventEnum
¶
to_cents
¶
Narrow an OpenPix value to exact integer cents.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float | int | str | Decimal
|
The value as the API typed it.
The generated model produces an |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The same amount as an |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the value is not a whole number of cents, is negative, or is not a number at all. The first two mean the caller's assumption about the field is wrong, and silently rounding would hide a real mismatch behind a plausible number. |
A float is routed through repr before Decimal so that
1990.0 reads as 1990 rather than the binary expansion
Decimal(1990.0) would produce.
Every rejection is a ValueError, including the ones Decimal
would raise as something else. This function's documented use is a raw
payload — a webhook body, a dictionary straight off the wire — where
the value can be anything JSON allows: "abc" and "" reached
decimal.InvalidOperation, None reached TypeError and
float("inf") reached OverflowError, none of which a caller
writing except ValueError around a money conversion would catch.
reais_to_cents
¶
Convert an amount in BRL to integer cents.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amount
|
float | int | str | Decimal
|
The amount in reais. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The amount in cents, rounded half-up at the third decimal. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the amount is negative, or is not a number. |
Half-up is the rounding a person expects from money (0.005 -> 1
cent), and is not what Python's built-in round does — it rounds
half to even, so round(0.005 * 100) gives 0.
cents_to_reais
¶
Convert integer cents to a BRL amount for display.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cents
|
int
|
The amount in cents. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Decimal |
Decimal
|
The amount in reais, always with two decimal places. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Returns a Decimal rather than a float so the value stays exact
all the way to the formatting call.
OpenPixWebhookEvent
dataclass
¶
OpenPixWebhookEvent(
event_name: str,
event: OpenPixEventEnum | None = None,
payload: dict[str, Any] = dict(),
body: bytes = b"",
)
A verified OpenPix webhook delivery.
A dataclass rather than a :class:BaseSchema: this is the value handed
to a route, not a wire DTO. BaseSchema sets use_enum_values=True,
which would store :attr:event as a bare str — and then the obvious
event.event is OpenPixEventEnum.CHARGE_COMPLETED is always false,
silently, on every delivery. It also skips re-validating a payload that
was just parsed from JSON.
Attributes:
| Name | Type | Description |
|---|---|---|
event_name |
str
|
The |
event |
OpenPixEventEnum | None
|
The parsed event, or |
payload |
dict[str, Any]
|
The whole decoded body. Deliberately not
modelled here — the 358 generated schemas live in the consuming
service, so the caller validates the branch they care about
( |
body |
bytes
|
The raw body, byte-for-byte as received, for logging or a second verification. |
make_openpix_webhook_dependency
¶
make_openpix_webhook_dependency(
*,
verifier: RSAWebhookSignatureVerifier | None = None,
error_message: str = "Invalid OpenPix webhook signature",
) -> Callable[..., Coroutine[Any, Any, OpenPixWebhookEvent]]
Build a FastAPI dependency yielding a verified, parsed event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verifier
|
RSAWebhookSignatureVerifier | None
|
Verifier to use.
Defaults to :func: |
None
|
error_message
|
str
|
Message on the raised
:class: |
'Invalid OpenPix webhook signature'
|
Returns:
| Type | Description |
|---|---|
Callable[..., Coroutine[Any, Any, OpenPixWebhookEvent]]
|
Callable[..., Coroutine[Any, Any, OpenPixWebhookEvent]]: An async |
Callable[..., Coroutine[Any, Any, OpenPixWebhookEvent]]
|
dependency that verifies the signature, decodes the body and |
Callable[..., Coroutine[Any, Any, OpenPixWebhookEvent]]
|
returns an :class: |
Raises:
| Type | Description |
|---|---|
UnauthorizedException
|
Raised by the returned dependency when the signature is missing or does not verify. |
Two behaviours are deliberate. An unrecognized event name does not
fail the request: OpenPix adds events, and a service that 500s on one
it has never seen turns a provider's release into its own outage — the
name is kept as event_name with event left None. A body
that is not JSON is also not an error here; it verified, so it came
from OpenPix, and rejecting it would discard a delivery the provider
considers sent. payload stays empty and body carries the bytes.
webhook_verifier
¶
webhook_verifier(
*,
public_key_pem: str | bytes = OPENPIX_WEBHOOK_PUBLIC_KEY,
header_name: str = OPENPIX_WEBHOOK_SIGNATURE_HEADER,
) -> RSAWebhookSignatureVerifier
Build a verifier configured for OpenPix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_key_pem
|
str | bytes
|
PEM-encoded public key. Overridable so a caller can pin a rotated key without waiting for an SDK release — the provider can change it at any time and a hard constant would strand every consumer. |
OPENPIX_WEBHOOK_PUBLIC_KEY
|
header_name
|
str
|
Header carrying the signature. |
OPENPIX_WEBHOOK_SIGNATURE_HEADER
|
Returns:
| Name | Type | Description |
|---|---|---|
RSAWebhookSignatureVerifier |
RSAWebhookSignatureVerifier
|
A verifier over |
RSAWebhookSignatureVerifier
|
algorithm OpenPix documents ( |
This supplies constants rather than forwarding arguments: the key and the header name are the whole point, and they are what every consumer would otherwise copy out of a docs page by hand.
decode_public_key
¶
Decode the base64 public key exactly as OpenPix publishes it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encoded
|
str
|
The base64 blob copied from the provider's docs. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The PEM text, ready for :func: |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the blob is not valid base64, or does not decode to a PEM public key — a truncated copy-paste otherwise fails much later, as a signature mismatch on a real delivery. |
The provider prints the key base64-encoded rather than as PEM, so
rotating it means decoding a blob. Doing that at the call site is one
line of base64 that everyone writes slightly differently.