Cashout

POST /v2/apm/pix/cashout

Create pix cashout.

Request Fields
NameLocated inDescriptionMandatoryType
apikeyheaderAPI Keyyesstring
x-timestampheaderDate/time of the request (used to prevent replay attacks)yesstring
x-request-idheaderRandom ID used to identify the requestyesstring
x-hmac-signatureheaderHMAC signature generated by combining the request parameters: Example: HMAC-SHA256( apikey + x-timestamp + requestBody + URL)yesstring
AuthorizationheaderBearer token for authenticationyesstring (bearerToken)
amountbodyAmount to cashout (BRL)yesdecimal
pixKeybodyInternal pix key of the accountyesstring
receiverPixKeybodyPix key of the receiver, must belong to the receiverDocumentyesstring
receiverDocumentbodyDocument of the receiver, will be validated together with the pix keyyesstring
Request Example
{
  "pixKey": "tec7e05d-484e-4814-a432-dde637f84402",
  "receiverDocument": "36264164615",
  "receiverPixKey": "[email protected]",
  "amount": 99.99
}
Response Fields
FieldTypeAdditional Information
txidstringCashouts unique identifier
Response Example
{
  "txid": "2a2cc743-3913-48ea-91fe-13256ab3c3d2"
}

After successfully requesting the cashout operation some validations will be made asynchronously, and the cashout might still be denied. The result from this validation, together with the confirmation key necessary for the confirmation request (next endpoint), will be sent to the webhook.

GET /v2/apm/pix/cashout

Search and retrieve cash-outs. Allows for batch reconciliation.

Request Fields
NameLocated inDescriptionMandatoryType
apikeyheaderAPI Keyyesstring
x-timestampheaderDate/time of the request (used to prevent replay attacks)yesstring
x-request-idheaderRandom ID used to identify the requestyesstring
x-hmac-signatureheaderHMAC signature generated by combining the request parameters: Example: HMAC-SHA256( apikey + x-timestamp + requestBody + URL)yesstring
AuthorizationheaderBearer token for authenticationyesstring (bearerToken)
pixKeyqueryPix key of the accountyesstring
startDatequeryFilter cashouts after the startDateyesDateTime (ISO 8601)
endDatequeryFilter cashouts before the endDateyesDateTime (ISO 8601)
statusqueryStatus of the cashout.yesCash-out Status
pagination.currentPagequeryActual pageyesint
pagination.pageSizequeryPage sizeyesint
Response Fields
FieldTypeAdditional Information
result.txidstringUnique identifier of the cashout operation
result.endToEndIdstringUnique end to end id for the pix transaction, will always be null until the confirmation of the cashout (item X+1)
result.createdAtDateTime (ISO 8601)Date and time of the cashout creation
result.confirmedAtDateTime (ISO 8601)Date and time of the cashout confirmation
result.pixKeystringInternal accounts pix key
result.receiverDocumentstringDocument of the cashouts receiver
result.receiverPixKeystringPix key of the cashouts receiver
result.amountdecimalAmount of the cashout (BRL)
result.statusint (enum)Cashout Status. See Cash-out Status
result.failReasonint (enum)Cashout Fail Reason (Only when status is Failed). See Cash-out Fail Reason
criteria.pixKeystringAccount Pix Key Chave Pix used in filter
criteria.startDateDateTime (ISO 8601)Initial Date used in filter
criteria.endDateDateTime (ISO 8601)End Date used in filter
criteria.statusint (enum)Cashout Status filter. See Cash-out Status
pagination.currentPageintCurrent page retrieved
pagination.pageSizeintPage size retrieved
pagination.totalPagesintTotal pages to retrieve
pagination.totalItemsintTotal items to retrieve
Response Example
{
  "criteria": {
    "startDate": "2025-01-16 09:33:01.573Z",
    "endDate": "2025-01-16 09:33:01.573Z",
    "pixKey": "b57c7b3c-976b-41f6-a5f6-7cccd86549bd",
    "status": 2
  },
  "result": [
    {
      "txid": "bec7e05d-484e-4814-a432-dde637f84408",
      "endToEndId": "E144654798498498465123",
      "createdAt": "2025-01-16T09:33:01.573000",
      "confirmedAt": "2025-01-16T09:33:01.573000",
      "pixKey": "883f75da-1f69-48c4-9444-c32b4bcb3553",
      "receiverDocument": "36264164615",
      "receiverPixKey": "[email protected]",
      "amount": 999.99,
      "status": "Confirmed",
      "failReason": null
    }
  ],
  "pagination": {
    "currentPage": 1,
    "pageSize": 10,
    "totalPages": 1,
    "totalItems": 1
  }
}

POST /v2/apm/pix/cashout/confirm

Confirm a pix cashout request with the confirmation key.

Request Fields
NameLocated inDescriptionMandatoryType
apikeyheaderAPI Keyyesstring
x-timestampheaderDate/time of the request (used to prevent replay attacks)yesstring
x-request-idheaderRandom ID used to identify the requestyesstring
x-hmac-signatureheaderHMAC signature generated by combining the request parameters: Example: HMAC-SHA256( apikey + x-timestamp + requestBody + URL)yesstring
AuthorizationheaderBearer token for authenticationyesstring (bearerToken)
txidbodyCashouts unique identifieryesstring
confirmationKeybodyConfirmation key provided in the webhook notification payloadyesstring
Request Example
{
  "txid": "bec7e05d-484e-4814-a432-dde637f84408",
  "confirmationKey": "4826e6ec-9bd2-4045-b030-f10e519d584a"
}

After the confirmation the cashout can still fail in some scenarios, so another notification will be sent to the configured webhook to inform if the cashout was completed successfully.

GET /v2/apm/pix/cashout/{txid}

Retrieve cashout data with the txid. In case of delay or failure of the webhook notification, this endpoint can be used to check the cashout status.

Request Fields
NameLocated inDescriptionMandatoryType
apikeyheaderAPI Keyyesstring
x-timestampheaderDate/time of the request (used to prevent replay attacks)yesstring
x-request-idheaderRandom ID used to identify the requestyesstring
x-hmac-signatureheaderHMAC signature generated by combining the request parameters: Example: HMAC-SHA256( apikey + x-timestamp + requestBody + URL)yesstring
AuthorizationheaderBearer token for authenticationyesstring (bearerToken)
txidpathCashouts unique identifieryesstring
Response Fields
FieldTypeAdditional Information
txidstringUnique identifier of the cashout operation
endToEndstringUnique end to end id for the pix transaction, will always be null until the confirmation of the cashout
createdAtDateTime (ISO 8601)Date and time of the cashout creation
confirmedAtDateTime (ISO 8601)Date and time of the cashout confirmation
pixKeystringInternal accounts pix key
receiverDocumentstringDocument of the cashouts receiver
receiverPixKeystringPix key of the cashouts receiver
amountdecimalAmount of the cashout (BRL)
statusint (enum)Cashout Status. See Cash-out Status
failReasonint (enum)Cashout Fail Reason (Only when status is Failed). See Cash-out Fail Reason
Response Example
{
  "txid": "bec7e05d-484e-4814-a432-dde637f84408",
  "endToEnd": "E144654798498498465123",
  "createdAt": "2025-01-16T09:33:01.573000",
  "confirmedAt": "2025-01-16T09:33:01.573000",
  "pixKey": "883f75da-1f69-48c4-9444-c32b4bcb3553",
  "receiverDocument": "36264164615",
  "receiverPixKey": "[email protected]",
  "amount": 999.99,
  "status": 2,
  "failReason": 1
}

Additional Information

Cash-out Status
CodeStatusDescription
0PendingInitial state. Cashout request created and undergoing validation. Account balance is locked during this phase.
1RequestedAwaiting authorization confirmation from customer. Confirmation key auto-generated and sent via webhook. Auto-expires after configured timeout.
2AuthorizedAuthorization confirmed and PIX order sent to processor. Detects and marks concurrent requests from the same receiver as failed.
3ConfirmedPIX transaction successfully completed. Status confirmed via webhook callback from PIX processor. Final state.
4FailedCashout failed due to one of multiple possible reasons: security validation failure, insufficient balance, limit exceeded, expired, concurrent request, or processing error.
5ExpiredTimeout expired while waiting for authorization confirmation. Treated as a failed transaction.
Cash-out Fail Reason
CodeReasonDescription
0Security flagThe transaction was flagged and could not be processed due to security validation policies.
1Without limitThe cashout amount exceeds the configured transaction limit for the account.
2Without balanceInsufficient balance in the account to complete the cashout operation.
3ExpiredThe cashout request has expired and is no longer valid for processing.
4ConcurrencyConcurrent transaction detected. Another transaction is being processed simultaneously for the same account.
5Processing failureA system error occurred during the cashout processing. Please retry the operation.
6Policy violationThe transaction could not be completed due to policy validation or compliance requirements.
7Validation errorThe transaction could not be processed due to internal validation or compliance check failures.