curl --request GET \
--url https://api.sandbox.gravitypay.app/v1/payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.gravitypay.app/v1/payments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.gravitypay.app/v1/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.gravitypay.app/v1/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.gravitypay.app/v1/payments"
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.sandbox.gravitypay.app/v1/payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.gravitypay.app/v1/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "clz8h2k9x0000ab12cd34ef56",
"object": "payment",
"status": "PENDING",
"amountInCents": 123,
"currency": "brl",
"platformFeeInCents": 123,
"netInCents": 123,
"paymentMethod": "pix",
"provider": "PAGARME",
"product": {
"id": "<string>",
"name": "<string>"
},
"offerId": "<string>",
"offer": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"billingType": "ONE_TIME",
"billingCycle": "<string>",
"priceInCents": 123,
"currency": "<string>",
"setupFeeInCents": 123,
"trialDays": 123,
"maxCharges": 123,
"statementDescriptor": "<string>",
"product": {
"id": "<string>",
"name": "<string>"
}
},
"subscriptionId": "<string>",
"chargeId": "<string>",
"customer": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"document": "<string>",
"address": {
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>"
}
},
"externalId": "<string>",
"storeId": "<string>",
"metadata": {},
"tracking": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"page": 123,
"perPage": 123,
"total": 123,
"totalPages": 123,
"hasMore": true
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>"
}
}Listar cobranças
Lista paginada das cobranças (vendas) da loja da chave. Todos os filtros são opcionais; sem filtro traz tudo. A chave é escopada a uma única loja. Cada item traz o customer completo (com endereço/CEP) e a offer detalhada — o valor cheio da oferta/lote, distinto de amountInCents (o valor pago, que pode ser uma parcela).
curl --request GET \
--url https://api.sandbox.gravitypay.app/v1/payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.gravitypay.app/v1/payments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.gravitypay.app/v1/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.gravitypay.app/v1/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.gravitypay.app/v1/payments"
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.sandbox.gravitypay.app/v1/payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.gravitypay.app/v1/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "clz8h2k9x0000ab12cd34ef56",
"object": "payment",
"status": "PENDING",
"amountInCents": 123,
"currency": "brl",
"platformFeeInCents": 123,
"netInCents": 123,
"paymentMethod": "pix",
"provider": "PAGARME",
"product": {
"id": "<string>",
"name": "<string>"
},
"offerId": "<string>",
"offer": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"billingType": "ONE_TIME",
"billingCycle": "<string>",
"priceInCents": 123,
"currency": "<string>",
"setupFeeInCents": 123,
"trialDays": 123,
"maxCharges": 123,
"statementDescriptor": "<string>",
"product": {
"id": "<string>",
"name": "<string>"
}
},
"subscriptionId": "<string>",
"chargeId": "<string>",
"customer": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"document": "<string>",
"address": {
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>"
}
},
"externalId": "<string>",
"storeId": "<string>",
"metadata": {},
"tracking": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"page": 123,
"perPage": 123,
"total": 123,
"totalPages": 123,
"hasMore": true
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Página (começa em 1).
x >= 1Itens por página (máx. 500; default 500).
1 <= x <= 500Filtra por status do pagamento.
PENDING, PAID, FAILED, REFUNDED, EXPIRED Filtra os pagamentos de um produto.
Início do período (filtra por createdAt). Aceita YYYY-MM-DD (início do dia, UTC) ou ISO 8601 completo.
Fim do período (filtra por createdAt). YYYY-MM-DD é tratado como o FIM do dia (23:59:59.999 UTC), então o dia inteiro entra.
Opcional. Se enviado, precisa ser o id da loja desta chave — não há agregação cross-store; um id diferente retorna 400.

