Skip to main content
POST
/
invoices
/
{invoiceId}
/
mark-paid
{
  "invoiceId": "123e4567-e89b-12d3-a456-426614174000",
  "customerId": "456789ab-cdef-0123-4567-89abcdef0123",
  "invoiceNumber": "INV-2024-001",
  "status": "SENT",
  "dueDate": "2024-02-15",
  "lineItems": [
    {
      "description": "Mobile subscription - Premium Plan",
      "subscriptionId": "b8174435-6378-4be5-a9f5-8b4aaadae5d4",
      "licenseId": "ffb19d4f-b3b6-4f2b-9365-dd80bdcf0a77",
      "productOfferingId": "mobile-plan-premium",
      "quantity": 1,
      "unitPrice": 29.99,
      "subtotal": 29.99,
      "total": 39.74,
      "taxBreakdown": [
        {
          "type": "PRODUCT_OFFERING",
          "productOfferingId": "mobile-plan-premium"
        }
      ],
      "taxAmount": 2.4,
      "taxIncluded": false,
      "fees": [
        {
          "name": "Late payment fee",
          "amount": 10
        }
      ],
      "totalFees": 10,
      "discounts": [
        {
          "name": "Volume discount",
          "amount": 5
        }
      ],
      "totalDiscounts": 5
    }
  ],
  "subtotalAmount": 29.99,
  "taxAmount": 2.4,
  "feeAmount": 2.5,
  "discountAmount": 5,
  "totalAmount": 29.89,
  "currency": "USD",
  "sentAt": "2024-01-15T10:00:00Z",
  "paidAt": "2024-02-10T14:30:00Z",
  "voidedAt": "2024-02-05T09:00:00Z",
  "invoiceUrl": "https://invoices.yourapp.com/inv_123e4567",
  "createdAt": "2024-01-15T10:00:00Z",
  "updatedAt": "2024-01-15T10:00:00Z",
  "metadata": {}
}

Authorizations

X-API-Key
string
header
required

An API key that grants access to the Connect API. You can create and manage API keys in the portal.

Headers

X-Idempotency-Key
string

A unique key to ensure idempotency of requests. If a request with the same key has already been processed, the same result will be returned. The key must be unique for each distinct operation. Keys are expired after 24 hours, but we recommend using a new key for each request.

Modified requests with the same idempotency keys are rejected with a 409 Conflict status code.

Maximum length: 256

Path Parameters

invoiceId
string
required

The unique identifier of the invoice to mark as paid.

Body

application/json

Payment information for marking the invoice as paid.

Request to mark an invoice as paid when you manage your own payment processing.

paidAt
string<date-time>

When the payment was received. If not provided, uses the current timestamp.

Example:

"2024-02-10T14:30:00Z"

metadata
object

Metadata to attach to the invoice.

Response

Invoice successfully marked as paid.

An invoice with detailed line item breakdown that can be sent to customers for payment.

invoiceId
string
required

Unique identifier for the invoice.

Example:

"123e4567-e89b-12d3-a456-426614174000"

customerId
string
required

The customer this invoice is for.

Example:

"456789ab-cdef-0123-4567-89abcdef0123"

invoiceNumber
string
required

Human-readable invoice number.

Example:

"INV-2024-001"

status
enum<string>
required

Current status of the invoice.

Available options:
DRAFT,
SENT,
PAID,
VOID,
OVERDUE
dueDate
string<date>
required

When payment is due.

Example:

"2024-02-15"

lineItems
object[]
required

Detailed breakdown of items included in this invoice.

createdAt
string<date-time>
required

When the invoice was created.

Example:

"2024-01-15T10:00:00Z"

updatedAt
string<date-time>
required

When the invoice was last updated.

Example:

"2024-01-15T10:00:00Z"

subtotalAmount
number

Subtotal amount before taxes and fees.

Example:

29.99

taxAmount
number

Total tax amount for the invoice.

Example:

2.4

feeAmount
number

Total fee amount for the invoice.

Example:

2.5

discountAmount
number

Total discount amount for the invoice.

Example:

5

totalAmount
number

Total amount due for the invoice.

Example:

29.89

currency
string

Invoice currency.

Example:

"USD"

sentAt
string<date-time>

When the invoice was sent to the customer (if status is sent or later).

Example:

"2024-01-15T10:00:00Z"

paidAt
string<date-time>

When the invoice was paid (if status is paid).

Example:

"2024-02-10T14:30:00Z"

voidedAt
string<date-time>

When the invoice was voided (if status is void).

Example:

"2024-02-05T09:00:00Z"

invoiceUrl
string<uri>

Hosted URL where customer can view the invoice.

Example:

"https://invoices.yourapp.com/inv_123e4567"

metadata
object

A set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format.

I