Search for Transactions by Period
With PagSeguro you can retrieve a list of transactions using the Get Transactions by Date endpoint. You can filter results using date parameters, transaction status, and pagination controls.
Transaction Statuses
To check all possible transaction statuses and their descriptions, access the Transaction Statuses page.
How it Works
To use search transactions by period, you must include at least one of the supported date range filters. You can filter by:
- Order date: When the order was created.
- Payment date: When the payment was completed.
- Last status change date: When the transaction status was last updated.
You may also filter by transaction status
.
The following table lists and describes the filter options you can use:
Parameter | Description |
---|---|
initial-order-date / final-order-date | Filters transactions based on when the order was created. |
initial-payment-date / final-payment-date | Filters transactions based on when payment occurred. |
initial-last-status-change-date / final-last-status-change-date | Filters transactions based on the last status change. |
status | Filters by transaction status (e.g., COMPLETE , PENDING , CANCELLED , etc.). See all possible accessing the Transaction Statuses page. |
Restrictions and Limitations
- If a final date is provided for any filter, the corresponding initial date becomes mandatory.
- The maximum date range supported is 30 days.
Pagination
To navigate through large result sets, you can paginate the results. To use this feature, you need to inform the following parameters when using the Get Transactions by Date endpoint:
page
: Specify the page number to retrieve.max-page-results
: Number of results per page (maximum is 10).
Examples
GET /transactions?initial-order-date=2024-05-01T00:00:00-03:00&final-order-date=2024-05-15T00:00:00-03:00&status=COMPLETE&page=1&max-page-results=10
Accept: application/vnd.boacompra.com.v1+json; charset=UTF-8
Authorization: <store-id>:<signature>
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "99628141",
"order-id": "REF-XXX-1722270923",
"status": "COMPLETE",
"currency": "BRL",
"amount": "10.00",
"customer-email": "[email protected]",
"order-date": "2024-07-29T13:35:30-03:00",
"payment-date": "2024-07-29T13:36:09-03:00",
"last-status-change-date": "2024-07-29T13:36:09-03:00",
"payment": {
"payment-method": {
"type": "eft",
"sub-type": "pix"
},
"bank": {
"name": "PAGBANK (PAGSEGURO INTERNET S.A.)",
"code": "08561701",
"compe": "290",
"account": {
"branch": "0001",
"type": "PAC",
"number": "12345678",
"holder": {
"name": "John Doe",
"document": {
"number": "12345678909"
}
}
}
}
}
}
]
},
"metadata": {
"found": "1",
"page-results": 1,
"current-page": 1,
"total-pages": 1
}
}
Return of Banking Details
Bank information is returned when:
- The transaction is completed
- The transaction is declined with reason code
10067
or10068
Bank details are not returned for other declined cases, such as reason code10051
.
Updated 20 days ago