Skip to main content
PUT
/
invoices
/
{id}
/
mark-as-paid
curl --request PUT \
  --url 'https://api.alguna.io/invoices/inv_abc123def456/mark-as-paid' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "amountPaid": "1500.00",
    "paidDate": "2025-01-15T00:00:00Z",
    "externalPaymentSource": "bank_transfer",
    "externalPaymentNote": "Wire transfer ref: TXN-98765"
  }'
{
  "id": "inv_abc123def456",
  "accountId": "acct_xyz789",
  "status": "paid",
  "dueDate": "2025-01-31T00:00:00Z",
  "issueDate": "2025-01-01T00:00:00Z",
  "billingPeriodStart": "2025-01-01T00:00:00Z",
  "billingPeriodEnd": "2025-01-31T00:00:00Z",
  "billingPeriod": "January 1, 2025 - January 31, 2025",
  "currency": "USD",
  "description": "Invoice for period January 1, 2025 to January 31, 2025",
  "subtotal": "1500.00",
  "tax": "0.00",
  "total": "1500.00",
  "amountPaid": "1500.00",
  "amountRemaining": "0.00",
  "createdAt": "2025-01-01T00:00:00Z",
  "updatedAt": "2025-01-15T12:00:00Z"
}
Marks an invoice as paid without creating a payment through a payment provider. Use this when recording payments received outside of Alguna (e.g., bank transfers, cheques, or cash). If you have a customer-facing invoice reference number instead of an Alguna invoice ID, use the Invoice Lookup endpoint first to resolve it.

Params

id
string
required
The Alguna ID of the invoice to mark as paid.

Request Body

All fields are optional. When omitted, sensible defaults are applied (full invoice amount, current date).
amountPaid
string
The amount paid as a decimal string. Defaults to the full invoice total when omitted.
paidDate
string
The date the payment was received. (RFC 3339 formatted timestamp). Defaults to the current date when omitted.
externalPaymentSource
string
The source of the external payment. One of: bank_transfer, cheque, payment_card, cash, other.
externalPaymentNote
string
A free-text note describing the payment (e.g., a bank reference or cheque number).

Response

Returns the full invoice object with its status updated to paid.
id
string
The Alguna ID of the invoice.
accountId
string
The Alguna ID of the account associated with the invoice.
status
string
The status of the invoice. Will be paid after a successful call.
dueDate
string
The due date of the invoice. (RFC 3339 timestamp)
issueDate
string
The date when the invoice was issued. (RFC 3339 timestamp)
billingPeriodStart
string
The start date of the billing period for the invoice. (RFC 3339 timestamp)
billingPeriodEnd
string
The end date of the billing period for the invoice. (RFC 3339 timestamp)
billingPeriod
string
The formatted billing period for the invoice.
currency
string
The ISO 4217 currency in which the invoice is billed.
description
string
The description of the invoice.
subtotal
string
The subtotal amount of the invoice as a decimal string.
tax
string
The tax amount of the invoice as a decimal string.
total
string
The total amount of the invoice as a decimal string.
amountPaid
string
The amount that has been paid for the invoice as a decimal string.
amountRemaining
string
The remaining amount to be paid for the invoice as a decimal string.
createdAt
datetime
The date and time at which the invoice was created.
updatedAt
datetime
The date and time at which the invoice was last updated.

Example

curl --request PUT \
  --url 'https://api.alguna.io/invoices/inv_abc123def456/mark-as-paid' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "amountPaid": "1500.00",
    "paidDate": "2025-01-15T00:00:00Z",
    "externalPaymentSource": "bank_transfer",
    "externalPaymentNote": "Wire transfer ref: TXN-98765"
  }'
{
  "id": "inv_abc123def456",
  "accountId": "acct_xyz789",
  "status": "paid",
  "dueDate": "2025-01-31T00:00:00Z",
  "issueDate": "2025-01-01T00:00:00Z",
  "billingPeriodStart": "2025-01-01T00:00:00Z",
  "billingPeriodEnd": "2025-01-31T00:00:00Z",
  "billingPeriod": "January 1, 2025 - January 31, 2025",
  "currency": "USD",
  "description": "Invoice for period January 1, 2025 to January 31, 2025",
  "subtotal": "1500.00",
  "tax": "0.00",
  "total": "1500.00",
  "amountPaid": "1500.00",
  "amountRemaining": "0.00",
  "createdAt": "2025-01-01T00:00:00Z",
  "updatedAt": "2025-01-15T12:00:00Z"
}