Sample - Stripe API
GET/v1/payment_links/{payment_link}/line_items

List payment link line items

Lists the line items associated with a payment link. Use payment_link to select the link and cursor parameters to retrieve earlier or later pages of items. The response contains line item amounts, quantities, prices, discounts, taxes, and pagination metadata.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

5 parameters
payment_linkstringrequired
The identifier of the payment link whose line items to retrieve. Maximum 5000 characters.
ending_beforestringoptional
Pagination cursor identifying the line item before which to return results. Maximum 5000 characters.
expandarray<string>optional
Fields to expand in each returned line item; each expansion name can be no longer than 5000 characters.
limitintegeroptional
Maximum number of line items to return. Must be between 1 and 100, and defaults to 10 when omitted.
starting_afterstringoptional
Pagination cursor identifying the line item after which to return results. Maximum 5000 characters.

2 status codes
200Returns a paginated list containing payment link line items in `data`, each with its identifier, currency, amounts, quantity, and related price details, together with `has_more`, `object`, and `url`.
dataarray<LineItem>required
Details about each object.
has_morebooleanrequired
True if this list has another page of items after this one that can be fetched.
objectstringrequired
String representing the object's type. Objects of the same type share the same value. Always has the value `list`.
Allowed:list
urlstringrequired
The URL where this list can be accessed.
defaultError response.
errorobjectrequired

Error handling

payment_link must identify the payment link whose items you want to list and must be no longer than 5000 characters. limit must be between 1 and 100 and defaults to 10 when omitted. starting_after and ending_before must be pagination object IDs no longer than 5000 characters.