Referência da API
Consultar cobrança
GET /v1/charges/{id}
GET /v1/charges/{id}Retorna uma cobrança pelo id. O postbackSecret não é retornado aqui (só na criação).
Autenticação: Authorization: Bearer <api_key>
Parâmetros
| Parâmetro | Em | Descrição |
|---|---|---|
id | path | Id da cobrança. |
Resposta 200
{
"id": "chg_2e59538f...",
"object": "charge",
"status": "paid",
"amountInCents": 12900,
"currency": "usd",
"items": [
{ "name": "Polishment", "quantity": 1, "unitAmountInCents": 4900 },
{ "name": "Oil Car", "quantity": 2, "unitAmountInCents": 4000 }
],
"description": "Invoice #1234",
"customer": { "email": "client@acme.com", "name": "Acme Inc." },
"metadata": { "invoiceId": "1234" },
"checkoutUrl": "https://gravitypay.app/c/chg_2e59538f...",
"createdAt": "2026-06-10T01:18:00.000Z"
}Erros
{ "error": { "type": "not_found", "message": "Cobrança não encontrada." } }
