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 program | Klarna | PayPal | |
|---|---|---|---|
| Geographic availability | Supported 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 networks | Only supported for Visa, Mastercard, and American Express (cost savings requires direct agreement with American Express) | Not applicable | Not applicable |
| Number of line items | Currently supports 200 line items. (American Express Specification restricts us to send them only the first 4 line items.) | Same as cards | Same as cards |
| Feature compatibility | Both 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 metadata | You can’t send line items alongside industry specific metadata such as car rental/lodging, and airlines | Klarna supports industry specific metadata with Extra Merchant Data (private preview). | Same as cards |
| APIs | Available for payments made through the Payment Intents API. | Same as cards | Same as cards |
Cards L2 and L3 rates eligibility
Visa the related setting Program
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 Eligibility | Level 2 | Level 3/Product 3 |
|---|---|---|
| Card types | Only Business, Purchasing, and Corporate cards are eligible | For Visa Product 3: Purchasing, Corporate, and Business cards For Mastercard Level 3: Purchasing and Corporate cards only |
| MCCs | Users 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 4722 | Users 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 requirement | For 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 5983 | Not 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 Eligibility | Level 2 | Level 3/Product 3 |
|---|---|---|
| Minimum Field Requirements | tax[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 Name | Type | Description | Format |
|---|---|---|---|
| amount_details[line_item][product_name] | string | The 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] | integer | The unit cost of the line item represented in the smallest currency unit | Required field Required for L3 Value must be >= 0 |
| amount_details[line_item][quantity] | integer | The quantity of items. | Required field Required for L3 Value must be > 0 |
| amount_details[line_item][tax][total_tax_amount] | integer | The total amount of tax on a single line item represented in the smallest currency unit | Required for L3 Value must be >= 0 Conditional validation 1 |
| amount_details[line_item][product_code] | string | The product code of the line item, such as an SKU | Required for L3 Max length 12 chars |
| amount_details[line_item][unit_of_measure] | string | A unit of measure for the line item, such as gallons, feet, meters, generic measurements (such as each), and so on | Required for L3 Max length 12 chars Alphanumeric |
| payment_details[order_reference] | string | A 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] | integer | The total amount of tax on the transaction represented in the smallest currency unit | Required 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] | string | A unique value to identify the customer. This field is available only for card payments | Before we send this string to a card network, we truncate it to 25 alphanumeric characters, excluding spaces |
| amount_details[shipping][to_postal_code] | string | If a physical good is being shipped, the postal code of where it’s being shipped to | Max length 10 chars Alphanumeric, hyphens are allowed |
| amount_details[shipping][from_postal_code] | string | If a physical good is being shipped, the postal code of where it’s being shipped from | Max length 10 chars Alphanumeric, hyphens are allowed |
| amount_details[shipping][amount] | integer | If a physical good is being shipped, the cost of shipping represented in the smallest currency unit | Value must be >= 0 |
| amount_details[discount_amount] | integer | The total discount applied on the transaction represented in the smallest currency unit | Value must be > 0 Conditional validation 2 |
| amount_details[line_item][discount_amount] | integer | The discount applied on this line item represented in the smallest currency unit | Value 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 Name | Type | Description | Format |
|---|---|---|---|
| line_item[payment_method_options][card][commodity_code] | string | Identifier 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 Name | Type | Description | Format |
|---|---|---|---|
| line_item[payment_method_options][klarna][product_url] | string | Valid http or https URL of the product | Max 4096 characters. |
| line_item[payment_method_options][klarna][image_url] | string | Valid http or https URL of the image | Max 4096 characters. |
| amount_details[line_items][0][payment_method_options][klarna][reference] | string | Unique 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] | string | Arbitrary 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 Name | Type | Description | Format |
|---|---|---|---|
| line_item[payment_method_options][paypal][description] | string | Description of the line item. | Max 127 characters |
| line_item[payment_method_options][paypal][category] | enum | Type of the line item. | digital_goods, physical_goods, donation |
| line_item[payment_method_options][paypal][sold_by] | string | The 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
| Category | Description |
|---|---|
| Food & Beverage | 5812: Restaurants (not fast food) 5814: Fast Food Restaurants |
| Hospitality & Travel | 3000-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-Commerce | 5962: Direct Marketing—Travel 5966: Direct Marketing—Outbound Telemarketing 5967: Direct Marketing—Other |
| Utilities & Miscellaneous | 8398: 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.
