Get information on a specific line item for a specific account

GET /accounts/{account_id}/line_items/{line_item_id}

Path parameters

Query parameters

  • limit integer

    The maximum number of line items to be returned. Defaults to 100.

  • Pass the value from the paging response body in your previous request. If not provided, the zero-indexed starting point will be used. Either starting_after or ending_before may be provided, but not both.

  • Pass the value from the paging response body in your previous request. If not provided, the zero-indexed starting point will be used. Either starting_after or ending_before may be provided, but not both.

Responses

  • 401

    Unauthorized.

  • 403

    Forbidden.

  • 404

    Line Items not found

  • 429

    Too many requests.

  • Unexpected Error.

  • 200 object

    Array of Line Items where the last element is the root line item whose details were requested.

    • paging object

      Pagination Information.

      • Use this to drive your next request if you want the next page of results

      • Use this to drive your next request if you want the previous page of results

      • has_more boolean

        Indicates whether there are additional values beyond the ending index of the paginated results.

    • results array[object] | null

      An array of information for all line items within the requested range.

      Not more than 1000 elements.

        • The originating amount of money (in cents) relating to this line item.

        • The current balance of the line item, which accounts for interest accrued per the product's interest policy and the account's interest rate attribute.

        • The principal balance of the line item.

        • interest_percent number | null

          Annual interest in percentage.

          Default value is 0.

        • The current interest balance of the line item.

        • The current AM interest balance of the line item. Canopy tracks interest during an amortization period separately from deferred interest accrued during a revolving period.

        • The current deferred interest balance of the line item.

        • The current AM deferred interest balance of the line item. Canopy tracks deferred interest during an amortization period separately from deferred interest accrued during a revolving period.

        • The current AM fees balance of the line item.

        • The sum (in cents) of all payments towards interest charges, if any, applied to this line item to date

      • merchant_data object | null

        Merchant information if applicable.

        • lithic object
          • last_four string | null

            Last four digits of the card against which the spend was made.

          • transaction_token string(uuid) | null

            The external unique identifier of the transaction.

          • card_token string(uuid) | null

            The external unique identifier of the card related to this line item.

      • external_fields array[object] | null

        An array of static references to fields in a third party system.

        Not more than 1000 elements.

        • key string

          Key - i.e. Name of the External Party

        • value string

          Value - i.e. External Account ID

      • line_item_relationships array[object] | null

        An array of Line Item Relations tied to this line item.

        Not more than 100 elements.

        • type string Required Discriminator

          The Line Item Type of the related line item

          Value is array-1.

        • line_item_id string Required

          The ID associated with the related line item

        • The amount of money (in cents) which had been applied to the principal_cents balance of the paid down Line Item.

        • The ID of the Line Item which has been paid down by the payment split.

        • The type of the Line Item which had been paid down by the payment split.

          Values are LOAN, CREDIT_OFFSET_FEE, PAYMENT_REVERSAL_FEE, ORIG_FEE, FEE_FOR_AM, ORIG_FEE_FOR_AM, AM_FEE, RECURRING_FEE, RETURN_CHECK_FEE, LATE_FEE, MANUAL_FEE, CHARGE, CREDIT_OFFSET, PAYMENT_REVERSAL_PRINCIPAL, CREDIT_OFFSET_INTEREST, CREDIT_OFFSET_DEFERRED_INTEREST, PAYMENT_REVERSAL_INTEREST, PAYMENT_REVERSAL_DEFERRED_INTEREST, INTEREST, AM_INTEREST, AM_DI, or DEFERRED_INTEREST.

        • The ID of the paid down Line Item's parent Line Item.
          For paid down INTEREST types, this will refer to a CHARGE.
          For paid down AM_INTEREST types, this will refer to a LOAN.

      • account_id string Required

        The account associated with the line item

      • line_item_id string Required

        The ID associated with the line item

      • effective_at string(date-time)

        The Date-Time that this line item became/becomes active.

      • valid_at string(date-time)

        The Date-Time that this line item became valid.

      • created_at string(date-time)

        The Date-Time which the line item was created.

      • updated_at string(date-time)

        The Date-Time which the line item was updated.

      • product_id string Required

        the Product ID of the account

        • line_item_type string Required

          The Line Item Type. i.e. CHARGE, PAYMENT, CREDIT_OFFSET, DEBIT_OFFSET, MANUAL_FEE.

        • description string | null

          A description of this particular line item if any. More common for adjustments.

        • allocation string | null

          Optional designation for which balance bucket an offset was allocated to. Only applicable to CREDIT_OFFSET and DEBIT_OFFSET type line_items.

          Values are INTEREST, DEFERRED_INTEREST, PRINCIPAL, FEE, or null.

        • the corresponding Status for a line item

          Values are AUTHORIZED, DECLINED, INVALID, OFFSET, PENDING, POSTED, REFINANCED, PROCESSING, RETRO_VALID, REVERSED, ROLLED, SETTLED, SPLIT_INVALID, SPLIT_VALID, VALID, or VOID. Default value is VALID.

GET /accounts/{account_id}/line_items/{line_item_id}
curl \
 -X GET https://<your_environment_name>-uat-api.canopyservicing.com/accounts/can_52322/line_items/can_52322 \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "results": [
    {
      "account_id": 4,
      "line_item_id": 2,
      "effective_at": "2018-07-20T09:12:30+00:00",
      "valid_at": "2022-09-30T09:12:30+00:00",
      "created_at": "2018-06-20T09:12:30+00:00",
      "updated_at": "2019-07-21T10:13:31+00:00",
      "product_id": "li_4Yxb5",
      "line_item_overview": {
        "line_item_status": "VALID",
        "line_item_type": "CHARGE",
        "description": "Refund for invalid purchase",
        "allocation": "INTEREST"
      },
      "line_item_summary": {
        "original_amount_cents": 2484,
        "balance_cents": 3600,
        "principal_cents": 2400,
        "interest_percent": 2.34,
        "interest_balance_cents": 1100,
        "am_interest_balance_cents": 0,
        "deferred_interest_balance_cents": 200,
        "am_deferred_interest_balance_cents": 0,
        "am_fees_balance_cents": 0,
        "total_interest_paid_to_date_cents": -16
      },
      "merchant_data": {
        "name": "string",
        "id": "string",
        "mcc_code": "string",
        "phone_number": "string"
      },
      "issuer_processor_details": {
        "lithic": {
          "last_four": 3324,
          "transaction_token": "33xd08bc-d100-488y-bb93-f8a1f081ff0e",
          "card_token": "c6cd08bc-c524-48f5-b64d-f79ec0810df4"
        }
      },
      "external_fields": [
        {
          "key": "Globex Card Processing Account ID",
          "value": "22445702-a389-431f-927d-07b8d0750787"
        }
      ],
      "line_item_relationships": [
        {
          "type": "PAYMENT_SPLIT",
          "line_item_id": "can_8231",
          "split_amount_cents": "PAYMENT_SPLIT",
          "paid_down_line_item_id": "can_8231",
          "paid_down_line_item_type": "LOAN",
          "paid_down_line_item_parent_id": "can_8231"
        }
      ]
    }
  ],
  "paging": {
    "starting_after": "31mNprzLd2bKl6koVna68ARM",
    "ending_before": "31mNprzLd2bKl6koVna68ARM",
    "has_more": false
  }
}