Send additional transaction metadata across supported Payment Method Types to access cost savings, facilitate payment reconciliation, and improve auth rates.
Available with preview header
You can use this public preview feature by including the version header 2025-04-30.preview or higher in your API request.
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 (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
Only supported for US domestic transactions (US users accepting US issued cards, excluding US territories).
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.
Multicapture also works with payment line items. However, you can’t use other flexible payment scenarios or decrement authorization 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).
To learn more about Visa’s Commercial Enhanced Data Program (CEDP), which replaces their U.S. Level 2/3 interchange programs, including information about its network fees, see the CEDP Support article.
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
Card types
Only Business, Purchasing, and Corporate cards are eligible
Only Purchasing and Corporate cards are eligible
MCCs
Users with the following MCCs aren’t eligible for Level 2:
For Visa: 5812, 5814, 3501-4010, 3351-3500, 7512, 7513, 3000-3299, 4511, 4411, 4112, 4722, 5962, 5966, and 5967
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
1tax[total_tax_amount] and line_items[tax][total_tax_amount] are mutually exclusive. You can only specify one or the other.
2discount_amount and line_items[discount_amount] are mutually exclusive. You can only specify one or the other.
3 The field payment_details[order_reference] is required when the Payment Method Types array contains card, including when automatic_payment_methods.enabled is set to true.
Additional Cards supported fields
Cards supports the preceding general fields, and also supports:
Identifier that categorizes the items being purchased using a standardized commodity scheme, such as (but not limited to): UNSPSC, NAICS, NAPCS, 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:
Arbitrary identifier of your choosing to describe a subscription. Used in select Klarna recurring integrations. This isn’t visible to customers.
Max 255 characters. No special regex.
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:
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.
Pass in an updated amount_details hash during Capture if needed.
Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl -X POST https://api.stripe.com/v1/payment_intents/pi_xxxxxxxx/capture \
-u"
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
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 are not included by default in the API response. To return line items, expandamount_details.line_items
Sample request (with Payment Method Specific line items)
Sample response (with Payment Method Specific line items)
{"id":"pi_3OoMm5BLxXjrKOiR3LRyi610","amount":4000,"currency":"usd""amount_details":{"shipping":{"from_postal_code":"94110","to_postal_code":"94117","amount":100},"line_items":{"object":"list","url":"/v1/payment_intents/pi_3OoMm5BLxXjrKOiR3LRyi610/amount_details_line_items","has_more":false,"data":[{"_id":"li_123","product_code":"SKU001","product_name":"Product 001","unit_cost":2000,"quantity":1,"discount_amount":100,"tax":{"total_tax_amount":100},"unit_of_measure":"feet","payment_method_options":{"card":{"commodity_code":"123123",},"klarna":{"image_url":"https://www.example.com/image.jpg","product_url":"https://www.example.com/product"},"paypal":{"description":"This is a sample product description unique to PayPal for SKU001","category": digital_goods,}}},{"_id":"li_456","product_code":"SKU002","product_name":"Product 002","unit_cost":1800,"quantity":1,"tax":{"total_tax_amount":100},"unit_of_measure":"gallons","payment_method_options":{"card":{"commodity_code":"123123",},"klarna":{"image_url":"https://www.example.com/image.jpg","product_url":"https://www.example.com/product"},"paypal":{"description":"This is a sample product description unique to PayPal for SKU001","category": physical_goods,}}}]}},"status":"requires_payment_method"}
Using top-level discount and/or tax
The following example shows passing the top-level discount_amount and tax without line item level tax and discount_amount.
{"id":"pi_3R0p2JCvDOElLqwO0mlHFrzv","amount":2500,"amount_capturable":0,"amount_received":2500,"payment_details":{"customer_reference":"customer_reference","order_reference":"order_reference"},"amount_details":{"discount_amount":100,"shipping":{"amount":100,"from_postal_code":"94110","to_postal_code":"94117"},"tax":{"total_tax_amount":500},"line_items":{"object":"list","data":[{"id":"uli_RueKif6jOR65uG","object":"amount_details_line_item","discount_amount":null,"payment_method_options":{"klarna":{"image_url":"https://www.example.com/image.jpg","product_url":"https://www.example.com/product"},"paypal":{"category":"digital_goods","description":"This is a sample product description unique to PayPal for SKU001"}},"product_code":"SKU001","product_name":"Product 001","quantity":1,"tax":null,"unit_cost":2000}],"has_more":false,"url":"/v1/payment_intents/pi_3R0p2JCvDOElLqwO0mlHFrzv/amount_details_line_items"}}
...
}
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
4468: Marinas, Marine Service
5983: Fuel Dealers
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
Using Flexible Payment Scenarios
Multicapture
You can also pass in line items during multicaptures.
Note
Multicapture isn’t supported for Klarna or PayPal.
Create and confirm an uncaptured PaymentIntent
Note
The API response doesn’t include line items by default. To return line items, expandamount_details.line_items.
Specify the capture_method as manual when creating the PaymentIntent and use the if_available parameter to request multicapture for this payment. The created PaymentIntent allows multiple captures if the payment method supports it.
You can add amount_details on the first capture even if they weren’t specified at creation.
If you provided amount_details at creation, you must either pass in amount_details or unset them on the first capture.
The same rules apply to amount_details[line_items]—you can add them on the first capture if not specified at creation, but must include or explicitly unset them if they were present at creation.
The PaymentIntent remains in a requires_capture state. At this point, you can either:
Continue to capture the PaymentIntent multiple times up to the full amount of the PaymentIntent.
Transition the PaymentIntent to a succeeded state by setting final_capture to true, or making a capture without the final_capture parameter (because final_capture defaults to true).
If previous captures included amount_details or amount_details[line_items], you must continue to include them in subsequent captures.
If previous captures didn’t include these fields, you can’t add them in later captures.