List Cancellation Requests
API data
API Gateway
This API is used for payment gateway operations:
- Production: https://api.sopague.com.br/gateway
- Sandbox: https://api-hmg.sopague.com.br/gateway
- Architecture: Representational State Transfer (REST)
Retrieve cancellation request list
Used to retrieve the list of cancellation requests, with filtering options by status or cancellation ID. Supports pagination for better result management.
GET /v1/refund/list?status={status}&id={id}&skip={skip}&take={take}
Data dictionary - Query parameters
| PARAMETER | DESCRIPTION | TYPE | SIZE | NOTES |
|---|---|---|---|---|
| status | Filter by request status | string | 50 | Optional. Values: PENDENTE, CANCELADO, APROVADO, REJEITADO |
| id | Filter by a specific request ID | guid | - | Optional. |
| skip | Number of records to skip | int | - | Optional. Default: 0 |
| take | Number of records to return | int | - | Optional. Default: 10. Max: 100 |
- 🟢 200 - OK
- 🟢 200 - No results
{
"items": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"nsu": "123456789",
"authorizationCode": "ABC123",
"amount": 150.50,
"operationDate": "2024-11-12",
"installments": 1,
"status": "PENDENTE",
"description": "Solicitação do cliente"
},
{
"id": "7fb95f64-8827-5673-c4gd-3d074g77bgb7",
"nsu": "987654321",
"authorizationCode": "XYZ789",
"amount": 250.00,
"operationDate": "2024-11-11",
"installments": 3,
"status": "CANCELADO",
"description": "Produto não entregue"
}
],
"totalCount": 25,
"skip": 0,
"take": 10
}
{
"items": [],
"totalCount": 0,
"skip": 0,
"take": 10
}
Data dictionary - Response
| FIELD | DESCRIPTION | TYPE | NOTES |
|---|---|---|---|
| items | List of cancellation requests | array | - |
| items[].id | Unique identifier of the request | guid | - |
| items[].nsu | Operation identification number | string | - |
| items[].authorizationCode | Operation authorization code | string | - |
| items[].amount | Total transaction amount | decimal | - |
| items[].operationDate | Operation date | date | Format: YYYY-MM-DD |
| items[].installments | Total number of installments | int | - |
| items[].status | Request status | string | PENDENTE, CANCELADO, APROVADO, REJEITADO |
| items[].description | Reason for the request | string | - |
| totalCount | Total records found | int | Considers applied filters |
| skip | Records skipped | int | Pagination value |
| take | Records returned | int | Pagination value |
Usage tips
- Use the
statusparameter to filter requests in a specific state - Use the
idparameter when you need to retrieve a specific request - Pagination is useful for large result sets
- If
idis provided, the other filters are ignored
Sorting
Results are always sorted by creation date in descending order (most recent first).