Search API
Transaction Search API
Retrieve information about transactions. The API can return information about one specific transaction or a list of transactions, based on the search criteria requested via API.
If the transactionCode is not sent, a date range search is mandatory. The maximum date range search is 30 days.
Search API URL for Production
https://api.boacompra.com/transactions/{transactionCode}
Method: GET
Search API URL for Sandbox
https://api.sandbox.boacompra.com/transactions/{transactionCode}
Method: GET
Accept Header for Transaction Search
Please note that the Transaction Search API will only receive the following Accept header value:
application/vnd.boacompra.com.v1+json; charset=UTF-8
Input Parameters
Parameter | Mandatory? | Type | Description |
---|---|---|---|
initial-order-date | Optional | Timestamp | Initial date, based when the order was created, to be searched. Only transactions created after the date sent in this parameter will be returned. If a transactionCode is not sent, a date range search is mandatory. Format: YYYY-MM-DDThh:mm:ss.sTZD Example: 2015-06-09T14:00:00.000-03:00 |
final-order-date | Optional | Timestamp | Final date, based when the order was created, to be searched. Only transactions created before this date will be returned. If an initial-order-date is sent and the final-order-date is left in blank, the current date will be considered unless it is greater than 30 days. In this case, will be considered a 30-day search. If a final-order-date is sent, the parameter initial-order-date is required. Format: YYYY-MM-DDThh:mm:ss.sTZD Example: 2015-06-10T14:00:00.000-03:00 |
initial-payment-date | Optional | Timestamp | Initial date, based when the order was payed, to be searched. Only transactions payed after the date sent in this parameter will be returned. If a transactionCode is not sent, a date range search is mandatory. Format: YYYY-MM-DDThh:mm:ss.sTZD Example: 2015-06-09T14:00:00.000-03:00 |
final-payment-date | Optional | Timestamp | Final date, based when the order was created, to be searched. Only transactions payed before this dates will be returned. If an initial-payment-date is sent and the final-payment-date is left in blank, the current date will be considered unless it is greater than 30 days. In this case, will be considered a 30-day search. If a final-payment-date is sent, the parameter initial-payment-date becomes required. Format: YYYY-MM-DDThh:mm:ss.sTZD Example: 2015-06-10T14:00:00.000-03:00 |
initial-last-status-change-date | Optional | Timestamp | Initial date, based on the last status change, to be searched. Only transactions with changes on their status after the date sent in this parameter will be returned. If a transactionCode is not sent, a date range search is mandatory. Format: YYYY-MM-DDThh:mm:ss.sTZD |
final-last-status-change-date | Optional | Timestamp | Final date, based on the last status change, to be searched. Only transactions with changes on their status before this dates will be returned. If the initial-last-status-change-date is sent and the final-last-status-change-date is left in blank, the current date will be considered unless it is greater than 30 days. In this case, will be considered a 30-day search. If final-last-status-change-date is sent, the parameter initial-last-status-change-date becomes required. Format: YYYY-MM-DDThh:mm:ss.sTZD Example: 2015-06-10T14:00:00.000-03:00 |
status | Optional | String | Transactions status to be filtered. Values: CANCELLED , COMPLETE , CHARGEBACK , EXPIRED , NOT-PAID , PENDING , REFUNDED , UNDER-REVIEW |
page | Optional | Int | If the search result is presented in more than one page, it’s possible to use this parameter to navigate among the pages. |
max-page-results | Optional | Int | Number of results per page. Default value and maximum accepted is 10. |
In the sequence, a few examples of requests are available:
-
https://api.boacompra.com/transactions/{transactionCode}
- Returns the information of a specific transaction -
https://api.boacompra.com/transactions?initial-order-date=2015-06-10T14:00:00.000-03:00&final-order-date=2015-06-20T14:00:00.000-03:00
- Returns the first ten transactions created on the informed period
Success Response
The response contains metadata information with the number of transactions returned for the request and an array of transaction’s object with the information of each transaction.
HTTP Status Code: 200
Transaction Status Description
Name | Description |
---|---|
CANCELLED | Transaction was cancelled by PagSeguro |
COMPLETE | Transaction was paid and approved. Products should be delivered to the End User |
CHARGEBACK | An approved transaction was cancelled by the End User. Please consult your Account Manager for costs. |
EXPIRED | Payment date of transaction expired |
NOT-PAID | Payment confirmation of transaction was not receive. |
PENDING | Transaction was created |
REFUNDED | A partial or full refund was requested and accepted for the transaction |
UNDER-REVIEW | Transaction is under review by PagSeguro Analysis team. It will be approved or cancelled based on the analysis. |
Response body contents
Parameter | Description |
---|---|
transactions-result Object | |
transaction-code | PagSeguro unique identifier for the transaction |
order-id | Merchant unique identifier for the transaction |
order-description | Description provided by the Merchant when the checkout was created |
status | Transaction status |
currency | Currency related to the amount of the transaction |
amount | Amount of the transaction |
customer-mail | Customer e-mail used in PagSeguro checkout |
customer-country | Country in which the customer IP was tracked |
notify-url | URL that PagSeguro notified the Merchant |
payment-country | Country where the payment was made |
payment-id | PagSeguro payment identifier (for more information, check the Integration Guide) |
order-date | Date that the checkout was created |
payment-date | Date that the customer paid the order |
last-status-change-date | Date that the last status change occurred |
chargeback-date | DEPRECATED - Return is null |
refundable | Indicates whether the payment method is refundable |
refunds Object | Object is only returned when the transaction has a refund linked to it |
refund-id | PagSeguro unique identifier for a refund |
refund-status | Status of the refund |
refund-amount | Amount to be refunded |
refund-date | Date that the refund was requested |
refund-processing-date | Date that the refund was paid |
refund-reference | Merchant refund identifier |
payment-methods Object | Object contains information about the tokenized card |
date-created | Tokenized card creation date |
credit-cart Object | Object contains information about the tokenized card |
brand | Brand of the credit card |
masked-number | The last 4 digits of the credit card |
expiration-date | Expiration date of the credit card |
payment-response Object | Indicates the reason for declining the transaction [*] |
code | Credit card rejection reason code |
message | Detailed credit card reason code message |
payment Object | Object returns payment details |
payment-method Object | Object returns details of the payment method used by the payer |
type | Indicates the payment type |
sub-type | Indicates the payment sub-type |
bank Object | Object is returned for payments made with PIX |
name | Contains the name of the payment institution |
code | Customer bank ISPB code. |
bank.account Object | Object contains payment institution details |
number | Contains bank account number |
branch | Contains the branch number of the payment institution |
type | Contains the type of bank account, possible options: CRN: Current Account PAC: Payment Account SVN: Savings Account SAL: Salary Account |
bank.account.holder Object | Object contains details of bank account holder |
name | Contains the name of the bank account holder |
bank.account.holder.document Object | Object contains details of the bank account holder's identification document |
number | Contains the identification document number of the bank account holder |
Response example
Response example with PIX
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "99628141",
"order-id": "REF-XXX-1722270923",
"order-description": "Product Description Test",
"status": "COMPLETE",
"currency": "BRL",
"amount": "10.00",
"customer-email": "[email protected]",
"customer-country": "BR",
"notify-url": "https://merchant.store.com/consume_notifications.php",
"payment-country": "BR",
"payment-id": "229",
"payment-name": "pix",
"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",
"chargeback-date": null,
"refundable": true,
"refunds": [],
"payment-methods": [],
"payment-response": null,
"payment": {
"payment-method": {
"type": "eft",
"sub-type": "pix"
},
"bank": {
"name": "PAGBANK (PAGSEGURO INTERNET S.A.)",
"code": "08561701",
"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
}
}
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "735629591",
"order-id": "REF-XXX-1726581281",
"order-description": "Product Description Test",
"status": "REFUNDED",
"currency": "BRL",
"amount": "1.00",
"customer-email": "[email protected]",
"customer-country": "BR",
"notify-url": "https://merchant.store.com/consume_notifications.php",
"payment-country": "BR",
"payment-id": "229",
"payment-name": "pix",
"order-date": "2024-09-17T10:55:43-03:00",
"payment-date": "2024-09-17T10:56:34-03:00",
"last-status-change-date": "2024-09-17T11:06:25-03:00",
"chargeback-date": null,
"refundable": true,
"refunds": [
{
"refund-id": "1123426",
"refund-status": "PROCESSED",
"refund-amount": "1.00",
"refund-date": "2024-09-17T11:06:22-03:00",
"refund-processing-date": "2024-09-17T00:00:00-03:00",
"refund-reference": null
}
],
"payment-methods": [],
"payment-response": null,
"payment": {
"payment-method": {
"type": "eft",
"sub-type": "pix"
},
"bank": {
"name": "PAGBANK (PAGSEGURO INTERNET S.A.)",
"code": "08561701",
"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
}
}
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "99628141",
"order-id": "REF-XXX-1722270923",
"order-description": "Product Description Test",
"status": "CANCELLED",
"currency": "BRL",
"amount": "10.00",
"customer-email": "[email protected]",
"customer-country": "BR",
"notify-url": "https://merchant.store.com/consume_notifications.php",
"payment-country": "BR",
"payment-id": "229",
"payment-name": "pix",
"order-date": "2024-07-29T13:35:30-03:00",
"payment-date": null,
"last-status-change-date": "2024-07-29T13:37:37-03:00",
"chargeback-date": null,
"refundable": false,
"refunds": [],
"payment-methods": [],
"payment-response": null,
"payment": {
"payment-method": {
"type": "eft",
"sub-type": "pix"
},
"bank": null
}
}
]
},
"metadata": {
"found": "1",
"page-results": 1,
"current-page": 1,
"total-pages": 1
}
}
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "99628141",
"order-id": "REF-XXX-1722270923",
"order-description": "Product Description Test",
"status": "EXPIRED",
"currency": "BRL",
"amount": "10.00",
"customer-email": "[email protected]",
"customer-country": "BR",
"notify-url": "https://merchant.store.com/consume_notifications.php",
"payment-country": "BR",
"payment-id": "229",
"payment-name": "pix",
"order-date": "2024-07-29T13:35:30-03:00",
"payment-date": null,
"last-status-change-date": "2024-07-29T14:35:37-03:00",
"chargeback-date": null,
"refundable": false,
"refunds": [],
"payment-methods": [],
"payment-response": null,
"payment": {
"payment-method": {
"type": "eft",
"sub-type": "pix"
},
"bank": null
}
}
]
},
"metadata": {
"found": "1",
"page-results": 1,
"current-page": 1,
"total-pages": 1
}
}
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "99628141",
"order-id": "REF-XXX-1722270923",
"order-description": "Product Description Test",
"status": "PENDING",
"currency": "BRL",
"amount": "10.00",
"customer-email": "[email protected]",
"customer-country": "BR",
"notify-url": "https://merchant.store.com/consume_notifications.php",
"payment-country": "BR",
"payment-id": "229",
"payment-name": "pix",
"order-date": "2024-07-29T13:35:30-03:00",
"payment-date": null,
"last-status-change-date": "2024-07-29T13:35:37-03:00",
"chargeback-date": null,
"refundable": false,
"refunds": [],
"payment-methods": [],
"payment-response": null,
"payment": {
"payment-method": {
"type": "eft",
"sub-type": "pix"
},
"bank": null
}
}
]
},
"metadata": {
"found": "1",
"page-results": 1,
"current-page": 1,
"total-pages": 1
}
}
Response example with Cards
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "735661244",
"order-id": "REF-XXX-1726584451535",
"order-description": "Product Description Test",
"status": "COMPLETE",
"currency": "BRL",
"amount": "6.00",
"customer-email": "[email protected]",
"customer-country": "BR",
"notify-url": "https://merchant.store.com/consume_notifications.php",
"payment-country": "BR",
"payment-id": "3",
"payment-name": "mastercard",
"order-date": "2024-09-17T11:47:33-03:00",
"payment-date": "2024-09-17T11:47:38-03:00",
"last-status-change-date": "2024-09-17T11:47:38-03:00",
"chargeback-date": null,
"refundable": true,
"refunds": [],
"payment-methods": [],
"payment-response": null
}
]
},
"metadata": {
"found": "1",
"page-results": 1,
"current-page": 1,
"total-pages": 1
}
}
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "735661244",
"order-id": "REF-XXX-1726584451535",
"order-description": "Calca Jeans - Product Description Test",
"status": "REFUNDED",
"currency": "BRL",
"amount": "6.00",
"customer-email": "[email protected]",
"customer-country": "BR",
"notify-url": "https://merchant.store.com/consume_notifications.php",
"payment-country": "BR",
"payment-id": "3",
"payment-name": "mastercard",
"order-date": "2024-09-17T11:47:33-03:00",
"payment-date": "2024-09-17T11:47:38-03:00",
"last-status-change-date": "2024-09-17T11:51:15-03:00",
"chargeback-date": null,
"refundable": true,
"refunds": [
{
"refund-id": "1123437",
"refund-status": "PROCESSED",
"refund-amount": "6.00",
"refund-date": "2024-09-17T11:51:12-03:00",
"refund-processing-date": "2024-09-17T00:00:00-03:00",
"refund-reference": null
}
],
"payment-methods": [],
"payment-response": null
}
]
},
"metadata": {
"found": "1",
"page-results": 1,
"current-page": 1,
"total-pages": 1
}
}
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "735665837",
"order-id": "REF-XXX-1726584842",
"order-description": "Calca Jeans",
"status": "NOT-PAID",
"currency": "BRL",
"amount": "6.00",
"customer-email": "[email protected]",
"customer-country": "BR",
"notify-url": "https://merchant.store.com/consume_notifications.php",
"payment-country": "BR",
"payment-id": "3",
"payment-name": "mastercard",
"order-date": "2024-09-17T11:54:18-03:00",
"payment-date": null,
"last-status-change-date": "2024-09-17T11:54:20-03:00",
"chargeback-date": null,
"refundable": false,
"refunds": [],
"payment-methods": [],
"payment-response": {
"code": 10000,
"message": "Not authorized by acquirer"
}
}
]
},
"metadata": {
"found": "1",
"page-results": 1,
"current-page": 1,
"total-pages": 1
}
}
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "735036008",
"order-id": "TEST-1726496059929",
"order-description": "produto teste",
"status": "CANCELLED",
"currency": "CLP",
"amount": "100.00",
"customer-email": "[email protected]",
"customer-country": "BR",
"notify-url": "https://merchant.store.com/consume_notifications.php",
"payment-country": "CL",
"payment-id": "3",
"payment-name": "mastercard",
"order-date": "2024-09-16T11:14:28-03:00",
"payment-date": null,
"last-status-change-date": "2024-09-16T11:14:56-03:00",
"chargeback-date": null,
"refundable": true,
"refunds": [],
"payment-methods": [],
"payment-response": null
}
]
},
"metadata": {
"found": "1",
"page-results": 1,
"current-page": 1,
"total-pages": 1
}
}
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "73556612454",
"order-id": "REF-XXX-17265844451235",
"order-description": "Product Description Test",
"status": "CHARGEBACK",
"currency": "BRL",
"amount": "6.00",
"customer-email": "[email protected]",
"customer-country": "BR",
"notify-url": "https://merchant.store.com/consume_notifications.php",
"payment-country": "BR",
"payment-id": "3",
"payment-name": "mastercard",
"order-date": "2024-09-17T11:47:33-03:00",
"payment-date": "2024-09-17T11:47:38-03:00",
"last-status-change-date": "2024-09-20T10:17:38-03:00",
"chargeback-date": null,
"refundable": true,
"refunds": [],
"payment-methods": [],
"payment-response": null
}
]
},
"metadata": {
"found": "1",
"page-results": 1,
"current-page": 1,
"total-pages": 1
}
}
{
"transaction-result": {
"store-id": "1",
"transactions": [
{
"transaction-code": "73556612454",
"order-id": "REF-XXX-17265844451235",
"order-description": "Product Description Test",
"status": "UNDER-REVIEW",
"currency": "BRL",
"amount": "6.00",
"customer-email": "[email protected]",
"customer-country": "BR",
"notify-url": "https://merchant.store.com/consume_notifications.php",
"payment-country": "BR",
"payment-id": "3",
"payment-name": "mastercard",
"order-date": "2024-09-17T11:47:33-03:00",
"payment-date": null,
"last-status-change-date": "2024-09-20T10:17:38-03:00",
"chargeback-date": null,
"refundable": true,
"refunds": [],
"payment-methods": [],
"payment-response": null
}
]
},
"metadata": {
"found": "1",
"page-results": 1,
"current-page": 1,
"total-pages": 1
}
}
Response example with error
In case of errors in the request, expect a HTTP Status Code different from 200. The body response also contains an error object with the description and an error code, like the following example. Error Code list here.
{
"errors": [
{
"code": "17078",
"description": "currency_not_accepted"
}
]
}
Reason Code
Reason Codes are used to identify the decline cause for rejecting payment. These codes are typically used for cards, but may also happen on other payment methods, like EFT.
Code | Message |
---|---|
10000 | Not authorized by acquirer |
10001 | Contact your card central |
10002 | Expired card - do not try again |
10003 | Not authorized. Contact your card central |
10004 | Invalid requirement |
10005 | Invalid transaction |
10007 | Check the card data |
10008 | Invalid installment - do not try again |
10009 | Invalid cvv |
10010 | Canceled transaction |
10011 | Exceeded date for operation |
10012 | Transaction value not allowed. Do not try again |
10013 | Capture failure |
10014 | Cancellation failed |
10015 | System unavailable |
10017 | Transaction not allowed. Do not try again |
10019 | Re-enter transaction |
10020 | Database error |
10021 | Non-registered or request out of time |
10022 | Number of tries exceeded |
10023 | Integrator error |
10024 | Time out |
10025 | Incorrect validity date |
10026 | Suspicious card |
10027 | Fraudulent card |
10029 | Canceled card |
10030 | Transaction already exists |
10031 | Card not configured |
10032 | Undo transaction |
10033 | Not authorized |
10034 | Transaction already canceled |
10037 | Contact your card issuer. Do not try again |
10040 | Card does not allow international transaction |
10041 | Invalid data |
10042 | Invalid token |
10043 | Error running operation |
10044 | Disabled purchaser |
10045 | The company cannot complete this transaction. Contact our support |
10046 | Transaction amount exceeded - try again later |
10047 | Rejected transaction. Contact your card issuer |
10048 | Insufficient funds |
10049 | Invalid Card |
10050 | 3-D Secure required |
10051 | Payer tax id mismatched |
10052 | Unknown error - contact the processor |
10053 | Invalid Submerchant |
10055 | Insufficient information - Please try again |
10058 | 3DS - Authentication failed |
10065 | Pre auth required |
10066 | Denied due to payer document validation rules |
10067 | Denied due to payer banking details validation rules |
Updated about 1 month ago