Stripe Links API

The Links API from Stripe — 3 operation(s) for links.

Operations 5

GET /v1/payment_links/{payment_link}/line_items Stripe Get Payment Links Line Items #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stripe-links-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stripe-links-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stripe Accounts Account Links API
  description: This is an object representing a Stripe account. You can retrieve it to see properties on the account like its current requirements or if the account is enabled to make live charges or receive payouts.
  contact:
    email: dev-platform@stripe.com
    name: Stripe Dev Platform Team
    url: https://stripe.com
  termsOfService: https://stripe.com/us/terms/
  version: '2023-10-16'
  x-stripeSpecFilename: spec3
servers:
- url: https://api.stripe.com/
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Links
paths:
  /v1/payment_links:
    get:
      description: <p>Returns a list of your payment links.</p>
      operationId: getPaymentLinks
      parameters:
      - description: Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).
        in: query
        name: active
        required: false
        schema:
          type: boolean
        style: form
      - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
        in: query
        name: ending_before
        required: false
        schema:
          maxLength: 5000
          type: string
        style: form
      - description: Specifies which fields in the response should be expanded.
        explode: true
        in: query
        name: expand
        required: false
        schema:
          items:
            maxLength: 5000
            type: string
          type: array
        style: deepObject
      - description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
        in: query
        name: limit
        required: false
        schema:
          type: integer
        style: form
      - description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
        in: query
        name: starting_after
        required: false
        schema:
          maxLength: 5000
          type: string
        style: form
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding: {}
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/GetPaymentLinksRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                description: ''
                x-expandableFields:
                - data
                $ref: '#/components/schemas/PaymentLinksResourcePaymentLinkList'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response.
      summary: Stripe Get   Payment Links
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      tags:
      - Links
    post:
      description: <p>Creates a payment link.</p>
      operationId: postPaymentLinks
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding:
              after_completion:
                explode: true
                style: deepObject
              automatic_tax:
                explode: true
                style: deepObject
              consent_collection:
                explode: true
                style: deepObject
              custom_fields:
                explode: true
                style: deepObject
              custom_text:
                explode: true
                style: deepObject
              expand:
                explode: true
                style: deepObject
              invoice_creation:
                explode: true
                style: deepObject
              line_items:
                explode: true
                style: deepObject
              metadata:
                explode: true
                style: deepObject
              payment_intent_data:
                explode: true
                style: deepObject
              payment_method_types:
                explode: true
                style: deepObject
              phone_number_collection:
                explode: true
                style: deepObject
              restrictions:
                explode: true
                style: deepObject
              shipping_address_collection:
                explode: true
                style: deepObject
              shipping_options:
                explode: true
                style: deepObject
              subscription_data:
                explode: true
                style: deepObject
              tax_id_collection:
                explode: true
                style: deepObject
              transfer_data:
                explode: true
                style: deepObject
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/PostPaymentLinksRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payment_link'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response.
      summary: Stripe Post   Payment Links
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      tags:
      - Links
  /v1/payment_links/{payment_link}:
    get:
      description: <p>Retrieve a payment link.</p>
      operationId: getPaymentLinksPaymentLink
      parameters:
      - description: Specifies which fields in the response should be expanded.
        explode: true
        in: query
        name: expand
        required: false
        schema:
          items:
            maxLength: 5000
            type: string
          type: array
        style: deepObject
      - in: path
        name: payment_link
        required: true
        schema:
          maxLength: 5000
          type: string
        style: simple
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding: {}
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/GetPaymentLinksPaymentLinkRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payment_link'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response.
      summary: Stripe Get   Payment Links
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      tags:
      - Links
    post:
      description: <p>Updates a payment link.</p>
      operationId: postPaymentLinksPaymentLink
      parameters:
      - in: path
        name: payment_link
        required: true
        schema:
          maxLength: 5000
          type: string
        style: simple
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding:
              after_completion:
                explode: true
                style: deepObject
              automatic_tax:
                explode: true
                style: deepObject
              custom_fields:
                explode: true
                style: deepObject
              custom_text:
                explode: true
                style: deepObject
              expand:
                explode: true
                style: deepObject
              inactive_message:
                explode: true
                style: deepObject
              invoice_creation:
                explode: true
                style: deepObject
              line_items:
                explode: true
                style: deepObject
              metadata:
                explode: true
                style: deepObject
              payment_intent_data:
                explode: true
                style: deepObject
              payment_method_types:
                explode: true
                style: deepObject
              restrictions:
                explode: true
                style: deepObject
              shipping_address_collection:
                explode: true
                style: deepObject
              subscription_data:
                explode: true
                style: deepObject
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/PostPaymentLinksPaymentLinkRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payment_link'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response.
      summary: Stripe Post   Payment Links
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      tags:
      - Links
  /v1/payment_links/{payment_link}/line_items:
    get:
      description: <p>When retrieving a payment link, there is an includable <strong>line_items</strong> property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.</p>
      operationId: getPaymentLinksPaymentLinkLineItems
      parameters:
      - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
        in: query
        name: ending_before
        required: false
        schema:
          maxLength: 5000
          type: string
        style: form
      - description: Specifies which fields in the response should be expanded.
        explode: true
        in: query
        name: expand
        required: false
        schema:
          items:
            maxLength: 5000
            type: string
          type: array
        style: deepObject
      - description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
        in: query
        name: limit
        required: false
        schema:
          type: integer
        style: form
      - in: path
        name: payment_link
        required: true
        schema:
          maxLength: 5000
          type: string
        style: simple
      - description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
        in: query
        name: starting_after
        required: false
        schema:
          maxLength: 5000
          type: string
        style: form
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding: {}
            schema:
              additionalProperties: false
              $ref: '#/components/schemas/GetPaymentLinksPaymentLinkLineItemsRequest'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                description: ''
                x-expandableFields:
                - data
                $ref: '#/components/schemas/PaymentLinksResourceListLineItems'
          description: Successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response.
      summary: Stripe Get   Payment Links Line Items
      x-api-evangelist-processing:
        GenerateOperationSummariesFromPath: true
        PascalCaseOperationSummaries: true
        CaselCaseOperationIds: true
        ChooseTags: true
      tags:
      - Links
components:
  schemas:
    PaymentLinksResourcePaymentLinkList:
      type: object
      required:
      - data
      - has_more
      - object
      - url
      properties:
        data:
          items:
            $ref: '#/components/schemas/payment_link'
          type: array
        has_more:
          description: True if this list has another page of items after this one that can be fetched.
          type: boolean
        object:
          description: String representing the object's type. Objects of the same type share the same value. Always has the value `list`.
          enum:
          - list
          type: string
        url:
          description: The URL where this list can be accessed.
          maxLength: 5000
          pattern: ^/v1/payment_links
          type: string
    GetPaymentLinksRequest:
      type: object
      properties: {}
    PostPaymentLinksPaymentLinkRequest:
      type: object
      properties:
        active:
          description: Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
          type: boolean
        after_completion:
          description: Behavior after the purchase is complete.
          properties:
            hosted_confirmation:
              properties:
                custom_message:
                  maxLength: 500
                  type: string
              title: after_completion_confirmation_page_params
              type: object
            redirect:
              properties:
                url:
                  maxLength: 2048
                  type: string
              required:
              - url
              title: after_completion_redirect_params
              type: object
            type:
              enum:
              - hosted_confirmation
              - redirect
              type: string
          required:
          - type
          title: after_completion_params
          type: object
        allow_promotion_codes:
          description: Enables user redeemable promotion codes.
          type: boolean
        automatic_tax:
          description: Configuration for automatic tax collection.
          properties:
            enabled:
              type: boolean
          required:
          - enabled
          title: automatic_tax_params
          type: object
        billing_address_collection:
          description: Configuration for collecting the customer's billing address.
          enum:
          - auto
          - required
          type: string
        custom_fields:
          anyOf:
          - items:
              properties:
                dropdown:
                  properties:
                    options:
                      items:
                        properties:
                          label:
                            maxLength: 100
                            type: string
                          value:
                            maxLength: 100
                            type: string
                        required:
                        - label
                        - value
                        title: custom_field_option_param
                        type: object
                      type: array
                  required:
                  - options
                  title: custom_field_dropdown_param
                  type: object
                key:
                  maxLength: 200
                  type: string
                label:
                  properties:
                    custom:
                      maxLength: 50
                      type: string
                    type:
                      enum:
                      - custom
                      type: string
                  required:
                  - custom
                  - type
                  title: custom_field_label_param
                  type: object
                numeric:
                  properties:
                    maximum_length:
                      type: integer
                    minimum_length:
                      type: integer
                  title: custom_field_numeric_param
                  type: object
                optional:
                  type: boolean
                text:
                  properties:
                    maximum_length:
                      type: integer
                    minimum_length:
                      type: integer
                  title: custom_field_text_param
                  type: object
                type:
                  enum:
                  - dropdown
                  - numeric
                  - text
                  type: string
              required:
              - key
              - label
              - type
              title: custom_field_param
              type: object
            type: array
          - enum:
            - ''
            type: string
          description: Collect additional information from your customer using custom fields. Up to 2 fields are supported.
        custom_text:
          description: Display additional text for your customers using custom text.
          properties:
            after_submit:
              anyOf:
              - properties:
                  message:
                    maxLength: 1200
                    type: string
                required:
                - message
                title: custom_text_position_param
                type: object
              - enum:
                - ''
                type: string
            shipping_address:
              anyOf:
              - properties:
                  message:
                    maxLength: 1200
                    type: string
                required:
                - message
                title: custom_text_position_param
                type: object
              - enum:
                - ''
                type: string
            submit:
              anyOf:
              - properties:
                  message:
                    maxLength: 1200
                    type: string
                required:
                - message
                title: custom_text_position_param
                type: object
              - enum:
                - ''
                type: string
            terms_of_service_acceptance:
              anyOf:
              - properties:
                  message:
                    maxLength: 1200
                    type: string
                required:
                - message
                title: custom_text_position_param
                type: object
              - enum:
                - ''
                type: string
          title: custom_text_param
          type: object
        customer_creation:
          description: Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).
          enum:
          - always
          - if_required
          type: string
        expand:
          description: Specifies which fields in the response should be expanded.
          items:
            maxLength: 5000
            type: string
          type: array
        inactive_message:
          anyOf:
          - maxLength: 500
            type: string
          - enum:
            - ''
            type: string
          description: The custom message to be displayed to a customer when a payment link is no longer active.
        invoice_creation:
          description: Generate a post-purchase Invoice for one-time payments.
          properties:
            enabled:
              type: boolean
            invoice_data:
              properties:
                account_tax_ids:
                  anyOf:
                  - items:
                      maxLength: 5000
                      type: string
                    type: array
                  - enum:
                    - ''
                    type: string
                custom_fields:
                  anyOf:
                  - items:
                      properties:
                        name:
                          maxLength: 30
                          type: string
                        value:
                          maxLength: 30
                          type: string
                      required:
                      - name
                      - value
                      title: custom_field_params
                      type: object
                    type: array
                  - enum:
                    - ''
                    type: string
                description:
                  maxLength: 1500
                  type: string
                footer:
                  maxLength: 5000
                  type: string
                metadata:
                  anyOf:
                  - additionalProperties:
                      type: string
                    type: object
                  - enum:
                    - ''
                    type: string
                rendering_options:
                  anyOf:
                  - properties:
                      amount_tax_display:
                        enum:
                        - ''
                        - exclude_tax
                        - include_inclusive_tax
                        type: string
                    title: rendering_options_param
                    type: object
                  - enum:
                    - ''
                    type: string
              title: invoice_settings_params
              type: object
          required:
          - enabled
          title: invoice_creation_update_params
          type: object
        line_items:
          description: The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
          items:
            properties:
              adjustable_quantity:
                properties:
                  enabled:
                    type: boolean
                  maximum:
                    type: integer
                  minimum:
                    type: integer
                required:
                - enabled
                title: adjustable_quantity_params
                type: object
              id:
                maxLength: 5000
                type: string
              quantity:
                type: integer
            required:
            - id
            title: line_items_update_params
            type: object
          type: array
        metadata:
          additionalProperties:
            type: string
          description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
          type: object
        payment_intent_data:
          description: A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
          properties:
            description:
              anyOf:
              - maxLength: 1000
                type: string
              - enum:
                - ''
                type: string
            metadata:
              anyOf:
              - additionalProperties:
                  type: string
                type: object
              - enum:
                - ''
                type: string
            statement_descriptor:
              anyOf:
              - maxLength: 22
                type: string
              - enum:
                - ''
                type: string
            statement_descriptor_suffix:
              anyOf:
              - maxLength: 22
                type: string
              - enum:
                - ''
                type: string
            transfer_group:
              anyOf:
              - maxLength: 5000
                type: string
              - enum:
                - ''
                type: string
          title: payment_intent_data_update_params
          type: object
        payment_method_collection:
          description: 'Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.


            Can only be set in `subscription` mode.


            If you''d like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).'
          enum:
          - always
          - if_required
          type: string
        payment_method_types:
          anyOf:
          - items:
              enum:
              - affirm
              - afterpay_clearpay
              - alipay
              - au_becs_debit
              - bacs_debit
              - bancontact
              - blik
              - boleto
              - card
              - cashapp
              - eps
              - fpx
              - giropay
              - grabpay
              - ideal
              - klarna
              - konbini
              - link
              - oxxo
              - p24
              - paynow
              - paypal
              - pix
              - promptpay
              - sepa_debit
              - sofort
              - us_bank_account
              - wechat_pay
              type: string
              x-stripeBypassValidation: true
            type: array
          - enum:
            - ''
            type: string
          description: The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
        restrictions:
          anyOf:
          - properties:
              completed_sessions:
                properties:
                  limit:
                    type: integer
                required:
                - limit
                title: completed_sessions_params
                type: object
            required:
            - completed_sessions
            title: restrictions_params
            type: object
          - enum:
            - ''
            type: string
          description: Settings that restrict the usage of a payment link.
        shipping_address_collection:
          anyOf:
          - properties:
              allowed_countries:
                items:
                  enum:
                  - AC
                  - AD
                  - AE
                  - AF
                  - AG
                  - AI
                  - AL
                  - AM
                  - AO
                  - AQ
                  - AR
                  - AT
                  - AU
                  - AW
                  - AX
                  - AZ
                  - BA
                  - BB
                  - BD
                  - BE
                  - BF
                  - BG
                  - BH
                  - BI
                  - BJ
                  - BL
                  - BM
                  - BN
                  - BO
                  - BQ
                  - BR
                  - BS
                  - BT
                  - BV
                  - BW
                  - BY
                  - BZ
                  - CA
                  - CD
                  - CF
                  - CG
                  - CH
                  - CI
                  - CK
                  - CL
                  - CM
                  - CN
                  - CO
                  - CR
                  - CV
                  - CW
                  - CY
                  - CZ
                  - DE
                  - DJ
                  - DK
                  - DM
                  - DO
                  - DZ
                  - EC
                  - EE
                  - EG
                  - EH
                  - ER
                  - ES
                  - ET
                  - FI
                  - FJ
                  - FK
                  - FO
                  - FR
                  - GA
                  - GB
                  - GD
                  - GE
                  - GF
                  - GG
                  - GH
                  - GI
                  - GL
                  - GM
                  - GN
                  - GP
                  - GQ
                  - GR
                  - GS
                  - GT
                  - GU
                  - GW
                  - GY
                  - HK
                  - HN
                  - HR
                  - HT
                  - HU
                  - ID
                  - IE
                  - IL
                  - IM
                  - IN
                  - IO
                  - IQ
                  - IS
                  - IT
                  - JE
                  - JM
                  - JO
                  - JP
                  - KE
                  - KG
                  - KH
                  - KI
                  - KM
                  - KN
                  - KR
                  - KW
                  - KY
                  - KZ
                  - LA
                  - LB
                  - LC
                  - LI
                  - LK
                  - LR
                  - LS
                  - LT
                  - LU
                  - LV
                  - LY
                  - MA
                  - MC
                  - MD
                  - ME
                  - MF
                  - MG
                  - MK
                  - ML
                  - MM
                  - MN
                  - MO
                  - MQ
                  - MR
                  - MS
                  - MT
                  - MU
                  - MV
                  - MW
                  - MX
                  - MY
                  - MZ
                  - NA
                  - NC
                  - NE
                  - NG
                  - NI
                  - NL
                  - 'NO'
                  - NP
                  - NR
                  - NU
                  - NZ
                  - OM
                  - PA
                  - PE
                  - PF
                  - PG
                  - PH
                  - PK
                  - PL
                  - PM
                  - PN
                  - PR
                  - PS
                  - PT
                  - PY
                  - QA
                  - RE
                  - RO
                  - RS
                  - RU
                  - RW
                  - SA
                  - SB
                  - SC
                  - SE
                  - SG
                  - SH
                  - SI
                  - SJ
                  - SK
                  - SL
                  - SM
                  - SN
                  - SO
                  - SR
                  - SS
   

# --- truncated at 32 KB (68 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stripe/refs/heads/main/openapi/stripe-links-api-openapi.yml