Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Payment Links


Payment Links

A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.

When a customer opens a payment link it will open a new checkout session to render the payment page. You can use checkout session events to track payments through payment links.

Related guide: Payment Links API

Was this section helpful? Yes No

Create a payment link

POST / v1 / payment_links

Update a payment link

POST / v1 / payment_links /:id

Retrieve payment link

GET / v1 / payment_links /:id

Retrieve a payment link's line items

GET / v1 / payment_links /:id / line_items

List all payment links

GET / v1 / payment_links

The Payment Link object

Attributes

  • id string Unique identifier for the object.
  • active boolean 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.
  • line _ items object Includable The line items representing what is being sold.
  • metadata map Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
  • url string The public URL that can be shared with customers.

More attributes

  • object string, value is "payment_link"
  • after _ completion object
  • allow _ promotion _ codes boolean
  • application nullable string Expandable Connect only
  • application _ fee _ amount nullable integer Connect only
  • application _ fee _ percent nullable number Connect only
  • automatic _ tax object
  • billing _ address _ collection enum
  • consent _ collection nullable object
  • currency enum
  • custom _ fields array of objects
  • custom _ text object
  • customer _ creation enum
  • inactive _ message nullable string
  • invoice _ creation nullable object
  • livemode boolean
  • managed _ payments nullable object
  • name _ collection nullable object
  • on _ behalf _ of nullable string Expandable Connect only
  • optional _ items nullable array of objects Includable
  • payment _ intent _ data nullable object
  • payment _ method _ collection enum
  • payment _ method _ options nullable object
  • payment _ method _ types nullable array of enums
  • phone _ number _ collection object
  • restrictions nullable object
  • shipping _ address _ collection nullable object
  • shipping _ options array of objects
  • submit _ type enum
  • subscription _ data nullable object
  • tax _ id _ collection object
  • transfer _ data nullable object Connect only

The Payment Link object

{ "id": "plink_1MoC3ULkdIwHu7ixZjtGpVl2", "object": "payment_link", "active": true, "after_completion": { "hosted_confirmation": { "custom_message": null }, "type": "hosted_confirmation" }, "allow_promotion_codes": false, "application_fee_amount": null, "application_fee_percent": null, "automatic_tax": { "enabled": false, "liability": null }, "billing_address_collection": "auto", "consent_collection": null, "currency": "usd", "custom_fields": [], "custom_text": { "shipping_address": null, "submit": null }, "customer_creation": "if_required", "invoice_creation": { "enabled": false, "invoice_data": { "account_tax_ids": null, "custom_fields": null, "description": null, "footer": null, "issuer": null, "metadata": {}, "rendering_options": null } }, "livemode": false, "metadata": {}, "on_behalf_of": null, "payment_intent_data": null, "payment_method_collection": "always", "payment_method_types": null, "phone_number_collection": { "enabled": false }, "shipping_address_collection": null, "shipping_options": [], "submit_type": "auto", "subscription_data": { "description": null, "invoice_settings": { "issuer": { "type": "self" } }, "trial_period_days": null }, "tax_id_collection": { "enabled": false }, "transfer_data": null, "url": "https://buy.stripe.com/test_cN25nr0iZ7bUa7meUY"}

Create a payment link

POST / v1 / payment_links

Creates a payment link.

Parameters

  • line _ items array of objects Required The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
  • metadata map Set of key-value pairs 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 created by this payment link.

More parameters

  • after _ completion object
  • allow _ promotion _ codes boolean
  • application _ fee _ amount integer Connect only
  • application _ fee _ percent number Connect only
  • automatic _ tax object
  • billing _ address _ collection enum
  • consent _ collection object
  • currency enum
  • custom _ fields array of objects
  • custom _ text object
  • customer _ creation enum
  • inactive _ message string
  • invoice _ creation object
  • managed _ payments object
  • name _ collection object
  • on _ behalf _ of string Connect only
  • optional _ items array of objects
  • payment _ intent _ data object
  • payment _ method _ collection enum
  • payment _ method _ options object
  • payment _ method _ types array of enums
  • phone _ number _ collection object
  • restrictions object
  • shipping _ address _ collection object
  • shipping _ options array of objects
  • submit _ type enum
  • subscription _ data object
  • tax _ id _ collection object
  • transfer _ data object Connect only

Returns

Returns the payment link.

Response

{ "id": "plink_1MoC3ULkdIwHu7ixZjtGpVl2", "object": "payment_link", "active": true, "after_completion": { "hosted_confirmation": { "custom_message": null }, "type": "hosted_confirmation" }, "allow_promotion_codes": false, "application_fee_amount": null, "application_fee_percent": null, "automatic_tax": { "enabled": false, "liability": null }, "billing_address_collection": "auto", "consent_collection": null, "currency": "usd", "custom_fields": [], "custom_text": { "shipping_address": null, "submit": null }, "customer_creation": "if_required", "invoice_creation": { "enabled": false, "invoice_data": { "account_tax_ids": null, "custom_fields": null, "description": null, "footer": null, "issuer": null, "metadata": {}, "rendering_options": null } }, "livemode": false, "metadata": {}, "on_behalf_of": null, "payment_intent_data": null, "payment_method_collection": "always", "payment_method_types": null, "phone_number_collection": { "enabled": false }, "shipping_address_collection": null, "shipping_options": [], "submit_type": "auto", "subscription_data": { "description": null, "invoice_settings": { "issuer": { "type": "self" } }, "trial_period_days": null }, "tax_id_collection": { "enabled": false }, "transfer_data": null, "url": "https://buy.stripe.com/test_cN25nr0iZ7bUa7meUY"}
Last verified 2026-09-24

Is this helpful?