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

ParameterMandatory?TypeDescription
initial-order-dateOptionalTimestampInitial 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-dateOptionalTimestampFinal 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-dateOptionalTimestampInitial 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-dateOptionalTimestampFinal 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-dateOptionalTimestampInitial 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-dateOptionalTimestampFinal 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
statusOptionalStringTransactions status to be filtered.
Values: CANCELLED, COMPLETE, CHARGEBACK, EXPIRED, NOT-PAID, PENDING, REFUNDED, UNDER-REVIEW
pageOptionalIntIf the search result is presented in more than one page, it’s possible to use this parameter to navigate among the pages.
max-page-resultsOptionalIntNumber of results per page. Default value and maximum accepted is 10.

In the sequence, a few examples of requests are available:

  1. https://api.boacompra.com/transactions/{transactionCode} - Returns the information of a specific transaction

  2. 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

NameDescription
CANCELLEDTransaction was cancelled by PagSeguro
COMPLETETransaction was paid and approved. Products should be delivered to the End User
CHARGEBACKAn approved transaction was cancelled by the End User. Please consult your Account Manager for costs.
EXPIREDPayment date of transaction expired
NOT-PAIDPayment confirmation of transaction was not receive.
PENDINGTransaction was created
REFUNDEDA partial or full refund was requested and accepted for the transaction
UNDER-REVIEWTransaction is under review by PagSeguro Analysis team. It will be approved or cancelled based on the analysis.

Response body contents

ParameterDescription
transactions-result Object
transaction-codePagSeguro unique identifier for the transaction
order-idMerchant unique identifier for the transaction
order-descriptionDescription provided by the Merchant when the checkout was created
statusTransaction status
currencyCurrency related to the amount of the transaction
amountAmount of the transaction
customer-mailCustomer e-mail used in PagSeguro checkout
customer-countryCountry in which the customer IP was tracked
notify-urlURL that PagSeguro notified the Merchant
payment-countryCountry where the payment was made
payment-idPagSeguro payment identifier (for more information, check the Integration Guide)
order-dateDate that the checkout was created
payment-dateDate that the customer paid the order
last-status-change-dateDate that the last status change occurred
chargeback-dateDEPRECATED - Return is null
refundableIndicates whether the payment method is refundable
refunds ObjectObject is only returned when the transaction has a refund linked to it
refund-idPagSeguro unique identifier for a refund
refund-statusStatus of the refund
refund-amountAmount to be refunded
refund-dateDate that the refund was requested
refund-processing-dateDate that the refund was paid
refund-referenceMerchant refund identifier
payment-methods ObjectObject contains information about the tokenized card
date-createdTokenized card creation date
credit-cart ObjectObject contains information about the tokenized card
brandBrand of the credit card
masked-numberThe last 4 digits of the credit card
expiration-dateExpiration date of the credit card
payment-response ObjectIndicates the reason for declining the transaction [*]
codeCredit card rejection reason code
messageDetailed credit card reason code message
payment ObjectObject returns payment details
payment-method ObjectObject returns details of the payment method used by the payer
typeIndicates the payment type
sub-typeIndicates the payment sub-type
bank ObjectObject is returned for payments made with PIX
nameContains the name of the payment institution
codeCustomer bank ISPB code.
bank.account ObjectObject contains payment institution details
numberContains bank account number
branchContains the branch number of the payment institution
typeContains the type of bank account, possible options:
CRN: Current Account
PAC: Payment Account
SVN: Savings Account
SAL: Salary Account
bank.account.holder ObjectObject contains details of bank account holder
nameContains the name of the bank account holder
bank.account.holder.document ObjectObject contains details of the bank account holder's identification document
numberContains 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.

CodeMessage
10000Not authorized by acquirer
10001Contact your card central
10002Expired card - do not try again
10003Not authorized. Contact your card central
10004Invalid requirement
10005Invalid transaction
10007Check the card data
10008Invalid installment - do not try again
10009Invalid cvv
10010Canceled transaction
10011Exceeded date for operation
10012Transaction value not allowed. Do not try again
10013Capture failure
10014Cancellation failed
10015System unavailable
10017Transaction not allowed. Do not try again
10019Re-enter transaction
10020Database error
10021Non-registered or request out of time
10022Number of tries exceeded
10023Integrator error
10024Time out
10025Incorrect validity date
10026Suspicious card
10027Fraudulent card
10029Canceled card
10030Transaction already exists
10031Card not configured
10032Undo transaction
10033Not authorized
10034Transaction already canceled
10037Contact your card issuer. Do not try again
10040Card does not allow international transaction
10041Invalid data
10042Invalid token
10043Error running operation
10044Disabled purchaser
10045The company cannot complete this transaction. Contact our support
10046Transaction amount exceeded - try again later
10047Rejected transaction. Contact your card issuer
10048Insufficient funds
10049Invalid Card
100503-D Secure required
10051Payer tax id mismatched
10052Unknown error - contact the processor
10053Invalid Submerchant
10055Insufficient information - Please try again
100583DS - Authentication failed
10065Pre auth required
10066Denied due to payer document validation rules
10067Denied due to payer banking details validation rules