GET/user/v1/invoices/{invoiceId}

Get an invoice

Retrieves specified invoice.

path parameters

  • invoiceId

    string

    Required

    The identifier of the invoice.

Returns

  • id

    string

    The system-assigned identifier of the invoice.

  • state

    enum

    The status of the invoice.

    Possible values:
    OPENPAIDVOID
  • stateTime

    date-time

    The time associated with the current state (e.g. paid time).

  • number

    string

    The invoice number.

  • currencyCode

    string

    The currency code for the invoice (e.g. USD).

  • description

    string

    The user facing description for the invoice.

  • account

    InvoiceAccount

    The contact information associated with the invoice.

  • effectiveTime

    date-time

    The time the invoice was finalized.

  • period

    Period

    The billing period for the invoice.

  • subtotalAmount

    string

    The subtotal amount for the invoice.

    This includes item-level discounts.

  • discountAmount

    string

    The invoice-level discount amount.

    This does not include item level discounts.

  • balance

    InvoiceBalance

    The starting and ending account balance as of the time the invoice was finalized.

  • taxAmount

    string

    The tax amount for the invoice.

    This is for rendering purposes only and is not the reported tax amount.

  • totalAmount

    string

    The total amount for the invoice.

  • dueAmount

    string

    The total amount minus any credits automatically associated with the invoice.

  • remainingDueAmount

    string

    The due amount minus the amount already paid.

  • dueTime

    date-time

    The time the invoice must be paid by.

  • paidAmount

    string

    The amount already paid towards the invoice.

  • paymentState

    enum

    The status of the invoice payment.

    Possible values:
    PAYMENT_METHOD_REQUIREDACTION_REQUIREDPROCESSING
  • paymentIntent

    PaymentIntent

    The payment intent for the invoice.

  • items

    InvoiceItem[]

    The line items for the invoice.

  • changes

    InvoiceChange[]

    The prorated changes that occurred mid-billing cycle.

  • createTime

    date-time

    The creation time of the invoice.

  • updateTime

    date-time

    The last update time of the invoice.

curl https://api.userhub.com/user/v1/invoices/in_4QPqKvtqkpJzP7 \
  -H "UserHub-Api-Key: $USER_API_KEY" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
Response bodyJSON
{
  "id": "in_4QPqKvtqkpJzP7",
  "state": "OPEN",
  "stateTime": null,
  "number": "ACME-123",
  "currencyCode": "USD",
  "description": "This is a test.",
  "account": {
    "fullName": "Jane Doe",
    "email": "[email protected]",
    "phoneNumber": "+12125550123",
    "address": {
      "lines": [
        "42 West St"
      ],
      "city": "Brooklyn",
      "state": "NY",
      "postalCode": "11222",
      "country": "US"
    }
  },
  "effectiveTime": "2024-06-15T13:00:00Z",
  "period": {
    "startTime": "2024-06-15T13:00:00Z",
    "endTime": "2024-06-15T13:00:00Z"
  },
  "subtotalAmount": "9",
  "discountAmount": "1",
  "balance": {
    "startAmount": "100",
    "endAmount": "200",
    "appliedAmount": "-100"
  },
  "taxAmount": "2",
  "dueAmount": "10",
  "dueTime": "2024-06-15T13:00:00Z",
  "paidAmount": "0",
  "paymentIntent": null,
  "items": [
    {
      "id": "ii_35kH3awC",
      "product": null,
      "price": null,
      "quantity": 2,
      "subtotalAmount": "10",
      "discountAmount": "1",
      "description": "This is a test item.",
      "period": null
    }
  ],
  "changes": [],
  "createTime": "2024-06-15T13:00:00Z",
  "updateTime": "2024-06-15T13:00:00Z"
}
PreviousList invoices
NextOrganizations

Turn users intorevenue
$

Subscribe to monthly product updates

© 2024 UserHub

Integrations

    UserHub & Auth0UserHub & Stripe BillingUserHub & Google CloudUserHub & FirebaseUserHub & custom auth