Open Context Protocol is live! 🚀 Read the launch post
getPaymentIntentsIntentAmountDetailsLineItems

getPaymentIntentsIntentAmountDetailsLineItems

List all PaymentIntent LineItems

Details

  • Method: GET
  • Path: /v1/payment_intents/{intent}/amount_details_line_items
  • Operation ID: GetPaymentIntentsIntentAmountDetailsLineItems

Parameters

{
  "ending_before": {
    "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "expand": {
    "description": "Specifies which fields in the response should be expanded.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "intent": {
    "description": "",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "limit": {
    "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "starting_after": {
    "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "description": "",
  "properties": {
    "data": {
      "description": "Details about each object.",
      "items": {
        "description": "",
        "properties": {
          "discount_amount": {
            "description": "The discount applied on this line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than 0.\n\nThis field is mutually exclusive with the `amount_details[discount_amount]` field.",
            "nullable": true,
            "type": "integer"
          },
          "id": {
            "description": "Unique identifier for the object.",
            "maxLength": 5000,
            "type": "string"
          },
          "object": {
            "description": "String representing the object's type. Objects of the same type share the same value.",
            "enum": [
              "payment_intent_amount_details_line_item"
            ],
            "type": "string"
          },
          "payment_method_options": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/payment_flows_amount_details_resource_line_items_list_resource_line_item_resource_payment_method_options"
              }
            ],
            "description": "Payment method-specific information for line items.",
            "nullable": true
          },
          "product_code": {
            "description": "The product code of the line item, such as an SKU. Required for L3 rates. At most 12 characters long.",
            "maxLength": 5000,
            "nullable": true,
            "type": "string"
          },
          "product_name": {
            "description": "The product name of the line item. Required for L3 rates. At most 1024 characters long.\n\nFor Cards, this field is truncated to 26 alphanumeric characters before being sent to the card networks. For Paypal, this field is truncated to 127 characters.",
            "maxLength": 5000,
            "type": "string"
          },
          "quantity": {
            "description": "The quantity of items. Required for L3 rates. An integer greater than 0.",
            "type": "integer"
          },
          "tax": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/payment_flows_amount_details_resource_line_items_list_resource_line_item_resource_tax"
              }
            ],
            "description": "Contains information about the tax on the item.",
            "nullable": true
          },
          "unit_cost": {
            "description": "The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.",
            "type": "integer"
          },
          "unit_of_measure": {
            "description": "A unit of measure for the line item, such as gallons, feet, meters, etc. Required for L3 rates. At most 12 alphanumeric characters long.",
            "maxLength": 5000,
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "product_name",
          "quantity",
          "unit_cost"
        ],
        "title": "PaymentFlowsAmountDetailsResourceLineItemsListResourceLineItem",
        "type": "object",
        "x-expandableFields": [
          "payment_method_options",
          "tax"
        ],
        "x-resourceId": "payment_intent_amount_details_line_item"
      },
      "type": "array"
    },
    "has_more": {
      "description": "True if this list has another page of items after this one that can be fetched.",
      "type": "boolean"
    },
    "object": {
      "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
      "enum": [
        "list"
      ],
      "type": "string"
    },
    "url": {
      "description": "The URL where this list can be accessed.",
      "maxLength": 5000,
      "type": "string"
    }
  },
  "required": [
    "data",
    "has_more",
    "object",
    "url"
  ],
  "title": "PaymentFlowsAmountDetailsResourceLineItemsList",
  "type": "object",
  "x-expandableFields": [
    "data"
  ]
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('stripe')

# Call this tool
result = await agent.call_tool('getPaymentIntentsIntentAmountDetailsLineItems', {
    # Add required parameters here
})