POST /v1/payment_links

Creates a payment link.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

Request body fields

Name Type Required Description
optional_items[] Array No

A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring Prices. There is a maximum of 10 optional items allowed on a payment link, and the existing limits on the number of line items allowed on a payment link apply to the combined number of line items and optional items. There is a maximum of 20 combined line items and optional items.

optional_items[].price String Yes
optional_items[].adjustable_quantity Object No
optional_items[].adjustable_quantity.minimum Integer No
optional_items[].adjustable_quantity.enabled Boolean Yes
optional_items[].adjustable_quantity.maximum Integer No
optional_items[].quantity Integer Yes
application_fee_percent Number No

A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.

submit_type String No

Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the url property (example: donate.stripe.com).

Possible values:

  • "subscribe"
  • "auto"
  • "book"
  • "donate"
  • "pay"
allow_promotion_codes Boolean No

Enables user redeemable promotion codes.

application_fee_amount Integer No

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. Can only be applied when there are no line items with recurring prices.

metadata Object No

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.

currency String No

Three-letter ISO currency code, in lowercase. Must be a supported currency and supported by each line item's price.

after_completion Object No

Behavior after the purchase is complete.

after_completion.hosted_confirmation Object No
after_completion.hosted_confirmation.custom_message String No
after_completion.type String Yes

Possible values:

  • "hosted_confirmation"
  • "redirect"
after_completion.redirect Object No
after_completion.redirect.url String Yes
on_behalf_of String No

The account on behalf of which to charge.

billing_address_collection String No

Configuration for collecting the customer's billing address. Defaults to auto.

Possible values:

  • "auto"
  • "required"
restrictions Object No

Settings that restrict the usage of a payment link.

restrictions.completed_sessions Object Yes
restrictions.completed_sessions.limit Integer Yes
line_items[] Array Yes

The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.

line_items[].price String Yes
line_items[].adjustable_quantity Object No
line_items[].adjustable_quantity.minimum Integer No
line_items[].adjustable_quantity.enabled Boolean Yes
line_items[].adjustable_quantity.maximum Integer No
line_items[].quantity Integer Yes
inactive_message String No

The custom message to be displayed to a customer when a payment link is no longer active.

custom_fields[] Array No

Collect additional information from your customer using custom fields. Up to 3 fields are supported.

custom_fields[].text Object No
custom_fields[].text.default_value String No
custom_fields[].text.minimum_length Integer No
custom_fields[].text.maximum_length Integer No
custom_fields[].key String Yes
custom_fields[].label Object Yes
custom_fields[].label.custom String Yes
custom_fields[].label.type String Yes

Possible values:

  • "custom"
custom_fields[].numeric Object No
custom_fields[].numeric.default_value String No
custom_fields[].numeric.minimum_length Integer No
custom_fields[].numeric.maximum_length Integer No
custom_fields[].dropdown Object No
custom_fields[].dropdown.default_value String No
custom_fields[].dropdown.options[] Array Yes
custom_fields[].dropdown.options[].label String Yes
custom_fields[].dropdown.options[].value String Yes
custom_fields[].type String Yes

Possible values:

  • "numeric"
  • "text"
  • "dropdown"
custom_fields[].optional Boolean No
transfer_data Object No

The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.

transfer_data.destination String Yes
transfer_data.amount Integer No
subscription_data Object No

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.

subscription_data.trial_settings Object No
subscription_data.trial_settings.end_behavior Object Yes
subscription_data.trial_settings.end_behavior.missing_payment_method String Yes

Possible values:

  • "cancel"
  • "create_invoice"
  • "pause"
subscription_data.description String No
subscription_data.trial_period_days Integer No
subscription_data.metadata Object No
subscription_data.invoice_settings Object No
subscription_data.invoice_settings.issuer Object No
subscription_data.invoice_settings.issuer.account String No
subscription_data.invoice_settings.issuer.type String Yes

Possible values:

  • "account"
  • "self"
customer_creation String No

Configures whether checkout sessions created by this payment link create a Customer.

Possible values:

  • "always"
  • "if_required"
phone_number_collection Object No

Controls phone number collection settings during checkout.

We recommend that you review your privacy policy and check with your legal contacts.

phone_number_collection.enabled Boolean Yes
shipping_options[] Array No

The shipping rate options to apply to checkout sessions created by this payment link.

shipping_options[].shipping_rate String No
expand[] Array No

Specifies which fields in the response should be expanded.

automatic_tax Object No

Configuration for automatic tax collection.

automatic_tax.enabled Boolean Yes
automatic_tax.liability Object No
automatic_tax.liability.account String No
automatic_tax.liability.type String Yes

Possible values:

  • "account"
  • "self"
consent_collection Object No

Configure fields to gather active consent from customers.

consent_collection.payment_method_reuse_agreement Object No
consent_collection.payment_method_reuse_agreement.position String Yes

Possible values:

  • "auto"
  • "hidden"
consent_collection.promotions String No

Possible values:

  • "auto"
  • "none"
consent_collection.terms_of_service String No

Possible values:

  • "required"
  • "none"
shipping_address_collection Object No

Configuration for collecting the customer's shipping address.

shipping_address_collection.allowed_countries[] Array Yes
invoice_creation Object No

Generate a post-purchase Invoice for one-time payments.

invoice_creation.enabled Boolean Yes
invoice_creation.invoice_data Object No
invoice_creation.invoice_data.rendering_options No
invoice_creation.invoice_data.description String No
invoice_creation.invoice_data.account_tax_ids No
invoice_creation.invoice_data.issuer Object No
invoice_creation.invoice_data.issuer.account String No
invoice_creation.invoice_data.issuer.type String Yes

Possible values:

  • "account"
  • "self"
invoice_creation.invoice_data.metadata No
invoice_creation.invoice_data.custom_fields No
invoice_creation.invoice_data.footer String No
payment_intent_data Object No

A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in payment mode.

payment_intent_data.setup_future_usage String No

Possible values:

  • "off_session"
  • "on_session"
payment_intent_data.description String No
payment_intent_data.capture_method String No

Possible values:

  • "manual"
  • "automatic"
  • "automatic_async"
payment_intent_data.metadata Object No
payment_intent_data.transfer_group String No
payment_intent_data.statement_descriptor String No
payment_intent_data.statement_descriptor_suffix String No
tax_id_collection Object No

Controls tax ID collection during checkout.

tax_id_collection.required String No

Possible values:

  • "if_supported"
  • "never"
tax_id_collection.enabled Boolean Yes
payment_method_collection String No

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. Defaults to always.

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.

Possible values:

  • "always"
  • "if_required"
payment_method_types[] Array No

The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your payment method settings (20+ payment methods supported).

custom_text Object No

Display additional text for your customers using custom text.

custom_text.shipping_address No
custom_text.terms_of_service_acceptance No
custom_text.submit No
custom_text.after_submit No

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.