View as Markdown
Stripe icon

Stripe ACTION

Create Invoice Line Item

Add a line item to an invoice. See the documentation.
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Stripe account once, then configure and run Create Invoice Line Item from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "stripe-create-invoice-item",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    stripe: { authProvisionId: "apn_xxxxxxx" },
    customer: "Customer ID",
    amount: 10,
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Invoice Line Item inputs
Property Type Description
customer Customer ID string
Example: cus_Jz4ErxGo9t1agg
Required Dynamic
amount Amount integer
Amount. Use the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
Optional
currency Currency string
Three-letter ISO currency code, in lowercase; must be a supported currency
Optional Dynamic
description Description string
An arbitrary string that you can attach to a the object eg. customer, invoice, etc.
Optional
metadata Metadata object
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
Optional
pricingPrice Price ID string
Example: price_0HuVAoGHO3mdGsgAi0l1fEtm
Optional Dynamic
subscription Subscription ID string
Example: sub_K0CC9GlXAWpBQg
Optional Dynamic
invoice Invoice ID string
Example: in_0JMBoWGHO3mdGsgA6zwttRva
Optional Dynamic
quantity Quantity integer
Non-negative integer. The quantity of units for the invoice item.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
stripe-create-invoice-item
Version
0.1.5
App
Stripe
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes