Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Payment line items


Payment line items

Send additional transaction metadata across supported Payment Method Types to access cost savings, facilitate payment reconciliation, and improve auth rates.

Payment line items is a feature in the Payment Intents API that provides benefits for cards and local payment methods processing.

  • Cost savings for eligible commercial cards for IC+ users: By passing payment line items, you can participate in the Level 2/Level 3/Product 3 (L2/L3) program that major card networks administer. For eligible commercial cards, passing line item data can provide interchange fee savings.
  • Facilitate reconciliation: Passing line item data can also facilitate reconciliation for your customers. For example, if you primarily serve government customers, it will aid the customer in reconciling a purchase against what shows up on their statement.
  • Improved authorization rates: Payment methods like Klarna and PayPal use line item data in their underwriting models, potentially allowing them to approve more credit based payment options when line items data is passed.

Feature restrictions

Payment line items have the following restrictions across supported payment method types:

Cards L2/L3 programKlarnaPayPal
Geographic availabilitySupported for US domestic transactions (US users accepting US issued cards, excluding US territories), and intra-EU transactions (EU businesses accepting EU cards).Klarna is a global payment method. For business location support, see Klarna payments.Available for customers in all locations. For business location support, see PayPal payments.
Card networksOnly supported for Visa, Mastercard, and American Express (cost savings requires direct agreement with American Express)Not applicableNot applicable
Number of line itemsCurrently supports 200 line items. (American Express Specification restricts us to send them only the first 4 line items.)Same as cardsSame as cards
Feature compatibilityBoth automatic capture and manual capture modes work with payment line items. Flexible payment scenarios (including surcharge, flexible authorization, and capture features) work with payment line items for payments where you’re passing in line items.Both automatic capture and manual capture modes work with payment line items.Both automatic capture and manual capture modes work with payment line items.
Industry specific metadataYou can’t send line items alongside industry specific metadata such as car rental/lodging, and airlinesKlarna supports industry specific metadata with Extra Merchant Data (private preview).Same as cards
APIsAvailable for payments made through the Payment Intents API.Same as cardsSame as cards

Cards L2 and L3 rates eligibility

To learn more about Visa’s Commercial Enhanced Data Program (the related setting), which replaces their U.S. Level 2/3 interchange programs, including information about its network fees, see the the related setting Support article.

Note: Visa Level 2 was sunset in April 2026 and is no longer available. Visa savings are now available through Product 3 (the related setting) only.

See Industry to MCC codes to see what MCC your business might fall under.

Stripe API doesn’t reject line items that don’t meet the network MCC and/or tax requirements, but these transactions don’t qualify for the corresponding Level 2/3 savings.

Cards L2/L3 Rates EligibilityLevel 2Level 3/Product 3
Card typesOnly Business, Purchasing, and Corporate cards are eligibleFor Visa Product 3: Purchasing, Corporate, and Business cards For Mastercard Level 3: Purchasing and Corporate cards only
MCCsUsers with the following MCCs aren’t eligible for Level 2: For Mastercard: 5812, 3501-3999, 7011, 3351-3500, 7512, 7513, 7519, 3000-3350, 4511, 4112 For Visa: 5812, 5814, 3501-4010, 3351-3500, 7512, 7513, 7011, 3000-3350, 4511, 4411, 4112, and 4722Users with the following MCCs aren’t eligible for Level 3/Product 3: For Mastercard: 5812, 3501-3999, 7011, 3351-3500, 7512, 7513, 7519, 3000-3350, 4511, 4112, 8398, 4468, 5499, 5541, 5542, 5983 For Visa: 3000-3999, 4000-4010, 5812, 5814, 7512, 7513, 7011, 4511, 4411, 4112, and 4722 GSA T&E cards (Visa): Corporate/purchasing cards issued by the federal government are not eligible for Product 3 at the following MCCs: 8011, 8021, 8031, 8041, 8042, 8043, 8046, 8050, 8062, 8071
Sales tax requirementFor Mastercard: sales tax must be between 0.1% and 30%, unless the business is using one of the following MCCs - 4468, 5541, 5542, 5499, 5983, 7511, 9752, 4111, 4131, 4215, 4784, 8211, 8220, 8398, 8661, 9211, 9222, 9311, 9399, or 9402 For Visa: sales tax must be between 0.1% and 22% unless the business is using one of the following MCCs - 4468, 5499, 5541, 5542, or 5983Not required for Level 3/Product 3 rates. 0 is acceptable if no sales tax is collected but an accurate value must be reported.

The following fields are required in order to receive L2 or L3 rates.

Cards L2 or L3 Rates EligibilityLevel 2Level 3/Product 3
Minimum Field Requirementstax[total_tax_amount] payment_details[order_reference]line_item[product_name] line_item[unit_cost] line_item[quantity] line_item[tax][total_tax_amount] or tax[total_tax_amount] line_item[product_code] line_item[unit_of_measure] payment_details[order_reference]

Field requirements

Pass the fields mentioned below either through amount_details or payment_details. Refer to Sample request (Level 2 data) to learn more about passing data.

General supported fields

Required field indicates a field is required to pass Stripe validations when any line item data is populated. Required for L2 or L3 indicates a field is required to receive network L2/L3 rates.

Field NameTypeDescriptionFormat
amount_details[line_item][product_name]stringThe product name of the line item.Required field Required for L3 Max length 1024 chars (Cards truncates to 26 alphanumeric characters and Paypal truncates to 127 characters)
amount_details[line_item][unit_cost]integerThe unit cost of the line item represented in the smallest currency unitRequired field Required for L3 Value must be >= 0
amount_details[line_item][quantity]integerThe quantity of items.Required field Required for L3 Value must be > 0
amount_details[line_item][tax][total_tax_amount]integerThe total amount of tax on a single line item represented in the smallest currency unitRequired for L3 Value must be >= 0 Conditional validation 1
amount_details[line_item][product_code]stringThe product code of the line item, such as an SKURequired for L3 Max length 12 chars
amount_details[line_item][unit_of_measure]stringA unit of measure for the line item, such as gallons, feet, meters, generic measurements (such as each), and so onRequired for L3 Max length 12 chars Alphanumeric
payment_details[order_reference]stringA unique value assigned by the business to identify the transaction.Required for L3 Required for L2 For card networks: truncated to 25 alphanumeric characters, excluding spaces For Klarna: truncated to 255 characters and visible to customers when they view the order in the Klarna app
amount_details[tax][total_tax_amount]integerThe total amount of tax on the transaction represented in the smallest currency unitRequired for L2 Can replace amount_details[line_item][tax][total_tax_amount] for L3 Value must be >= 0 Conditional validation 1
payment_details[customer_reference]stringA unique value to identify the customer. This field is available only for card paymentsBefore we send this string to a card network, we truncate it to 25 alphanumeric characters, excluding spaces
amount_details[shipping][to_postal_code]stringIf a physical good is being shipped, the postal code of where it’s being shipped toMax length 10 chars Alphanumeric, hyphens are allowed
amount_details[shipping][from_postal_code]stringIf a physical good is being shipped, the postal code of where it’s being shipped fromMax length 10 chars Alphanumeric, hyphens are allowed
amount_details[shipping][amount]integerIf a physical good is being shipped, the cost of shipping represented in the smallest currency unitValue must be >= 0
amount_details[discount_amount]integerThe total discount applied on the transaction represented in the smallest currency unitValue must be > 0 Conditional validation 2
amount_details[line_item][discount_amount]integerThe discount applied on this line item represented in the smallest currency unitValue must be > 0 Conditional validation 2

1 amount_details[tax][total_tax_amount] and amount_details[line_item][tax][total_tax_amount] are mutually exclusive. You can only specify one or the other.

2 amount_details[discount_amount] and amount_details[line_item][discount_amount] are mutually exclusive. You can only specify one or the other.

Additional cards supported fields

Cards supports the preceding general fields, and also supports:

Field NameTypeDescriptionFormat
line_item[payment_method_options][card][commodity_code]stringIdentifier that categorizes the items being purchased using a standardized commodity scheme, such as (but not limited to): the related setting, the related setting, the related setting, and so on.Max length 12 chars. Value must be alphanumeric characters without spaces.

Additional Klarna supported fields

Klarna supports the preceding general fields, and also supports:

Field NameTypeDescriptionFormat
line_item[payment_method_options][klarna][product_url]stringValid http or https URL of the productMax 4096 characters.
line_item[payment_method_options][klarna][image_url]stringValid http or https URL of the imageMax 4096 characters.
amount_details[line_items][0][payment_method_options][klarna][reference]stringUnique reference for this line item to correlate it with your system’s internal records. The field is displayed in the Klarna Consumer App if passed.Max 255 characters.
amount_details[line_items][0][payment_method_options][klarna][subscription_reference]stringArbitrary identifier of your choosing to describe a subscription. Used in select Klarna recurring integrations. This isn’t visible to customers.Max 255 characters.

Note

For Klarna transactions, total amount is implicitly derived from the formula (unit_cost * quantity) - discount_amount + tax.total_tax_amount. There is no explicit field to pass the amount.

Additional PayPal supported fields

Paypal supports the preceding general fields, and also supports:

Field NameTypeDescriptionFormat
line_item[payment_method_options][paypal][description]stringDescription of the line item.Max 127 characters
line_item[payment_method_options][paypal][category]enumType of the line item.digital_goods, physical_goods, donation
line_item[payment_method_options][paypal][sold_by]stringThe Stripe account ID of the connected account that sells the item. Leave blank if you aren’t a connected account.Max 127 characters

Cards-specific line items for L2 and L3 rates

Pass in required data for eligible cards to qualify for L2/L3 network programs

  • Level 2: sales tax charged on transactions
  • Level 3/Product 3: line item level breakdown such as product code, quantity, unit cost

Sample request (Level 2 data)

Command Line

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

Sample response (Level 2 data)

{
 "id": "pi_3OoMm5BLxXjrKOiR3LRyi610",
 "amount": 4600,
 "currency": "usd",
 "amount_details": {
 "tax": {
 "total_tax_amount": 500
 }
 },
 "status": "requires_payment_method"
}

PaymentIntent operations

You can pass line items during both confirmation and capture.

Set line items during confirmation

You can set line items during confirmation regardless of the capture_method you choose. If you pass line items during confirmation, then capture separately, you don’t need to pass line items again.

Command Line

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

Set line items during capture

If you don’t specify line items during confirmation, you can pass them during capture.

Note

Not supported when using PayPal

Command Line

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

Pass in an updated amount_details hash during capture if needed.

Command Line

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

Payment method specific line items

Pass in additional payment method types on a per-line-item basis all in one place. You can pass in data related to payment methods you might not be confirming with as well, as long as the parameter is supported. This can simplify your integration, without requiring engineering effort to add and remove payment method specific fields for each payment method.

Note

Line items aren’t included by default in the API response. To return line items, expand amount_details.line_items

Sample request (with payment method specific line items)

Command Line

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

Sample response (with payment method specific line items)

Using top-level discount or tax

The following example shows passing the top-level discount_amount and tax without line item level tax and discount_amount.

Sample request (top-level discount or tax)

Command Line

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

Sample response (top-level discount or tax)

Loosen arithmetic validation

By default, Stripe validates that your line item data adds up correctly. When the sum of line items doesn’t match the total amount, Stripe returns a 400 error so you can correct discrepancies before processing the payment.

Opt out of strict validation on a per-request basis by setting enforce_arithmetic_validation to false. When you do this:

  • The request proceeds even if line item amounts don’t match the total.
  • Stripe returns validation error details in the amount_details.error field in the response.
  • For card payments, Stripe doesn’t send line item data with arithmetic errors to card networks, preventing the transaction from qualifying for L2/L3 interchange savings.

Sample request

The following is a sample request when arithmetic validation isn’t enforced:

Command Line

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

Sample response

The following is a sample response when arithmetic validation isn’t enforced:

Industry to MCC codes

CategoryDescription
Food & Beverage5812: Restaurants (not fast food) 5814: Fast Food Restaurants
Hospitality & Travel3000-3299: Airlines 3501-3999, 7011: Hotels & Lodging 3351-3500: Car Rental Agencies 4722: Travel Agencies and Tour Operators 7512: Automobile Rental Agency 7513: Truck Rental and Leasing 7519: Motor Home and Recreational Vehicle Rental 4411: Cruise Lines 4112: Passenger Railways 4111: Local and Suburban Commuter Transit 4215: Courier Services 4784: Bridge and Road Fees
Retail & E-Commerce5962: Direct Marketing—Travel 5966: Direct Marketing—Outbound Telemarketing 5967: Direct Marketing—Other
Utilities & Miscellaneous8398: Charitable and Social Service Organizations 9752: U.K. Petrol Stations, Electronic Hot File 9211: Court Costs, including Alimony and Child Support 9311: Tax Payments 9222: Fines 9402: Postal Services – Government Only and other similar services 9399: Government Services (Not Elsewhere Classified) and other similar services 8661: Religious Organizations 8211: Schools and Educational Institutions 8220: Colleges, Universities

Flexible payment scenarios

You can use payment line items with complex payments such as surcharge, multicaptures, overcaptures, incremental authorization, decremental authorization, and partial authorization.

Last verified 2026-09-24

Is this helpful?