> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nevatal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Payment

> Record a payment against an invoice

## Body Parameters

<ParamField body="invoiceId" type="string" required>The invoice to pay</ParamField>
<ParamField body="amount" type="number" required>Payment amount in COP</ParamField>
<ParamField body="method" type="string" required>Payment method: `cash`, `card`, `transfer`, `other`</ParamField>
<ParamField body="reference" type="string">External transaction reference</ParamField>
<ParamField body="notes" type="string">Payment notes</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.nevatal.com/api/v1/billing/payments" \
    -H "Authorization: Bearer nvtl_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "invoiceId": "inv_001",
      "amount": 178500,
      "method": "transfer",
      "reference": "BANK-REF-12345"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "pay_002",
    "invoiceId": "inv_001",
    "amount": 178500,
    "currency": "COP",
    "method": "transfer",
    "status": "completed",
    "reference": "BANK-REF-12345",
    "paidAt": "2025-03-16T14:00:00Z"
  }
  ```

  ```json 422 theme={null}
  {
    "statusCode": 422,
    "error": "Unprocessable Entity",
    "message": "Payment amount exceeds invoice balance"
  }
  ```
</ResponseExample>
