Skip to main content

Search Charges

Search for charges using different query methods.

Base URLs

EnvironmentURL
Productionhttps://api-pix.crypto2pay.app/v2/transactions

Query by ID

GET /v2/transactions?id={ID}

Query Parameters

ParameterTypeRequiredDescription
idintegerrequiredInternal charge ID

Example Request

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

Example Response

{
"id": 59366,
"transaction_id": "12345678942",
"name": "John Doe",
"document_number": "12345678901",
"document_type": "CPF",
"currency": "BRL",
"amount": 145,
"status": 1,
"pix": {
"due": "2026-11-30T19:00:00.000Z",
"qrcode": "00020101021226890014br.gov.bcb.pix..."
},
"webhook": "https://yoursite.com/webhook",
"created_at": "2026-01-15T10:00:00.000Z",
"paid_at": "2026-01-15T10:05:00.000Z"
}

Response Fields

FieldTypeDescription
idintegerInternal charge ID
transaction_idstringYour platform's transaction identifier
namestringPayer's full name
document_numberstringPayer document number
document_typestringCPF or CNPJ
currencystringTransaction currency
amountnumberCharge amount
statusintegerCurrent charge status (see status codes below)
pix.duestringCharge expiration date and time (ISO 8601)
pix.qrcodestringPIX copy-and-paste code
webhookstringWebhook notification URL
created_atstringCharge creation timestamp (ISO 8601)
paid_atstringPayment timestamp (ISO 8601), null if not paid

Query by Transaction ID

GET /v2/transactions?transaction_id={TRANSACTION_ID}

Query Parameters

ParameterTypeRequiredDescription
transaction_idstringrequiredYour platform's transaction identifier

Example Request

curl -X GET "https://api-pix.crypto2pay.app/v2/transactions?transaction_id=12345678942" \
-H "Authorization: YOUR_API_KEY"

Example Response

{
"id": 59366,
"transaction_id": "12345678942",
"name": "John Doe",
"document_number": "12345678901",
"document_type": "CPF",
"currency": "BRL",
"amount": 145,
"status": 1,
"pix": {
"due": "2026-11-30T19:00:00.000Z",
"qrcode": "00020101021226890014br.gov.bcb.pix..."
},
"webhook": "https://yoursite.com/webhook",
"created_at": "2026-01-15T10:00:00.000Z",
"paid_at": "2026-01-15T10:05:00.000Z"
}

Query by Period

GET /v2/transactions/period

Query Parameters

ParameterTypeRequiredDescription
startstringrequiredPeriod start date in ISO 8601 format (UTC-0)
endstringrequiredPeriod end date in ISO 8601 format (UTC-0)
pageintegeroptionalPage number (default: 1)
sizeintegeroptionalNumber of results per page (default: 20, max: 100)
statusintegeroptionalFilter by charge status code

Example Request

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

Example Response

{
"data": [
{
"id": 59366,
"transaction_id": "12345678942",
"name": "John Doe",
"document_number": "12345678901",
"document_type": "CPF",
"currency": "BRL",
"amount": 145,
"status": 1,
"pix": {
"due": "2026-11-30T19:00:00.000Z",
"qrcode": "00020101021226890014br.gov.bcb.pix..."
},
"webhook": "https://yoursite.com/webhook",
"created_at": "2026-01-15T10:00:00.000Z",
"paid_at": "2026-01-15T10:05:00.000Z"
}
],
"page": 1,
"size": 20,
"total": 1
}

Error Responses

StatusDescription
400Invalid size — value exceeds the maximum allowed (100)
400Invalid date — start or end has an invalid format or start is after end

Export by Period (CSV)

GET /v2/transactions/period/csv

Export all charges within a date range as a CSV file.

Query Parameters

ParameterTypeRequiredDescription
startstringrequiredPeriod start date in ISO 8601 format (UTC-0)
endstringrequiredPeriod end date in ISO 8601 format (UTC-0)

Example Request

curl -X GET "https://api-pix.crypto2pay.app/v2/transactions/period/csv?start=2026-01-01T00:00:00.000Z&end=2026-01-31T23:59:59.000Z" \
-H "Authorization: YOUR_API_KEY" \
-o charges.csv

The response is a CSV file containing all charges within the specified period.


Charge Status Reference

CodeDescription
0Created — awaiting payment
1Paid
2Cancelled
3Expired
4Refunded