{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/stripe/main/json-schema/stripe-post-payment-links-payment-link-request-schema.json", "title": "PostPaymentLinksPaymentLinkRequest", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/stripe-payment-links-api-openapi.yml#/components/schemas/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.\n\nCan only be set in `subscription` mode.\n\nIf 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", "ST", "SV", "SX", "SZ", "TA", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW", "ZZ" ], "type": "string" }, "type": "array" } }, "required": [ "allowed_countries" ], "title": "shipping_address_collection_params", "type": "object" }, { "enum": [ "" ], "type": "string" } ], "description": "Configuration for collecting the customer's shipping address." }, "subscription_data": { "description": "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`.", "properties": { "metadata": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "enum": [ "" ], "type": "string" } ] }, "trial_settings": { "anyOf": [ { "properties": { "end_behavior": { "properties": { "missing_payment_method": { "enum": [ "cancel", "create_invoice", "pause" ], "type": "string" } }, "required": [ "missing_payment_method" ], "title": "end_behavior", "type": "object" } }, "required": [ "end_behavior" ], "title": "trial_settings_config", "type": "object" }, { "enum": [ "" ], "type": "string" } ] } }, "title": "subscription_data_update_params", "type": "object" } } }