Listar transacoes
curl --request GET \
--url https://api-payment.safefypay.com.br/v1/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-payment.safefypay.com.br/v1/transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-payment.safefypay.com.br/v1/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-payment.safefypay.com.br/v1/transactions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-payment.safefypay.com.br/v1/transactions")
.header("Authorization", "Bearer <token>")
.asString();{
"data": {
"items": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"externalId": "pedido_12345",
"method": "Pix",
"amount": 10000,
"fee": 150,
"netAmount": 9850,
"currency": "BRL",
"status": "Completed",
"description": "Pagamento do pedido #12345",
"environment": "Sandbox",
"expiresAt": "2025-01-15T15:30:00Z",
"completedAt": "2025-01-15T15:10:00Z",
"createdAt": "2025-01-15T15:00:00Z",
"customerId": "550e8400-e29b-41d4-a716-446655440000",
"customer": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Joao Silva",
"email": "joao@email.com",
"document": "123.456.789-00"
}
}
],
"page": 1,
"pageSize": 20,
"totalItems": 1,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
},
"message": null,
"error": null
}{
"data": null,
"message": null,
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}Transações
Listar transações
Liste e filtre transações
GET
/
v1
/
transactions
Listar transacoes
curl --request GET \
--url https://api-payment.safefypay.com.br/v1/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-payment.safefypay.com.br/v1/transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-payment.safefypay.com.br/v1/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-payment.safefypay.com.br/v1/transactions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-payment.safefypay.com.br/v1/transactions")
.header("Authorization", "Bearer <token>")
.asString();{
"data": {
"items": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"externalId": "pedido_12345",
"method": "Pix",
"amount": 10000,
"fee": 150,
"netAmount": 9850,
"currency": "BRL",
"status": "Completed",
"description": "Pagamento do pedido #12345",
"environment": "Sandbox",
"expiresAt": "2025-01-15T15:30:00Z",
"completedAt": "2025-01-15T15:10:00Z",
"createdAt": "2025-01-15T15:00:00Z",
"customerId": "550e8400-e29b-41d4-a716-446655440000",
"customer": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Joao Silva",
"email": "joao@email.com",
"document": "123.456.789-00"
}
}
],
"page": 1,
"pageSize": 20,
"totalItems": 1,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
},
"message": null,
"error": null
}{
"data": null,
"message": null,
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}Retorna uma lista paginada de transações com opções de filtragem.
Autorizações
Token JWT obtido via /v1/auth/token
Parâmetros de consulta
Numero da pagina
Exemplo:
1
Itens por pagina (max: 100)
Exemplo:
20
Filtrar por status
Opções disponíveis:
Pending, Completed, Expired, Failed, Refunded Exemplo:
"Completed"
Filtrar por metodo de pagamento
Opções disponíveis:
Pix, CreditCard, Boleto Exemplo:
"Pix"
Buscar por ID externo
Exemplo:
"pedido_12345"
Filtrar por ID do cliente
Exemplo:
"550e8400-e29b-41d4-a716-446655440000"
Data inicial (ISO 8601)
Exemplo:
"2025-01-01T00:00:00Z"
Data final (ISO 8601)
Exemplo:
"2025-01-31T23:59:59Z"