Accounts API
Download OpenAPI specification:Download
ONZ offers extensive integrations for financial services. Through its RESTful API platform, ONZ enables businesses to create tailor-made products that cater to the specific requirements of their customers. Our API documentation provides in-depth details about the different endpoints accessible through the ONZ APIs.
Each endpoint's documentation encompasses:
Corporate Onboard Into BaaS Platform
Before starting the integration:- Request a account create on Finance platform;
- Create your API credencials on Finance platform (main menu "Configurações" -> "API Contas" -> "Nova credencial")
- Request the integration digital certificate
The procedures within this section manage the utilization of authentication tokens to validate the caller's credentials. To access data in our services, it's essential to provide the correct valid credentials. Below, you'll find a guide on obtaining a valid token and determining its ongoing validity with each inquiry.
Get an access token.
The initial step in utilizing the corporate API is the authentication process. During this step, the authorization server will validate the client's credentials and then issue a token.
The ONZ API employs OAuth 2.0 Bearer Tokens for request authentication. Every API request necessitates inclusion of a bearer token. After obtaining the access token, you can utilize any of the API endpoints outlined below (based on the scopes granted to your app), incorporating the access token within the HTTP Authorization Header.
Scopes
Scopes establish the extent of access that a token will possess in relation to resources within the ONZ platform.
Resource | Read Scope | Write Scope | Accessible Using |
---|---|---|---|
Pix | pix.read | pix.write | Corporate token |
Billets | billets.read | billets.write | Corporate token |
Webhook | webhook.read | webhook.write | Corporate token |
Transactions | transactions.read | Corporate token | |
Account | account.read | Corporate token | |
Infractions | infractions.read | infractions.write | Corporate token |
Request Body schema: required
clientId required | string <uuid> |
clientSecret required | string |
grantType required | string Default: "client_credentials" |
scope | string |
Responses
Response Schema: application/json
tokenType | string |
expiresAt | integer <int32> |
refreshExpiresIn | integer <int32> |
notBeforePolicy | integer <int32> |
accessToken | string |
scope | string |
Request samples
- Payload
{- "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
- "clientSecret": "string",
- "grantType": "client_credentials",
- "scope": "string"
}
Response samples
- 201
- 400
- 401
- 500
{- "tokenType": "string",
- "expiresAt": 0,
- "refreshExpiresIn": 0,
- "notBeforePolicy": 0,
- "accessToken": "string",
- "scope": "string"
}
The Account API provides endpoints for managing account-related entities on your account, like trasactions and balances.
Get customer account transactions.
Authorizations:
query Parameters
event_date_start required | string <date-time> Minimal date of query range (ISO 8601) |
event_date_end required | string <date-time> Maximal date of query range (ISO 8601) |
page_offset | integer >= 1 Default: 1 Start position in pagination |
page_limit | integer [ 1 .. 100 ] Default: 10 Maximum resources per page |
sort_by | string Default: "EVENT_DATE" Enum: "EVENT_DATE" "AMOUNT" Parameter using to sort data |
sort_order | string Default: "ASC" Enum: "ASC" "DESC" Define order direction |
filter | string Filter transactions by payer or payee document number |
Responses
Response Schema: application/json
object (MetaPagination) The pagination object is used to paginate the results of a request. It contains information about the total number of items available, the number of items returned in the response, the number of items per page, and the current page number. | |
Array of objects (TransactionData) |
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
{- "meta": {
- "total": 100,
- "limit": 10,
- "offset": 1
}, - "data": [
- {
- "eventDate": "2019-08-24T14:15:22Z",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status": "CANCELED",
- "endToEndId": "string",
- "txId": "string",
- "creditDebitType": "CREDIT",
- "transactionType": "PIX",
- "transactionAmount": {
- "currency": "BRL",
- "available": 0.1
}
}
]
}
Get details of transaction.
Authorizations:
path Parameters
transactionId required | number Id of transaction |
Responses
Response Schema: application/json
eventDate | string <date-time> |
id | string <number> |
idempotencyKey | string |
endToEndId | string (EndToEndId) The "endToEndId" field refers to a unique identifier that can be used to track and associate a specific transaction throughout the lifecycle of the operation. The term "end-to-end" pertains to the ability to trace the transaction from beginning to end, ensuring data integrity along the way. |
txId | string (TxId) The "txId" field is a unique identifier generated by the Pix system to uniquely identify and monitor transactions. |
status | string (OperationStatus) Enum: "CANCELED" "PROCESSING," "LIQUIDATED," "REFUNDED," "PARTIALLY_REFUNDED," |
transactionType | string (TransactionType) Enum: "PIX" "BILLET" |
MANU"MANU" (any) or DICT"DICT" (any) or INIC"INIC" (any) or QRDN"QRDN" (any) or QRES"QRES" (any) (LocalInstrumentType) | |
object (DebtorData) | |
object (CreditorData) | |
creditDebitType | string Enum: "CREDIT" "DEBIT" |
object | |
Array of objects (RefundsData) | |
remittanceInformation | string (RemittanceInformation) It must be filled in whenever the paying user includes any additional information in a payment to be sent to the recipient. |
AB03"AB03" (any) or AB09"AB09" (any) or AB11"AB11" (any) or AC03"AC03" (any) or AC06"AC06" (any) or AC07"AC07" (any) or AC14"AC14" (any) or AG03"AG03" (any) or AG12"AG12" (any) or AG13"AG13" (any) or AGNT"AGNT" (any) or AM01"AM01" (any) or AM02"AM02" (any) or AM04"AM04" (any) or AM09"AM09" (any) or AM12"AM12" (any) or AM18"AM18" (any) or BE01"BE01" (any) or BE05"BE05" (any) or BE17"BE17" (any) or CH11"CH11" (any) or CH16"CH16" (any) or DS04"DS04" (any) or DS0G"DS0G" (any) or DS24"DS24" (any) or DS27"DS27" (any) or DT02OperationStatus"DT02" (any) or DT05"DT05" (any) or ED05"ED05" (any) or FF07"FF07" (any) or FF08"FF08" (any) or MD01"MD01" (any) or OZ01"OZ01" (any) or RC09"RC09" (any) or RC10"RC10" (any) or RR04"RR04" (any) or SL02"SL02" (any) (PixErrorCode) | |
createdAt | string <date-time> |
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
[- {
- "eventDate": "2019-08-24T14:15:22Z",
- "id": "string",
- "idempotencyKey": "string",
- "endToEndId": "string",
- "txId": "string",
- "status": "CANCELED",
- "transactionType": "PIX",
- "localInstrument": "MANU",
- "debtorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "creditorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "creditDebitType": "CREDIT",
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "refunds": [
- {
- "endToEndId": "string",
- "status": "CANCELED",
- "errorCode": "AB03",
- "pixRefundAmount": {
- "currency": "BRL",
- "amount": 0.1
}
}
], - "remittanceInformation": "string",
- "errorCode": "AB03",
- "createdAt": "2019-08-24T14:15:22Z"
}
]
Get customer account balance.
Authorizations:
Responses
Response Schema: application/json
Array of objects (BalanceData) | |||||
Array
|
Response samples
- 200
- 400
- 401
- 403
- 429
- 500
{- "data": [
- {
- "eventDate": "2019-08-24T14:15:22Z",
- "balanceAmount": {
- "currency": "BRL",
- "available": 0.1,
- "blocked": 0.1,
- "overdraft": 0.1
}
}
]
}
You can use the ONZ Payments API to make payments through Pix - the brazilian instant payment - using an Pix key, an QRCode or creditor bank account data.
About Pix keys
Pix key is the most common way of identifying the recipient of the amount being transferred. Using the Pix key, the identification process is greatly simplified, as it is not necessary to provide the bank details of the recipients. The payment system provides different types of keys, and the same person can have more than one of them.Pix key type | Description | Format validation |
---|---|---|
CPF | Tax number | ^[0-9]{11}$ |
CNPJ | Business person tax number | ^[0-9]{14}$ |
Phone number | Phone number | ^+[1-9][0-9]\d{1,14}$ |
Address e-mail | Address e-mail | ^[a-z0-9.!#$&'*+\\\\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$ |
EVP (Random Key) | Random key (generation by Banco Central do Brasil) | [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ |
QRCode (Copia e cola)
The Pix payment system also provides that payment can be made using a code known as "Copia e cola" (copy and paste), a code that follows the standardization established by the Central Bank of Brazil and that can be expressed through a QRCode.Recipient's bank details
As a third option, payment can be made by informing the recipient's bank details.Initiate a payment by QR Code.
This endpoint allows the request of a Pix payment order (cash-out) using data that follow the specifications of the Banco Central do Brasil and that can be expressed in a QRCode. This data is also known as 'Copy and paste', as it can be copied in text format and inserted as the creditor's identifier.
Authorizations:
header Parameters
x-idempotency-key required | string Unique request identifier to support idempotency. |
Request Body schema: application/jsonrequired
qrCode required | string |
creditorDocument | string |
priority | string Enum: "HIGH" "NORM" When the parameter is set to 'HIGH,' it is processed instantly (bypassing the processing queue). The value 'HIGH' is only allowed when the 'creditorDocument' field is defined. |
description | string |
paymentFlow | string (PaymentFlowType) Enum: "INSTANT" "APPROVAL_REQUIRED" Default value is
|
expiration | integer <int64> (PixCashOutExpiration) [ 1 .. 10800 ] Maximum time (seconds) that an operation can remain in the queue waiting for processing before being cancelled. |
required | object |
ispbDeny | Array of strings (IspbDenyList) List of codes ISPB (Identificador de Sistema de Pagamentos Brasileiro) to which payments will not be allowed. |
Responses
Request samples
- Payload
{- "qrCode": "string",
- "creditorDocument": "string",
- "priority": "HIGH",
- "description": "string",
- "paymentFlow": "INSTANT",
- "expiration": 600,
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "ispbDeny": [
- "string"
]
}
Response samples
- 202
- 400
- 401
- 403
- 412
- 422
- 429
- 500
{- "endToEndId": "string",
- "eventDate": "2019-08-24T14:15:22Z",
- "id": 0,
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "type": "string"
}
Initiate a payment using bank information.
This endpoint allows requesting a Pix payment order (cash-out) using the creditor's bank details (ISPB code, document, branch, account number, account type, name).
Authorizations:
header Parameters
x-idempotency-key required | string Unique request identifier to support idempotency. |
Request Body schema: application/jsonrequired
priority | string Enum: "HIGH" "NORM" When the parameter is set to 'HIGH,' it is processed instantly (bypassing the processing queue). The value 'HIGH' is only allowed when the 'creditorDocument' field is defined. |
description | string |
paymentFlow | string (PaymentFlowType) Enum: "INSTANT" "APPROVAL_REQUIRED" Default value is
|
expiration | integer <int64> (PixCashOutExpiration) [ 1 .. 10800 ] Maximum time (seconds) that an operation can remain in the queue waiting for processing before being cancelled. |
required | object (CreditorData) |
required | object |
ispbDeny | Array of strings (IspbDenyList) List of codes ISPB (Identificador de Sistema de Pagamentos Brasileiro) to which payments will not be allowed. |
Responses
Request samples
- Payload
{- "priority": "HIGH",
- "description": "string",
- "paymentFlow": "INSTANT",
- "expiration": 600,
- "creditorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "ispbDeny": [
- "string"
]
}
Response samples
- 202
- 400
- 401
- 403
- 412
- 422
- 429
- 500
{- "endToEndId": "string",
- "eventDate": "2019-08-24T14:15:22Z",
- "id": 0,
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "type": "string"
}
Initiate a payment by Pix key.
This endpoint allows requesting a Pix payment order (cash-out) using any of the allowed types of pix key: CPF, CNPJ, address e-mail, phone number, EVP (random key).
Authorizations:
header Parameters
x-idempotency-key required | string Unique request identifier to support idempotency. |
Request Body schema: application/jsonrequired
pixKey required | string Any of allowed keys: CPF, CNPJ, address e-mail, phone number, EVP (random key). |
creditorDocument | string |
priority | string Enum: "HIGH" "NORM" When the parameter is set to 'HIGH,' it is processed instantly (bypassing the processing queue). The value 'HIGH' is only allowed when the 'creditorDocument' field is defined. |
description | string |
paymentFlow | string (PaymentFlowType) Enum: "INSTANT" "APPROVAL_REQUIRED" Default value is
|
expiration | integer <int64> (PixCashOutExpiration) [ 1 .. 10800 ] Maximum time (seconds) that an operation can remain in the queue waiting for processing before being cancelled. |
required | object |
ispbDeny | Array of strings (IspbDenyList) List of codes ISPB (Identificador de Sistema de Pagamentos Brasileiro) to which payments will not be allowed. |
Responses
Request samples
- Payload
{- "pixKey": "string",
- "creditorDocument": "string",
- "priority": "HIGH",
- "description": "string",
- "paymentFlow": "INSTANT",
- "expiration": 600,
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "ispbDeny": [
- "string"
]
}
Response samples
- 202
- 400
- 401
- 403
- 412
- 422
- 429
- 500
{- "endToEndId": "string",
- "eventDate": "2019-08-24T14:15:22Z",
- "id": 0,
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "type": "string"
}
Get transaction details by end-to-end-id.
Authorizations:
path Parameters
endToEndId required | string EndToEndId of the pix |
Responses
Response Schema: application/json
object (PixDataProperties) | |||||||||||||||||||||||||||||||||
|
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
{- "data": {
- "id": 0,
- "idempotencyKey": "string",
- "endToEndId": "string",
- "pixKey": "string",
- "transactionType": "PIX",
- "status": "CANCELED",
- "errorCode": "AB03",
- "creditDebitType": "CREDIT",
- "localInstrument": "MANU",
- "createdAt": "2019-08-24T14:15:22Z",
- "creditorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "debtorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "remittanceInformation": "string",
- "txId": "string",
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "refunds": [
- {
- "endToEndId": "string",
- "status": "CANCELED",
- "errorCode": "AB03",
- "pixRefundAmount": {
- "currency": "BRL",
- "amount": 0.1
}
}
]
}
}
Get transaction details by idempotency key.
Authorizations:
path Parameters
idempotencyKey required | string Idempotency Key of the pix |
Responses
Response Schema: application/json
object (PixDataProperties) | |||||||||||||||||||||||||||||||||
|
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
{- "data": {
- "id": 0,
- "idempotencyKey": "string",
- "endToEndId": "string",
- "pixKey": "string",
- "transactionType": "PIX",
- "status": "CANCELED",
- "errorCode": "AB03",
- "creditDebitType": "CREDIT",
- "localInstrument": "MANU",
- "createdAt": "2019-08-24T14:15:22Z",
- "creditorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "debtorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "remittanceInformation": "string",
- "txId": "string",
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "refunds": [
- {
- "endToEndId": "string",
- "status": "CANCELED",
- "errorCode": "AB03",
- "pixRefundAmount": {
- "currency": "BRL",
- "amount": 0.1
}
}
]
}
}
Initiate a payment using billet data.
This endpoint allows requesting a billet (brazilian boleto) payment order (cash-out) using billet code (Linha digitável).
1 - Payment will always be made using an adjusted amount (interest and fines).
2 - Billets whose payment amount can be changed by the payer can only be paid via the web (Finance).
Authorizations:
header Parameters
x-idempotency-key required | string Unique request identifier to support idempotency. |
Request Body schema: application/jsonrequired
digitableCode required | string Numeric representation of billet's barcode (Linha digitável). Only numbers. |
description required | string |
paymentFlow | string (PaymentFlowType) Enum: "INSTANT" "APPROVAL_REQUIRED" Default value is
|
object |
Responses
Request samples
- Payload
{- "digitableCode": "string",
- "description": "string",
- "paymentFlow": "INSTANT",
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}
}
Response samples
- 202
- 400
- 401
- 403
- 412
- 422
- 429
- 500
{- "id": 0,
- "idempotencyKey": "string",
- "eventDate": "2019-08-24T14:15:22Z",
- "digitableCode": "string",
- "description": "string",
- "status": "CANCELED",
- "transactionType": "PIX",
- "creditDebitType": "CREDIT",
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}
}
Get a billet payment list.
Authorizations:
Responses
Response Schema: application/json
object (MetaPagination) The pagination object is used to paginate the results of a request. It contains information about the total number of items available, the number of items returned in the response, the number of items per page, and the current page number. | |
object (BilletPaymentRegisterResponse) |
Response samples
- 200
- 400
- 401
- 403
- 429
- 500
{- "meta": {
- "total": 100,
- "limit": 10,
- "offset": 1
}, - "data": {
- "id": 0,
- "idempotencyKey": "string",
- "eventDate": "2019-08-24T14:15:22Z",
- "digitableCode": "string",
- "description": "string",
- "status": "CANCELED",
- "transactionType": "PIX",
- "creditDebitType": "CREDIT",
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}
}
}
Get billet payment operation data by id.
Authorizations:
path Parameters
id required | string Billet id |
Responses
Response Schema: application/json
id | number <int64> |
idempotencyKey | string |
eventDate | string <date-time> |
digitableCode | string Numeric representation of billet's barcode (Linha digitável). |
description | string |
status | string (OperationStatus) Default: "LIQUIDATED" Enum: "CANCELED" "PROCESSING," "LIQUIDATED," "REFUNDED," "PARTIALLY_REFUNDED," |
transactionType | string (TransactionType) Default: "BILLET" Enum: "PIX" "BILLET" |
creditDebitType | string (creditDebitType) Enum: "CREDIT" "DEBIT" |
object | |
object | |
object (CreditorData) | |
object (DebtorData) |
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
{- "id": 0,
- "idempotencyKey": "string",
- "eventDate": "2019-08-24T14:15:22Z",
- "digitableCode": "string",
- "description": "string",
- "status": "CANCELED",
- "transactionType": "PIX",
- "creditDebitType": "CREDIT",
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "billetInfo": {
- "digitableCode": "string",
- "barCode": "string",
- "settleDate": "2019-08-24T14:15:22Z",
- "dueDate": "2019-08-24T14:15:22Z"
}, - "creditorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "debtorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}
}
Returns infractions opened against the customer's account.
Authorizations:
query Parameters
last_change_start required | string <date-time> Minimal date of query range (ISO 8601) |
last_change_end required | string <date-time> Maximal date of query range (ISO 8601) |
page_offset | integer >= 1 Default: 1 Start position in pagination |
page_limit | integer [ 1 .. 100 ] Default: 10 Maximum resources per page |
sort_by | string Default: "EVENT_DATE" Enum: "EVENT_DATE" "STATUS" Parameter using to sort data |
status | string Default: "ALL" Enum: "ACKNOWLEDGED" "WAITING_ADJUSTMENTS" "DEFENDED" "CLOSED" Actual status of infraction |
Responses
Response Schema: application/json
object (MetaPagination) The pagination object is used to paginate the results of a request. It contains information about the total number of items available, the number of items returned in the response, the number of items per page, and the current page number. | |
Array of objects (InfractionData) |
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
{- "meta": {
- "total": 100,
- "limit": 10,
- "offset": 1
}, - "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "transactionId": 0,
- "status": "OPEN",
- "type": "FRAUD",
- "lastModificationDate": "2019-08-24T14:15:22Z",
- "creationDate": "2019-08-24T14:15:22Z",
- "reportedBy": "DEBITED_PARTICIPANT",
- "reportDetails": "string",
- "analysisResult": "AGREED",
- "analysisDetails": "string",
- "transactionAmount": {
- "currency": "BRL",
- "amount": 0.1
}
}
]
}
Get infraction data by infraction ID.
Authorizations:
path Parameters
infractionId required | string Infraction ID |
Responses
Response Schema: application/json
object | |||||||||||||||||||||||||||||
|
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "transactionId": 0,
- "endToEndId": "string",
- "type": "FRAUD",
- "reportedBy": "DEBITED_PARTICIPANT",
- "transactionAmount": {
- "currency": "BRL",
- "amount": 0.1
}, - "reportDetails": "string",
- "analysisResult": "AGREED",
- "status": "OPEN",
- "analysisDetails": "string",
- "creationDate": "2019-08-24T14:15:22Z",
- "lastModificationDate": "2019-08-24T14:15:22Z",
- "isReporter": true,
- "defenseHistories": [
- {
- "status": "PENDING",
- "request": "string",
- "defense": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "attachments": [
- {
- "location": "string",
- "url": "string"
}
]
}
]
}
}
Create a defense against an infraction.
Authorizations:
path Parameters
infractionId required | string Infraction ID |
Request Body schema: multipart/form-datarequired
defense | string |
files | Array of strings <binary> [ items <binary > ] |
Responses
Response Schema: application/json
object | |||||||||||||||||||||||||||||
|
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "transactionId": 0,
- "endToEndId": "string",
- "type": "FRAUD",
- "reportedBy": "DEBITED_PARTICIPANT",
- "transactionAmount": {
- "currency": "BRL",
- "amount": 0.1
}, - "reportDetails": "string",
- "analysisResult": "AGREED",
- "status": "OPEN",
- "analysisDetails": "string",
- "creationDate": "2019-08-24T14:15:22Z",
- "lastModificationDate": "2019-08-24T14:15:22Z",
- "isReporter": true,
- "defenseHistories": [
- {
- "status": "PENDING",
- "request": "string",
- "defense": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "attachments": [
- {
- "location": "string",
- "url": "string"
}
]
}
]
}
}
Use webhooks to receive information about API events as they occur. An event is an activity that happens outside of your system, such as a Pix cash-out or a receive.
Webhooks allow you to build or set up integrations. When a subscribed event occurs, a notification will be posted, via HTTP, to the specified endpoint.
To receive and process webhook-enabled events, configure a webhook endpoint in your environment.
Recurring error behavior
Range fails | Action |
---|---|
1 - 5 fails | Queued messages will be resent after 2 minutes |
6 - 10 fails | Queued messages will be resent in 15 minutes interval |
11 - 15 fails | Queued messages will be resent in 60 minutes interval |
> 15 fails | The webhook process will be desactived |
Get a webhooks list.
Authorizations:
Responses
Response Schema: application/json
object (MetaPagination) The pagination object is used to paginate the results of a request. It contains information about the total number of items available, the number of items returned in the response, the number of items per page, and the current page number. | |
Array of objects (WebhookData) |
Response samples
- 200
- 400
- 401
- 403
- 429
- 500
{- "meta": {
- "total": 100,
- "limit": 10,
- "offset": 1
}, - "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "TRANSFER",
- "enabled": true
}
]
}
Get a webhook data.
Authorizations:
path Parameters
webhookId required | string <uuid> Id of webhook |
Responses
Response Schema: application/json
id | string <uuid> |
type | string (WebhookType) Enum: "TRANSFER" "RECEIVE" "REFUND" "CASHOUT" "INFRACTION" |
uri | string <uri> |
enabled | boolean |
Response samples
- 200
- 400
- 401
- 403
- 429
- 500
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "TRANSFER",
- "enabled": true
}
Remove a webhook.
Cancel and remove the webhook from processing. All new hooks for the transactions are be ignored and will discard
Authorizations:
path Parameters
webhookId required | string <uuid> Id of webhook |
Responses
Response samples
- 400
- 401
- 403
- 429
- 500
{- "type": "string",
- "title": "string",
- "detail": "string",
- "instance": "string"
}
Create webhooks for transfer operations.
These webhooks will be triggered when the cash-out operation has settled or been canceled.
Authorizations:
Request Body schema: application/jsonrequired
uri required | string <uri> |
string E-mail utilizado para realizar as notificações de erros de envio de webhooks | |
method | string Default: "POST" Enum: "POST" "GET" "PUT" |
enabled required | boolean Default: true |
pauseOnFail | boolean Default: true |
object |
Responses
Response Schema: application/json
id | string <uuid> |
type | string (WebhookType) Enum: "TRANSFER" "RECEIVE" "REFUND" "CASHOUT" "INFRACTION" |
uri | string <uri> |
enabled | boolean |
Callbacks
Request samples
- Payload
{- "email": "string",
- "method": "POST",
- "enabled": true,
- "pauseOnFail": true,
- "headers": {
- "headerName": "string"
}
}
Response samples
- 201
- 400
- 401
- 403
- 409
- 429
- 500
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "TRANSFER",
- "enabled": true
}
Callback payload samples
{- "data": {
- "id": 0,
- "idempotencyKey": "string",
- "endToEndId": "string",
- "pixKey": "string",
- "transactionType": "PIX",
- "status": "CANCELED",
- "errorCode": "AB03",
- "creditDebitType": "CREDIT",
- "localInstrument": "MANU",
- "createdAt": "2019-08-24T14:15:22Z",
- "creditorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "debtorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "remittanceInformation": "string",
- "txId": "string",
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "refunds": [
- {
- "endToEndId": "string",
- "status": "CANCELED",
- "errorCode": "AB03",
- "pixRefundAmount": {
- "currency": "BRL",
- "amount": 0.1
}
}
]
}, - "type": "TRANSFER"
}
Create webhooks for receiving operations.
These webhooks will be triggered when the cash-in operation has been settled.
Authorizations:
Request Body schema: application/jsonrequired
uri required | string <uri> |
string E-mail utilizado para realizar as notificações de erros de envio de webhooks | |
method | string Default: "POST" Enum: "POST" "GET" "PUT" |
enabled required | boolean Default: true |
pauseOnFail | boolean Default: true |
object |
Responses
Response Schema: application/json
id | string <uuid> |
type | string (WebhookType) Enum: "TRANSFER" "RECEIVE" "REFUND" "CASHOUT" "INFRACTION" |
uri | string <uri> |
enabled | boolean |
Callbacks
Request samples
- Payload
{- "email": "string",
- "method": "POST",
- "enabled": true,
- "pauseOnFail": true,
- "headers": {
- "headerName": "string"
}
}
Response samples
- 201
- 400
- 401
- 403
- 409
- 429
- 500
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "RECEIVE",
- "enabled": true
}
Callback payload samples
{- "data": {
- "id": 0,
- "idempotencyKey": "string",
- "endToEndId": "string",
- "pixKey": "string",
- "transactionType": "PIX",
- "status": "CANCELED",
- "errorCode": "AB03",
- "creditDebitType": "CREDIT",
- "localInstrument": "MANU",
- "createdAt": "2019-08-24T14:15:22Z",
- "creditorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "debtorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "remittanceInformation": "string",
- "txId": "string",
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "refunds": [
- {
- "endToEndId": "string",
- "status": "CANCELED",
- "errorCode": "AB03",
- "pixRefundAmount": {
- "currency": "BRL",
- "amount": 0.1
}
}
]
}, - "type": "TRANSFER"
}
Create webhooks for refunding operations.
These webhooks will be triggered when the cash-out operation has been refunded.
Authorizations:
Request Body schema: application/jsonrequired
uri required | string <uri> |
string E-mail utilizado para realizar as notificações de erros de envio de webhooks | |
method | string Default: "POST" Enum: "POST" "GET" "PUT" |
enabled required | boolean Default: true |
pauseOnFail | boolean Default: true |
object |
Responses
Response Schema: application/json
id | string <uuid> |
type | string (WebhookType) Enum: "TRANSFER" "RECEIVE" "REFUND" "CASHOUT" "INFRACTION" |
uri | string <uri> |
enabled | boolean |
Callbacks
Request samples
- Payload
{- "email": "string",
- "method": "POST",
- "enabled": true,
- "pauseOnFail": true,
- "headers": {
- "headerName": "string"
}
}
Response samples
- 201
- 400
- 401
- 403
- 409
- 429
- 500
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "REFUND",
- "enabled": true
}
Callback payload samples
{- "data": {
- "id": 0,
- "idempotencyKey": "string",
- "endToEndId": "string",
- "pixKey": "string",
- "transactionType": "PIX",
- "status": "CANCELED",
- "errorCode": "AB03",
- "creditDebitType": "CREDIT",
- "localInstrument": "MANU",
- "createdAt": "2019-08-24T14:15:22Z",
- "creditorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "debtorAccount": {
- "ispb": "string",
- "issuer": "string",
- "number": "string",
- "accountType": "SLRY",
- "document": "string",
- "name": "string"
}, - "remittanceInformation": "string",
- "txId": "string",
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}, - "refunds": [
- {
- "endToEndId": "string",
- "status": "CANCELED",
- "errorCode": "AB03",
- "pixRefundAmount": {
- "currency": "BRL",
- "amount": 0.1
}
}
]
}, - "type": "TRANSFER"
}
Create webhooks for cash-out operations.
These webhooks will be triggered when a data validation failure occurs on the cash-out operation.
Authorizations:
Request Body schema: application/jsonrequired
uri required | string <uri> |
string E-mail utilizado para realizar as notificações de erros de envio de webhooks | |
method | string Default: "POST" Enum: "POST" "GET" "PUT" |
enabled required | boolean Default: true |
pauseOnFail | boolean Default: true |
object |
Responses
Response Schema: application/json
id | string <uuid> |
type | string (WebhookType) Enum: "TRANSFER" "RECEIVE" "REFUND" "CASHOUT" "INFRACTION" |
uri | string <uri> |
enabled | boolean |
Callbacks
Request samples
- Payload
{- "email": "string",
- "method": "POST",
- "enabled": true,
- "pauseOnFail": true,
- "headers": {
- "headerName": "string"
}
}
Response samples
- 201
- 400
- 401
- 403
- 409
- 429
- 500
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "CASHOUT",
- "enabled": true
}
Callback payload samples
{- "data": {
- "id": 0,
- "eventDate": "2019-08-24T14:15:22Z",
- "endToEndId": "string",
- "status": "CANCELED",
- "message": "string",
- "pixKey": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "idempotencyKey": "string",
- "localInstrument": "MANU",
- "refunds": [
- {
- "endToEndId": "string",
- "status": "CANCELED",
- "errorCode": "AB03",
- "pixRefundAmount": {
- "currency": "BRL",
- "amount": 0.1
}
}
], - "transactionType": "PIX",
- "errorCode": "AB03",
- "payment": {
- "currency": "BRL",
- "amount": 0.1
}
}
}
Create webhooks for infraction operations.
These webhooks will be triggered when an infraction is opened on the customer's account.
Authorizations:
Request Body schema: application/jsonrequired
uri required | string <uri> |
string E-mail utilizado para realizar as notificações de erros de envio de webhooks | |
method | string Default: "POST" Enum: "POST" "GET" "PUT" |
enabled required | boolean Default: true |
pauseOnFail | boolean Default: true |
object |
Responses
Response Schema: application/json
id | string <uuid> |
type | string (WebhookType) Enum: "TRANSFER" "RECEIVE" "REFUND" "CASHOUT" "INFRACTION" |
uri | string <uri> |
enabled | boolean |
Callbacks
Request samples
- Payload
{- "email": "string",
- "method": "POST",
- "enabled": true,
- "pauseOnFail": true,
- "headers": {
- "headerName": "string"
}
}
Response samples
- 201
- 400
- 401
- 403
- 409
- 429
- 500
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "INFRACTION",
- "enabled": true
}
Callback payload samples
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "transactionId": 0,
- "status": "OPEN",
- "type": "FRAUD",
- "lastModificationDate": "2019-08-24T14:15:22Z",
- "creationDate": "2019-08-24T14:15:22Z",
- "reportedBy": "DEBITED_PARTICIPANT",
- "reportDetails": "string",
- "analysisResult": "AGREED",
- "analysisDetails": "string",
- "transactionAmount": {
- "currency": "BRL",
- "amount": 0.1
}
}, - "type": "INFRACTION"
}