Check a Transaction Status
Once the payment process is finished, you can check the transaction status with the Search transaction using transaction code endpoint. You can find a detailed diagram of the transaction status notification process below.
Status Notification Flow

-
PagSeguro → Merchant: PagSeguro notifies Merchant that a transaction status has changed.
-
Merchant → PagSeguro: With the transaction code provided in the notification, the Merchant requests transaction information from PagSeguro.
-
PagSeguro → Merchant: PagSeguro responds with transaction information.
Follow the steps below to check the transaction status.
Step 1: Receiving Status Change Notification
When the status of a transaction changes, you will receive a notification from PagSeguro through the URL provided in the integration.notification_url
parameter.
POST https://www.merchantwebsite.com/notify?type=transaction HTTP/1.1
Content-Type: application/json
{
"test_mode": false,
"notification_type": "transaction",
"transaction_code": "9DB1FAFB-C0E6-4184-822C-8F18B3D70321"
}
Firewall and allowlist settings
If you use a firewall or allowlists, please note that to receive our notifications, you MUST allowlist the following IPs:
- 54.233.188.209
- 18.228.56.27
Step 2: Requesting Transaction Information
With the transaction code provided in the transaction_code
parameter, you can send a request to the Search transaction using transaction code endpoint. On a success, you will get a response with the updated information for that transaction, as in the example below.
{
"code": "FCDA9C80-AF1F-4968-87AB-F71890CCF137",
"status": "REFUNDED",
"refundable": true,
"integration": {
"reference": "3ecb69fe75bf444889dc55c514a60494",
"store": 10,
"project": 1,
"notification_url": "https://merchantwebsite.com/?notify"
},
"charge": {
"country": "BR",
"type": "CREDIT_CARD",
"method": "MASTERCARD",
"credit_card": {
"installments": 1
}
},
"checkout": {
"language": "pt_BR"
},
"payer": {
"email": "[email protected]"
},
"order": {
"currency": "BRL",
"date": "2021-06-01T14:52:08Z",
"items": [
{
"quantity": 1,
"description": "Product Example",
"unit_price": 1
}
]
},
"refunds": [
{
"id": 254593,
"reference": "REFUND-REFERENCE-TEST",
"status": "PROCESSED",
"amount": 1,
"date": "2021-06-01T14:54:22Z",
"processing_date": "2021-06-01T03:00:00Z"
}
]
}
Once PagSeguro responds to the transaction with the status COMPLETE
, you can deliver the purchase to the End User.
Renotification
If PagSeguro does not receive a satisfactory response from the Merchant (200 OK) in the first request, the notification enters a retry flow over 5 days. The interval of retry increases exponentially over these days. If the Merchant does not respond within this range of days with a 200 OK status code, then the notification is expired.
Updated 5 days ago