Search Charges
Search for charges using different query methods.
Base URLs
| Environment | URL |
|---|---|
| Production | https://api-pix.crypto2pay.app/v2/transactions |
Query by ID
GET /v2/transactions?id={ID}
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | required | Internal 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
| Field | Type | Description |
|---|---|---|
id | integer | Internal charge ID |
transaction_id | string | Your platform's transaction identifier |
name | string | Payer's full name |
document_number | string | Payer document number |
document_type | string | CPF or CNPJ |
currency | string | Transaction currency |
amount | number | Charge amount |
status | integer | Current charge status (see status codes below) |
pix.due | string | Charge expiration date and time (ISO 8601) |
pix.qrcode | string | PIX copy-and-paste code |
webhook | string | Webhook notification URL |
created_at | string | Charge creation timestamp (ISO 8601) |
paid_at | string | Payment timestamp (ISO 8601), null if not paid |
Query by Transaction ID
GET /v2/transactions?transaction_id={TRANSACTION_ID}
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction_id | string | required | Your 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
| Parameter | Type | Required | Description |
|---|---|---|---|
start | string | required | Period start date in ISO 8601 format (UTC-0) |
end | string | required | Period end date in ISO 8601 format (UTC-0) |
page | integer | optional | Page number (default: 1) |
size | integer | optional | Number of results per page (default: 20, max: 100) |
status | integer | optional | Filter 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
| Status | Description |
|---|---|
400 | Invalid size — value exceeds the maximum allowed (100) |
400 | Invalid 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
| Parameter | Type | Required | Description |
|---|---|---|---|
start | string | required | Period start date in ISO 8601 format (UTC-0) |
end | string | required | Period 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
| Code | Description |
|---|---|
0 | Created — awaiting payment |
1 | Paid |
2 | Cancelled |
3 | Expired |
4 | Refunded |