# Mark invoice payable as paid

> Marks an invoice payable as paid by recording a bank payment that clears it. Use paymentOption=FULL to clear the remaining outstanding balance, or paymentOption=PARTIAL to record an installment. The invoice transitions to PAID (full) or PARTIALLY_PAID (partial).

`POST https://api.light.inc/v1/invoice-payables/{invoicePayableId}/mark-as-paid`

## Note

paymentAt is required , contrary to the description; omitting it fails with INVOICE_PAYABLE_MARK_AS_PAID_INVALID_FIELD ("Payment date is required"). One of bankAccountId or ledgerAccountId is also required. amount is in the bank account's currency when you pay from a bank account (the invoice amount is converted at the company rate), and in the invoice currency for a non-bank ledger account. Allowed from UNPAID , READY_FOR_PAYMENT_RELEASE , SCHEDULED , PAYMENT_PENDING and PARTIALLY_PAID . paymentOption: FULL needs amount at least the remaining balance ( INVOICE_PAYABLE_FULL_PAYMENT_AMOUNT_TOO_SMALL ); any excess is booked as bank fees and the bill becomes PAID , then COMPLETED once settled. PARTIAL needs amount below the balance ( INVOICE_PAYABLE_PARTIAL_PAYMENT_AMOUNT_TOO_LARGE ) and gives PARTIALLY_PAID without storing paymentAt . Either way a bank-payment document is posted that clears the bill; it appears on GET .../payments as type BP , and its payment.accountingDocumentId is what reverse-clearing takes. Requires a user credential. Save a distinct X-Idempotency-Key for each genuine payment, including each partial instalment. Reuse that payment's key and body on retries; a replay records no new payment and returns the original bill response. Do not use a body hash alone to identify separate identical instalments. See Idempotency (/docs/getting-started/idempotency).

## Authorization

- API key
- Bearer token

See https://light.inc/docs/getting-started/authentication.

## Path parameters

- `invoicePayableId` (string, uuid, required)

## Header parameters

- `X-Idempotency-Key` (string)

## Request body

`application/json;charset=UTF-8`

- `amount` — In the **bank account's** currency when paying from `bankAccountId`; in the invoice currency only for a non-bank `ledgerAccountId`.
- `paymentAt` — Required, despite the description: omitting it fails with `INVOICE_PAYABLE_MARK_AS_PAID_INVALID_FIELD`.

```json
{
  "amount": 100000,
  "bankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ledgerAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "paymentAt": "2026-01-15T09:30:00Z",
  "comment": "string",
  "paymentOption": "FULL"
}
```

Values above are generated from the schema: the shapes and types are real, the values are placeholders, and fields that exclude each other are all shown. Do not send it unchanged.

## Response

- `invoicePayableId` — Always identical to `id`.
- `state` — Every `*_PENDING` state resolves in the background: poll. Actions called in the wrong state fail with `INVOICE_PAYABLE_EVENT_NOT_SUPPORTED`. `PAID` means marked as paid but not yet settled; `COMPLETED` is settled, and only then can the clearing be reversed.
- `failureContext` — On a bill this carries approval-submission, posting or duplicate errors (`APPROVAL_SUBMISSION_FAILED`, `ERP_ENTRY_FAILED`, `DUPLICATE_INVOICE`); the description about vendor onboarding is a copy-paste from another model.
- `vendorDetailsOcr.phoneNumber` — May be `null` when the scan did not find one.
- `vendorDetailsOcr.phoneNumber.localNumber` — The number without the country code.
- `outstandingBalance` — Omitted on every write response and on `GET` without `includeOutstandingBalance=true`; also omitted when the computed balance would be negative.
- `issuedDate` — The date the vendor issued the invoice. This model carries no `postingDate` — for the date the document hit the ledger, read the ledger line via `GET /v1/ledger-transaction-lines`.
- `purchaseOrderId` — The order matched to this bill in Light. Read-only in practice: the `PATCH` field of the same name is ignored.

```json
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "REIMBURSEMENT",
  "metadata": {
    "type": "SELF_BILLED_METADATA"
  },
  "invoicePayableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "state": "INIT",
  "failureReason": "EMAIL_NOT_ALLOWED",
  "failureContext": {
    "name": "string",
    "type": "BAD_REQUEST",
    "errors": [
      {
        "type": "string",
        "message": "string",
        "path": [
          "string"
        ],
        "context": null
      }
    ]
  },
  "warningContext": {
    "name": "string",
    "type": "BAD_REQUEST",
    "errors": [
      {
        "type": "string",
        "message": "string",
        "path": [
          "string"
        ],
        "context": null
      }
    ]
  },
  "approvalNote": "string",
  "cancellationReason": "string",
  "payeeName": "string",
  "payeeIban": "string",
  "payeeBban": "string",
  "payeeBic": "string",
  "payeeBankCode": "string",
  "payeeSwedishBankgiroNumber": "string",
  "payeeSwedishPlusgiroNumber": "string",
  "payeeCountry": "AC",
  "payeeAddress": "string",
  "payeeZipcode": "string",
  "payeeBankName": "string",
  "payeeBankCountry": "AC",
  "payeeBankAddress": "string",
  "payeeBankZipcode": "string",
  "payeeCity": "string",
  "payeeBankCity": "string",
  "vendorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "vendorDetailsOcr": {
    "avatarUrl": "string",
    "name": "string",
    "email": "string",
    "phoneNumber": {
      "countryCode": "AC",
      "localNumber": "string"
    },
    "website": "string",
    "country": "AC",
    "city": "string",
    "address": "string",
    "zipcode": "string",
    "bankAccountNumber": "string",
    "bankAccountBic": "string",
    "domesticBankAccountNumber": "string",
    "domesticBankAccountCode": "string",
    "vatId": "string"
  },
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceNumber": "string",
  "amount": 100000,
  "outstandingBalance": 100000,
  "currency": "USD",
  "description": "string",
  "senderBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fiNumber": "string",
  "finnishPaymentReference": "string",
  "norKidReference": "string",
  "swissPaymentReference": "string",
  "swedishOcrReference": "string",
  "creditorNoteOverride": "string",
  "senderPurposeCode": "string",
  "receiverPurposeCode": "string",
  "paymentAt": "2026-01-15T09:30:00Z",
  "ocrCompletedAt": "2026-01-15T09:30:00Z",
  "canceledAt": "2026-01-15T09:30:00Z",
  "issuedDate": "2026-01-15",
  "dueDate": "2026-01-15",
  "invoiceCreatedAt": "2026-01-15T09:30:00Z",
  "updatedAt": "2026-01-15T09:30:00Z",
  "purchaseOrderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "lineItemsIncludeTax": true,
  "localCurrencyFxRate": 0,
  "groupCurrencyFxRate": 0,
  "lineItems": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "invoicePayableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "REIMBURSEMENT",
      "metadata": {
        "type": "REIMBURSEMENT"
      },
      "amount": 100000,
      "netAmount": 100000,
      "description": "string",
      "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "taxAmount": 100000,
      "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "costCenterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amortizationStartDate": "2026-01-15",
      "amortizationEndDate": "2026-01-15",
      "amortizationTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "customPropertiesOld": {
        "items": null
      },
      "aiValueSuggestions": [
        {
          "field": "string",
          "fieldValues": [
            "string"
          ],
          "reasoning": "string"
        }
      ],
      "customProperties": [
        {
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "string",
          "values": [
            {}
          ]
        }
      ],
      "createdAt": "2026-01-15T09:30:00Z",
      "updatedAt": "2026-01-15T09:30:00Z"
    }
  ],
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "groupInternalName": "string",
      "values": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "string",
          "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "internalName": "string",
          "label": "string",
          "context": "string",
          "createdAt": "2026-01-15T09:30:00Z",
          "updatedAt": "2026-01-15T09:30:00Z"
        }
      ]
    }
  ],
  "paymentPausedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "paymentPausedAt": "2026-01-15T09:30:00Z",
  "senderEmail": "string",
  "documentName": "string"
}
```

Values above are generated from the schema: the shapes and types are real, the values are placeholders.

## Code

```bash
# Set LIGHT_IDEMPOTENCY_KEY to a key saved for this operation; reuse it on retries.
curl -X POST "https://api.light.inc/v1/invoice-payables/3c90c3cc-0d44-4b50-8888-8dd25736052a/mark-as-paid" \
  -H "Authorization: Basic YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Idempotency-Key: ${LIGHT_IDEMPOTENCY_KEY:?Set a saved key for this operation}" \
  -d '{
  "amount": 100000,
  "bankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ledgerAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "paymentAt": "2026-01-15T09:30:00Z",
  "comment": "string",
  "paymentOption": "FULL"
}'
```

---

Full page: https://light.inc/docs/api-reference/v1--invoice-payables/mark-invoice-payable-as-paid · Index: https://light.inc/docs/llms.txt
