Stripe: Update a payment link
Stripe paymentLinks.postPaymentLinksPaymentLink: arguments, response, policy and SDK examples.
← Payment links operations · Get started
Operation stripe.postpaymentlinkspaymentlink
Provider route: POST /v1/payment_links/{payment_link}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["paymentLinks"]["postPaymentLinksPaymentLink"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.paymentLinks.postPaymentLinksPaymentLink(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_stripe import StripeIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.payment_links.post_payment_links_payment_link(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.payment_link | string | Required within parent | Maximum length: 5000 |
headers | object | Optional | Additional keys: not allowed |
headers.Idempotency-Key | string | Optional | Minimum length: 1 Maximum length: 255 |
body | object | Optional | Additional keys: not allowed |
body.active | boolean | Optional | 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. |
body.after_completion | object | Optional | Behavior after the purchase is complete. |
body.after_completion.hosted_confirmation | object | Optional | |
body.after_completion.hosted_confirmation.custom_message | string | Optional | Maximum length: 500 |
body.after_completion.redirect | object | Optional | |
body.after_completion.redirect.url | string | Required within parent | |
body.after_completion.type | string | Required within parent | One of: hosted_confirmation, redirect |
body.allow_promotion_codes | boolean | Optional | Enables user redeemable promotion codes. |
body.application_fee_amount | JSON | Optional | 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. |
body.application_fee_amount (anyOf 1) | integer | Alternative | |
body.application_fee_amount (anyOf 2) | string | Alternative | One of: |
body.application_fee_percent | JSON | Optional | 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. |
body.application_fee_percent (anyOf 1) | number | Alternative | |
body.application_fee_percent (anyOf 2) | string | Alternative | One of: |
body.automatic_tax | object | Optional | Configuration for automatic tax collection. |
body.automatic_tax.enabled | boolean | Required within parent | |
body.automatic_tax.liability | object | Optional | |
body.automatic_tax.liability.account | string | Optional | |
body.automatic_tax.liability.type | string | Required within parent | One of: account, self |
body.billing_address_collection | string | Optional | Configuration for collecting the customer’s billing address. Defaults to `auto`. One of: auto, required |
body.consent_collection | object | Optional | Configure fields to gather active consent from customers. |
body.consent_collection.payment_method_reuse_agreement | object | Optional | |
body.consent_collection.payment_method_reuse_agreement.position | string | Required within parent | One of: auto, hidden |
body.consent_collection.promotions | string | Optional | One of: auto, none |
body.consent_collection.terms_of_service | string | Optional | One of: none, required |
body.custom_fields | JSON | Optional | 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 `elements`. |
body.custom_fields (anyOf 1) | array | Alternative | |
body.custom_fields (anyOf 1)[] | Model | Each item | Expand Create a payment link — request body — body custom fields item |
body.custom_fields (anyOf 2) | string | Alternative | One of: |
body.custom_text | Model | Optional | Expand Create a payment link — request body — body custom text |
body.customer_creation | string | Optional | Configures whether [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link create a [Customer](https://docs.stripe.com/api/customers). One of: always, if_required |
body.expand | array | Optional | Specifies which fields in the response should be expanded. |
body.expand[] | string | Each item | Maximum length: 5000 |
body.inactive_message | JSON | Optional | The custom message to be displayed to a customer when a payment link is no longer active. |
body.inactive_message (anyOf 1) | string | Alternative | Maximum length: 500 |
body.inactive_message (anyOf 2) | string | Alternative | One of: |
body.invoice_creation | Model | Optional | Expand Create a payment link — request body — body invoice creation |
body.line_items | array | Optional | The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. |
body.line_items[] | object | Each item | |
body.line_items[].adjustable_quantity | object | Optional | |
body.line_items[].adjustable_quantity.enabled | boolean | Required within parent | |
body.line_items[].adjustable_quantity.maximum | integer | Optional | |
body.line_items[].adjustable_quantity.minimum | integer | Optional | |
body.line_items[].id | string | Required within parent | Maximum length: 5000 |
body.line_items[].quantity | integer | Optional | |
body.metadata | object | Optional | 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. 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://docs.stripe.com/api/checkout/sessions) created by this payment link. Additional keys: see wildcard field |
body.metadata.* | string | Additional keys | |
body.name_collection | JSON | Optional | Controls settings applied for collecting the customer’s name. |
body.name_collection (anyOf 1) | object | Alternative | |
body.name_collection (anyOf 1).business | object | Optional | |
body.name_collection (anyOf 1).business.enabled | boolean | Required within parent | |
body.name_collection (anyOf 1).business.optional | boolean | Optional | |
body.name_collection (anyOf 1).individual | object | Optional | |
body.name_collection (anyOf 1).individual.enabled | boolean | Required within parent | |
body.name_collection (anyOf 1).individual.optional | boolean | Optional | |
body.name_collection (anyOf 2) | string | Alternative | One of: |
body.on_behalf_of | JSON | Optional | The account on behalf of which to charge. |
body.on_behalf_of (anyOf 1) | string | Alternative | |
body.on_behalf_of (anyOf 2) | string | Alternative | One of: |
body.optional_items | JSON | Optional | A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://docs.stripe.com/api/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. |
body.optional_items (anyOf 1) | array | Alternative | |
body.optional_items (anyOf 1)[] | object | Each item | |
body.optional_items (anyOf 1)[].adjustable_quantity | object | Optional | |
body.optional_items (anyOf 1)[].adjustable_quantity.enabled | boolean | Required within parent | |
body.optional_items (anyOf 1)[].adjustable_quantity.maximum | integer | Optional | |
body.optional_items (anyOf 1)[].adjustable_quantity.minimum | integer | Optional | |
body.optional_items (anyOf 1)[].price | string | Required within parent | Maximum length: 5000 |
body.optional_items (anyOf 1)[].quantity | integer | Required within parent | |
body.optional_items (anyOf 2) | string | Alternative | One of: |
body.payment_intent_data | object | Optional | A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. |
body.payment_intent_data.description | JSON | Optional | |
body.payment_intent_data.description (anyOf 1) | string | Alternative | Maximum length: 1000 |
body.payment_intent_data.description (anyOf 2) | string | Alternative | One of: |
body.payment_intent_data.metadata | JSON | Optional | |
body.payment_intent_data.metadata (anyOf 1) | object | Alternative | Additional keys: see wildcard field |
body.payment_intent_data.metadata (anyOf 1).* | string | Additional keys | |
body.payment_intent_data.metadata (anyOf 2) | string | Alternative | One of: |
body.payment_intent_data.setup_future_usage | string | Optional | One of: , off_session, on_session |
body.payment_intent_data.statement_descriptor | JSON | Optional | |
body.payment_intent_data.statement_descriptor (anyOf 1) | string | Alternative | Maximum length: 22 |
body.payment_intent_data.statement_descriptor (anyOf 2) | string | Alternative | One of: |
body.payment_intent_data.statement_descriptor_suffix | JSON | Optional | |
body.payment_intent_data.statement_descriptor_suffix (anyOf 1) | string | Alternative | Maximum length: 22 |
body.payment_intent_data.statement_descriptor_suffix (anyOf 2) | string | Alternative | One of: |
body.payment_intent_data.transfer_group | JSON | Optional | |
body.payment_intent_data.transfer_group (anyOf 1) | string | Alternative | Maximum length: 5000 |
body.payment_intent_data.transfer_group (anyOf 2) | string | Alternative | One of: |
body.payment_method_collection | string | Optional | 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](https://docs.stripe.com/payments/checkout/free-trials). One of: always, if_required |
body.payment_method_options | JSON | Optional | Payment-method-specific configuration. |
body.payment_method_options (anyOf 1) | object | Alternative | |
body.payment_method_options (anyOf 1).card | JSON | Optional | |
body.payment_method_options (anyOf 1).card (anyOf 1) | object | Alternative | |
body.payment_method_options (anyOf 1).card (anyOf 1).restrictions | JSON | Optional | |
body.payment_method_options (anyOf 1).card (anyOf 1).restrictions (anyOf 1) | object | Alternative | |
body.payment_method_options (anyOf 1).card (anyOf 1).restrictions (anyOf 1).brands_blocked | JSON | Optional | |
body.payment_method_options (anyOf 1).card (anyOf 1).restrictions (anyOf 1).brands_blocked (anyOf 1) | array | Alternative | |
body.payment_method_options (anyOf 1).card (anyOf 1).restrictions (anyOf 1).brands_blocked (anyOf 1)[] | string | Each item | One of: american_express, discover_global_network, mastercard, visa |
body.payment_method_options (anyOf 1).card (anyOf 1).restrictions (anyOf 1).brands_blocked (anyOf 2) | string | Alternative | One of: |
body.payment_method_options (anyOf 1).card (anyOf 1).restrictions (anyOf 2) | string | Alternative | One of: |
body.payment_method_options (anyOf 1).card (anyOf 2) | string | Alternative | One of: |
body.payment_method_options (anyOf 2) | string | Alternative | One of: |
body.payment_method_types | JSON | Optional | 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). |
body.payment_method_types (anyOf 1) | array | Alternative | |
body.payment_method_types (anyOf 1)[] | string | Each item | One of: affirm, afterpay_clearpay, alipay, alma, au_becs_debit, bacs_debit, bancontact, billie, bizum, blik, boleto, card, cashapp, eps, fpx, giropay, grabpay, ideal, klarna, konbini, link, mb_way, mobilepay, multibanco, oxxo, p24, pay_by_bank, paynow, paypal, paypay, payto, pix, promptpay, satispay, sepa_debit, sequra, sofort, sunbit, swish, twint, upi, us_bank_account, wechat_pay, zip |
body.payment_method_types (anyOf 2) | string | Alternative | One of: |
body.phone_number_collection | object | Optional | Controls phone number collection settings during checkout. We recommend that you review your privacy policy and check with your legal contacts. |
body.phone_number_collection.enabled | boolean | Required within parent | |
body.restrictions | JSON | Optional | Settings that restrict the usage of a payment link. |
body.restrictions (anyOf 1) | object | Alternative | |
body.restrictions (anyOf 1).completed_sessions | object | Required within parent | |
body.restrictions (anyOf 1).completed_sessions.limit | integer | Required within parent | |
body.restrictions (anyOf 2) | string | Alternative | One of: |
body.shipping_address_collection | JSON | Optional | Configuration for collecting the customer’s shipping address. |
body.shipping_address_collection (anyOf 1) | object | Alternative | |
body.shipping_address_collection (anyOf 1).allowed_countries | array | Required within parent | |
body.shipping_address_collection (anyOf 1).allowed_countries[] | string | Each item | One of: 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, SD, 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 |
body.shipping_address_collection (anyOf 2) | string | Alternative | One of: |
body.shipping_options | JSON | Optional | The shipping rate options to apply to [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link. |
body.shipping_options (anyOf 1) | array | Alternative | |
body.shipping_options (anyOf 1)[] | object | Each item | |
body.shipping_options (anyOf 1)[].shipping_rate | string | Optional | Maximum length: 5000 |
body.shipping_options (anyOf 2) | string | Alternative | One of: |
body.submit_type | string | Optional | 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](https://docs.stripe.com/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). One of: auto, book, donate, pay, subscribe |
body.subscription_data | object | Optional | 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`. |
body.subscription_data.invoice_settings | object | Optional | |
body.subscription_data.invoice_settings.issuer | object | Optional | |
body.subscription_data.invoice_settings.issuer.account | string | Optional | |
body.subscription_data.invoice_settings.issuer.type | string | Required within parent | One of: account, self |
body.subscription_data.metadata | JSON | Optional | |
body.subscription_data.metadata (anyOf 1) | object | Alternative | Additional keys: see wildcard field |
body.subscription_data.metadata (anyOf 1).* | string | Additional keys | |
body.subscription_data.metadata (anyOf 2) | string | Alternative | One of: |
body.subscription_data.trial_period_days | JSON | Optional | |
body.subscription_data.trial_period_days (anyOf 1) | integer | Alternative | |
body.subscription_data.trial_period_days (anyOf 2) | string | Alternative | One of: |
body.subscription_data.trial_settings | JSON | Optional | |
body.subscription_data.trial_settings (anyOf 1) | object | Alternative | |
body.subscription_data.trial_settings (anyOf 1).end_behavior | object | Required within parent | |
body.subscription_data.trial_settings (anyOf 1).end_behavior.missing_payment_method | string | Required within parent | One of: cancel, create_invoice, pause |
body.subscription_data.trial_settings (anyOf 2) | string | Alternative | One of: |
body.tax_id_collection | object | Optional | Controls tax ID collection during checkout. |
body.tax_id_collection.enabled | boolean | Required within parent | |
body.tax_id_collection.required | string | Optional | One of: if_supported, never |
body.transfer_data | JSON | Optional | The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. |
body.transfer_data (anyOf 1) | object | Alternative | |
body.transfer_data (anyOf 1).amount | JSON | Optional | |
body.transfer_data (anyOf 1).amount (anyOf 1) | integer | Alternative | |
body.transfer_data (anyOf 1).amount (anyOf 2) | string | Alternative | One of: |
body.transfer_data (anyOf 1).destination | string | Required within parent | |
body.transfer_data (anyOf 2) | string | Alternative | One of: |
Referenced models: Create a payment link — request body — body custom fields item, Create a payment link — request body — body custom text, Create a payment link — request body — body invoice creation
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Create a payment link — response body |
Referenced models: Create a payment link — response body
Schemas
Section titled “Schemas”745 more schemas are linked from the tables above, on the schema pages.
Create a payment link — request body — body custom fields item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
dropdown | object | Optional | |
dropdown.default_value | string | Optional | Maximum length: 100 |
dropdown.options | array | Required within parent | |
dropdown.options[] | object | Each item | |
dropdown.options[].label | string | Required within parent | Maximum length: 100 |
dropdown.options[].value | string | Required within parent | Maximum length: 100 |
key | string | Required within parent | Maximum length: 200 |
label | object | Required within parent | |
label.custom | string | Required within parent | Maximum length: 100 |
label.type | string | Required within parent | One of: custom |
numeric | object | Optional | |
numeric.default_value | string | Optional | Maximum length: 255 |
numeric.maximum_length | integer | Optional | |
numeric.minimum_length | integer | Optional | |
optional | boolean | Optional | |
text | object | Optional | |
text.default_value | string | Optional | Maximum length: 255 |
text.maximum_length | integer | Optional | |
text.minimum_length | integer | Optional | |
type | string | Required within parent | One of: dropdown, numeric, text |
Create a payment link — request body — body custom text
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `elements`. |
after_submit | JSON | Optional | |
after_submit (anyOf 1) | object | Alternative | |
after_submit (anyOf 1).message | string | Required within parent | Maximum length: 1200 |
after_submit (anyOf 2) | string | Alternative | One of: |
shipping_address | JSON | Optional | |
shipping_address (anyOf 1) | object | Alternative | |
shipping_address (anyOf 1).message | string | Required within parent | Maximum length: 1200 |
shipping_address (anyOf 2) | string | Alternative | One of: |
submit | JSON | Optional | |
submit (anyOf 1) | object | Alternative | |
submit (anyOf 1).message | string | Required within parent | Maximum length: 1200 |
submit (anyOf 2) | string | Alternative | One of: |
terms_of_service_acceptance | JSON | Optional | |
terms_of_service_acceptance (anyOf 1) | object | Alternative | |
terms_of_service_acceptance (anyOf 1).message | string | Required within parent | Maximum length: 1200 |
terms_of_service_acceptance (anyOf 2) | string | Alternative | One of: |
Create a payment link — request body — body invoice creation
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Generate a post-purchase Invoice for one-time payments. |
enabled | boolean | Required within parent | |
invoice_data | Model | Optional | Expand Create a payment link — request body — body invoice creation invoice data |
Referenced models: Create a payment link — request body — body invoice creation invoice data
PostApplicationFeesIdRefund — response body — application / object: application
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | The name of the application. Maximum length: 5000 |
name (anyOf 2) | null | Alternative | |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: application |
Accept a quote — response body — application / value / deleted: True, object: application
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
deleted | boolean | Required within parent | Always true for a deleted object Known values: True |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | The name of the application. Maximum length: 5000 |
name (anyOf 2) | null | Alternative | |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: application |
Retrieve a quote's line items — response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A line item. |
adjustable_quantity | JSON | Optional | |
adjustable_quantity (anyOf 1) | JSON | Alternative | |
adjustable_quantity (anyOf 1) (anyOf 1) | Model | Alternative | Expand Retrieve a quote's line items — response body — data item adjustable quantity value enabled, maximum, minimum |
adjustable_quantity (anyOf 2) | null | Alternative | |
amount_discount | JSON | Required within parent | |
amount_discount (anyOf 1) | integer | Alternative | Total discount amount applied. If no discounts were applied, defaults to 0. |
amount_discount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
amount_subtotal | JSON | Required within parent | |
amount_subtotal (anyOf 1) | integer | Alternative | Total before any discounts or taxes are applied. |
amount_subtotal (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
amount_tax | JSON | Required within parent | |
amount_tax (anyOf 1) | integer | Alternative | Total tax amount applied. If no tax was applied, defaults to 0. |
amount_tax (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
amount_total | JSON | Required within parent | |
amount_total (anyOf 1) | integer | Alternative | Total after discounts and taxes. |
amount_total (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
currency | string | Required within parent | 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). Format: currency |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. Maximum length: 5000 |
description (anyOf 2) | null | Alternative | |
discounts | array | Optional | The discounts applied to the line item. |
discounts[] | Model | Each item | Expand Retrieve a quote's line items — response body — data item discounts item |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
metadata | JSON | Optional | |
metadata (anyOf 1) | object | Alternative | 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. Additional keys: see wildcard field |
metadata (anyOf 1).* | string | Additional keys | Maximum length: 500 |
metadata (anyOf 2) | null | Alternative | |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: item |
price | JSON | Optional | |
price (anyOf 1) | JSON | Alternative | The price used to generate the line item. |
price (anyOf 1) (anyOf 1) | Model | Alternative | Expand Create a price — response body |
price (anyOf 2) | null | Alternative | |
quantity | JSON | Optional | |
quantity (anyOf 1) | JSON | Alternative | |
quantity (anyOf 1) (anyOf 1) | integer | Alternative | The quantity of products being purchased. |
quantity (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
quantity (anyOf 2) | null | Alternative | |
taxes | array | Optional | The taxes applied to the line item. |
taxes[] | Model | Each item | Expand Retrieve a quote's line items — response body — data item taxes item |
Referenced models: Retrieve a quote's line items — response body — data item adjustable quantity value enabled, maximum, minimum, Retrieve a quote's line items — response body — data item discounts item, Retrieve a quote's line items — response body — data item taxes item, Create a price — response body
Create a payment link — response body — phone number collection
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
enabled | boolean | Required within parent | If `true`, a phone number will be collected during checkout. |
Create a Payment Method — response body — zip
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: stripe.postpaymentlinkspaymentlink. Catalog operation: PostPaymentLinksPaymentLink. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Pinned headers: {"Stripe-Version": "2026-09-30.endive"}