Skip to main content

Make a Cash Out

Cash out Endpoint

Create a cash out operation. The value entered in the 'value' field must be entered in cents. Example: If it is 10 reais, enter 1000 in the 'value' field

Badge https://sandbox.tickpay.com/api/v1/wallets/out

Request

To access this endpoint, you need to provide a valid access token in the Authorization header.

Use the following cURL command to create a cash out operation:

curl -X 'POST' \
'https://sandbox.tickpay.com/api/v1/wallets/out' \
-H 'accept: application/json' \
-H 'Authorization: Bearer your_access_token' \
-H 'Content-Type: application/json' \
-d '{
"value": 5000,
"callbackUrl": "https://example.com/callback",
"pixDestinyType": "EMAIL",
"pixDestinyKey": "[email protected]",
"metadata": {
"key": "value",
"anotherKey": "anotherValue"
},
"externalReference": "ABC123"
}'

Request body

ParameterDescriptionRequired
valueThe monetary value of the transaction,, representing cents.true
callbackUrlThe URL to which the transaction status will be sent asynchronously.true
pixDestinyTypeSpecifies the type of PIX destination. Accepted values: EMAIL, PHONE, DOCUMENT or RANDOM.true
pixDestinyKeyThe PIX destination identifier, such as an email address or phone number.true
metadataAdditional key-value pairs providing metadata associated with the transaction.false
externalReferenceAn external reference or identifier for the transaction.false

Response

The response will contain a data object, along with additional information:

{
"data": {
"id": "9a6abcb2-f3bc-4d28-9c52-b69a01c8f1a9",
"callbackUrl": "https://example.com/callback",
"value": 5000,
"tax": 100,
"description": "Cash-out created successfully.",
"operation": "CASH_OUT",
"status": "PENDING",
"metadata": {
"key": "value",
"anotherKey": "anotherValue"
},
"externalReference": "ABC123",
"createdAt": "2024-01-12T03:49:14.985Z"
},
"messageError": null,
"success": true
}

Response Properties

ParameterDescriptionDefault Value
messageErrorError message.null
successIndicates whether the request was successful.false
data Properties
idUnique identifier for the transaction.
callbackUrlURL for callback.
valueSpecific value in the response, representing cents.
taxTax value.
descriptionDescription of the operation.
operationType of operation.
statusCurrent status of the transaction. Possible properties
metadataAdditional metadata.
externalReferenceExternal reference identifier.
createdAtDate and time of creation.

Possible Properties

ParameterDescription
statusPENDING, CANCELED, SUCCEED, FAILED