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

Retrieve a payment link

Retrieves a payment link by its identifier. Use expand when you need selected related fields included directly in the response. The response contains the payment link configuration and current activation state.

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

2 parameters
payment_linkstringrequired
The identifier of the payment link to retrieve. Maximum 5000 characters.
expandarray<string>optional
Fields to expand in the returned payment link; each expansion name can be no longer than 5000 characters.

2 status codes
200Returns the payment link object, including its identifier, active state, checkout configuration, currency, and hosted payment link details.
activebooleanrequired
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.
after_completionobjectrequired
allow_promotion_codesbooleanrequired
Whether user redeemable promotion codes are enabled.
applicationstringoptional
The ID of the Connect application that created the Payment Link.
application_fee_amountintegeroptional
The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
application_fee_percentnumberoptional
This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
automatic_taxobjectrequired
billing_address_collectionstringrequired
Configuration for collecting the customer's billing address. Defaults to `auto`.
Allowed:autorequired
consent_collectionobjectoptional
When set, provides configuration to gather active consent from customers.
currencystringrequired
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
custom_fieldsarray<PaymentLinksResourceCustomFields>required
Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`.
custom_textobjectrequired
customer_creationstringrequired
Configuration for Customer creation during checkout.
Allowed:alwaysif_required
idstringrequired
Unique identifier for the object.
inactive_messagestringoptional
The custom message to be displayed to a customer when a payment link is no longer active.
invoice_creationobjectoptional
Configuration for creating invoice for payment mode payment links.
line_itemsobjectoptional
The line items representing what is being sold.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
managed_paymentsobjectoptional
Settings for Managed Payments for this Payment Link and resulting [CheckoutSessions](/api/checkout/sessions/object), [PaymentIntents](/api/payment_intents/object), [Invoices](/api/invoices/object), and [Subscriptions](/api/subscriptions/object).
metadataobjectrequired
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
name_collectionobjectoptional
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:payment_link
on_behalf_ofstringoptional
The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.
optional_itemsarray<PaymentLinksResourceOptionalItem>optional
The optional items presented to the customer at checkout.
payment_intent_dataobjectoptional
Indicates the parameters to be passed to PaymentIntent creation during checkout.
payment_method_collectionstringrequired
Configuration for collecting a payment method during checkout. Defaults to `always`.
Allowed:alwaysif_required
payment_method_optionsobjectoptional
Payment-method-specific configuration.
payment_method_typesarray<string>optional
The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
phone_number_collectionobjectrequired
restrictionsobjectoptional
Settings that restrict the usage of a payment link.
shipping_address_collectionobjectoptional
Configuration for collecting the customer's shipping address.
shipping_optionsarray<PaymentLinksResourceShippingOption>required
The shipping rate options applied to the session.
submit_typestringrequired
Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.
Allowed:autobookdonatepaysubscribe
subscription_dataobjectoptional
When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
tax_id_collectionobjectrequired
transfer_dataobjectoptional
The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
urlstringrequired
The public URL that can be shared with customers.
defaultError response.
errorobjectrequired

Error handling

payment_link must identify the payment link to retrieve and must be no longer than 5000 characters. Each expand value must also be no longer than 5000 characters.