Skip to main content

Make a Cash In

Cash in Endpoint

Create a cash in 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/in

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 in operation:

  curl -X 'POST' \
'https://sandbox.tickpay.com/api/v1/wallets/in' \
-H 'accept: application/json' \
-H 'Authorization: Bearer your_access_token' \
-H 'Content-Type: application/json' \
-d '{
"value": 5000,
"callbackUrl": "https://example.com/callback",
"invoiceDescription": "string",
"metadata": {
"key": "value",
"anotherKey": "anotherValue"
},
"payer": {
"name": "John Doe",
"email": "[email protected]",
"document": "123456789",
"phone": "+5511911111111"
},
"externalReference": "ABC123",
"expireInMinutes": 5
}'

Request body

ParameterDescriptionRequired
valueThe monetary value associated with the transaction, representing cents.true
callbackUrlThe URL to which the transaction status or result will be sent asynchronously.true
invoiceDescriptionAdd a comment on the transaction.false
metadataAdditional key-value pairs providing metadata information related to the transaction.false
payerInformation about the payer initiating the transaction.true
payer.nameThe name of the payer.true
payer.emailThe email address of the payer.true
payer.documentThe document or identification number of the payer.true
payer.phoneThe phone number of the payer.false
externalReferenceAn external reference or identifier associated with the transaction, provided by the user or system.false
expireInMinutesThe time duration, in minutes, within which the transaction should be completed or expire.false

Response

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

{
"messageError": null,
"success": true,
"data": {
"id": "857ce245-92f8-4580-8be8-979ade39ce49",
"value": 5000,
"tax": 20,
"callbackUrl": "https://google.com",
"description": "Cash-in created successfully!",
"operation": "CASH_IN",
"status": "PENDING",
"codeCopyPaste": "chave:01234567890;valor:50.00;descricao:Pagamento de exemplo",
"qrcodeImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAQMA...",
"metadata": {
"foo": "bar"
},
"payer": {
"name": "John Doe",
"email": "[email protected]",
"phone": "+5511999999999",
"document": "01234567890"
},
"externalReference": "your_internal_id",
"createdAt": "2024-04-12T03:44:52.218Z"
}
}

Response Properties

ParameterDescriptionDefault Value
messageErrorError message.null
successIndicates whether the request was successful.false
data Properties
idUnique identifier for the transaction.
valueSpecific value in the response, representing cents.
taxTax value.
callbackUrlURL for callback.
descriptionDescription of the operation.
operationType of operation.
statusCurrent status of the transaction. Possible properties
codeCopyPasteURL for copying and pasting the code.
qrcodeImageData URI for the QR code image.
metadataAdditional metadata.
payerInformation about the payer initiating the transaction.
payer.nameThe name of the payer.
payer.emailThe email address of the payer.
payer.documentThe document or identification number of the payer.
payer.phoneThe phone number of the payer.
externalReferenceExternal reference identifier.
createdAtDate and time of creation.

Possible Properties

ParameterDescription
statusPENDING, CANCELED, SUCCEED, FAILED