Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.upag.io/llms.txt

Use this file to discover all available pages before exploring further.

Marca uma fatura como paga manualmente, sem processar um pagamento pelo gateway. Útil para registrar pagamentos realizados fora da plataforma (ex.: transferência bancária).

Endpoint

cURL
curl -X POST https://api.upag.io/v1/invoices/inv_abc123xyz/mark-as-paid \
  -H "Authorization: Bearer {token}"

Parâmetros

id
string
required
ID único da fatura, começando com inv_.

Resposta

Response
{
  "id": "inv_abc123xyz",
  "customerId": "cus_ahwDXrgYvur89iPs",
  "paymentMethodId": "pm_abc123xyz",
  "currency": "BRL",
  "status": "paid",
  "livemode": false,
  "number": "INV-001",
  "description": null,
  "dueDate": "2024-12-15T00:00:00.000Z",
  "paidAt": "2024-11-15T11:00:00.000Z",
  "amountDue": 9900,
  "amountPaid": 9900,
  "attemptCount": 0,
  "subscriptionId": null,
  "items": [
    {
      "id": "ii_abc123xyz",
      "priceId": "price_def456ghi",
      "quantity": 1,
      "amount": 9900
    }
  ],
  "payments": [],
  "createdAt": "2024-11-15T10:00:00.000Z",
  "updatedAt": "2024-11-15T11:00:00.000Z"
}