POST /v1/payment_links
Creates a payment link.
Servers
- https://api.stripe.com/
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: Possible values:
|
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 |
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:
|
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 Possible values:
|
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_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:
|
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.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:
|
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:
|
customer_creation |
String | No |
Configures whether checkout sessions created by this payment link create a Customer. Possible values:
|
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:
|
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:
|
consent_collection.promotions |
String | No |
Possible values:
|
consent_collection.terms_of_service |
String | No |
Possible values:
|
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:
|
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_intent_data.setup_future_usage |
String | No |
Possible values:
|
payment_intent_data.description |
String | No | |
payment_intent_data.capture_method |
String | No |
Possible values:
|
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:
|
tax_id_collection.enabled |
Boolean | Yes | |
payment_method_collection |
String | No |
Specify whether Checkout should collect a payment method. When set to Can only be set in 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:
|
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
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.