curl --request GET \
--url https://api.malga.io/v1/purchases \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/purchases', 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.malga.io/v1/purchases"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"merchantId": "3b8c1f2a-4d5e-6f70-8192-a3b4c5d6e7f8",
"amount": 15000,
"currency": "BRL",
"capture": true,
"status": "pending",
"orderId": "pedido-1001",
"payments": [
{
"slotIndex": 0,
"amount": 10000,
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"status": "pending",
"refundedAmount": 0,
"paymentSource": {
"sourceType": "card",
"cardId": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}
},
{
"slotIndex": 1,
"amount": 5000,
"paymentMethod": {
"paymentType": "credit",
"installments": 3
},
"status": "pending",
"refundedAmount": 0,
"paymentSource": {
"sourceType": "token",
"tokenId": "9f8e7d6c-5b4a-3928-1706-5e4d3c2b1a09"
}
}
],
"createdAt": "2026-07-27T18:00:00Z",
"updatedAt": "2026-07-27T18:00:00Z"
}
],
"meta": {
"totalItems": 1,
"itemCount": 1,
"itemsPerPage": 10,
"totalPages": 1,
"currentPage": 1
}
}Listar Vendas
Lista as Vendas do cliente autenticado, com paginação e filtros opcionais. Os filtros se combinam (E lógico).
Itens da lista não trazem operation. pendingReview, activeOperation e payments[].card seguem a mesma regra da consulta individual. Sem resultados, a API responde 200 com items vazio.
curl --request GET \
--url https://api.malga.io/v1/purchases \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/purchases', 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.malga.io/v1/purchases"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"merchantId": "3b8c1f2a-4d5e-6f70-8192-a3b4c5d6e7f8",
"amount": 15000,
"currency": "BRL",
"capture": true,
"status": "pending",
"orderId": "pedido-1001",
"payments": [
{
"slotIndex": 0,
"amount": 10000,
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"status": "pending",
"refundedAmount": 0,
"paymentSource": {
"sourceType": "card",
"cardId": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}
},
{
"slotIndex": 1,
"amount": 5000,
"paymentMethod": {
"paymentType": "credit",
"installments": 3
},
"status": "pending",
"refundedAmount": 0,
"paymentSource": {
"sourceType": "token",
"tokenId": "9f8e7d6c-5b4a-3928-1706-5e4d3c2b1a09"
}
}
],
"createdAt": "2026-07-27T18:00:00Z",
"updatedAt": "2026-07-27T18:00:00Z"
}
],
"meta": {
"totalItems": 1,
"itemCount": 1,
"itemsPerPage": 10,
"totalPages": 1,
"currentPage": 1
}
}Query Parameters
Número da página a ser listada (mínimo 1)
x >= 1Quantidade de registros por página (padrão 10). Acima de 100, a API devolve 400 com invalid_request
1 <= x <= 100Ordenação por createdAt. Valores fora de asc e desc caem para desc
asc, desc Filtra pelo status da Venda. Valor fora do enum devolve 400
Status da Venda
pending, paid, failed, cancelled Filtra pelo identificador do merchant. UUID inválido devolve 400
Filtra pelo identificador do pedido
Filtra pelo identificador da Venda. UUID inválido devolve 400
Filtra pelo sessionId informado na criação da Venda. UUID inválido devolve 400
Vendas criadas a partir do instante informado (inclusive, RFC 3339). Formato inválido devolve 422
Vendas criadas até o instante informado (inclusive, RFC 3339). Formato inválido devolve 422
Was this page helpful?