Skip to main content

Search Payments

Search for payments (payouts) using different query methods.

EnvironmentBase URL
Productionhttps://api-pix.crypto2pay.app/v2/withdrawals

Query by ID

GET /v2/withdrawals?id={ID}

Returns a single payment record matching the provided internal ID.

Query Parameters

ParameterTypeDescription
idnumberrequiredInternal payment ID returned when the payment was created.

Example Request

curl -X GET "https://api-pix.crypto2pay.app/v2/withdrawals?id=796" \
-H "Authorization: YOUR_API_KEY"

Response 200

{
"id": 796,
"transaction_id": "9233a90c-1b2a-4c3d-8e5f-6a7b8c9d0e1f",
"status": 1,
"currency": "BRL",
"amount": 1500,
"e2e": "E8255720202504150900s0717459648",
"psp_id": "psp-ref-00001234",
"bank": {
"type": "email",
"bank_name": "COOPERATIVA DE CRÉDITO",
"ispb": "82527557",
"account_agency": "3879",
"account_number": "7716539016157248"
}
}
FieldTypeDescription
idnumberInternal payment ID.
transaction_idstringThe transaction ID provided at creation.
statusnumberCurrent payment status (see Payment Status Reference).
currencystringCurrency code.
amountnumberPayment amount in reais.
e2estringEnd-to-end identifier from the PIX network.
psp_idstringPSP reference identifier.
bankobjectBeneficiary bank details.

Query by Transaction ID

GET /v2/withdrawals?transaction_id={TRANSACTION_ID}

Returns a single payment record matching the provided transaction ID.

Query Parameters

ParameterTypeDescription
transaction_idstringrequiredThe transaction ID you provided when creating the payment.

Example Request

curl -X GET "https://api-pix.crypto2pay.app/v2/withdrawals?transaction_id=9233a90c-1b2a-4c3d-8e5f-6a7b8c9d0e1f" \
-H "Authorization: YOUR_API_KEY"

Response 200

{
"id": 796,
"transaction_id": "9233a90c-1b2a-4c3d-8e5f-6a7b8c9d0e1f",
"status": 1,
"currency": "BRL",
"amount": 1500,
"e2e": "E8255720202504150900s0717459648",
"psp_id": "psp-ref-00001234",
"bank": {
"type": "email",
"bank_name": "COOPERATIVA DE CRÉDITO",
"ispb": "82527557",
"account_agency": "3879",
"account_number": "7716539016157248"
}
}

Query by Period

GET /v2/withdrawals/period

Returns a paginated list of payments within a specified date/time range.

Query Parameters

ParameterTypeDescription
startstringrequiredStart of the period in ISO 8601 format (e.g. 2025-01-01T00:00:00).
endstringrequiredEnd of the period in ISO 8601 format (e.g. 2025-01-31T23:59:59).
pagenumberoptionalPage number (default: 1).
sizenumberoptionalNumber of records per page (default: 20).
statusnumberoptionalFilter by payment status code.

Example Request

curl -X GET "https://api-pix.crypto2pay.app/v2/withdrawals/period?start=2025-01-01T00:00:00&end=2025-01-31T23:59:59&page=1&size=20" \
-H "Authorization: YOUR_API_KEY"

Response 200

{
"count_data": 42,
"page": 1,
"size": 20,
"count_pages": 3,
"data": [
{
"id": 796,
"transaction_id": "9233a90c-1b2a-4c3d-8e5f-6a7b8c9d0e1f",
"status": 1,
"currency": "BRL",
"amount": 1500
}
]
}
FieldTypeDescription
count_datanumberTotal number of records matching the query.
pagenumberCurrent page number.
sizenumberNumber of records per page.
count_pagesnumberTotal number of pages available.
dataarrayArray of payment objects.

Query by Customer

GET /v2/withdrawals/customer?document_number={DOCUMENT_NUMBER}

Returns all payments associated with a specific customer document (CPF or CNPJ).

Query Parameters

ParameterTypeDescription
document_numberstringrequiredCustomer CPF or CNPJ — digits only, no punctuation.

Example Request

curl -X GET "https://api-pix.crypto2pay.app/v2/withdrawals/customer?document_number=12345678900" \
-H "Authorization: YOUR_API_KEY"

Response 200

[
{
"id": 796,
"transaction_id": "9233a90c-1b2a-4c3d-8e5f-6a7b8c9d0e1f",
"status": 1,
"currency": "BRL",
"amount": 1500
}
]

Errors

HTTP StatusDescription
400document_number is missing or not a valid CPF/CNPJ.
404No payments found for the provided document number.

Export by Period (CSV)

GET /v2/withdrawals/period/csv

Exports payments within a specified date/time range as a downloadable CSV file.

Query Parameters

ParameterTypeDescription
startstringrequiredStart of the period in ISO 8601 format.
endstringrequiredEnd of the period in ISO 8601 format.
statusnumberoptionalFilter by payment status code.

Example Request

curl -X GET "https://api-pix.crypto2pay.app/v2/withdrawals/period/csv?start=2025-01-01T00:00:00&end=2025-01-31T23:59:59" \
-H "Authorization: YOUR_API_KEY" \
--output withdrawals.csv

Response

Returns a CSV file with Content-Type: text/csv. Each row represents a single payment record.


Payment Status Reference

CodeStatusDescription
0CreatedPayment has been created and is pending processing.
1ApprovedPayment was successfully processed and delivered.
2RejectedPayment was rejected by the receiving institution.
3ReversedPayment was completed but subsequently reversed by the customer or bank.
4ProcessingPayment is currently being processed by the network.