getPaymentLinks
List all payment links
Details
- Method:
GET - Path:
/v1/payment_links - Operation ID:
GetPaymentLinks
Parameters
{
"active": {
"description": "Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).",
"required": false,
"location": "query",
"type": "boolean"
},
"ending_before": {
"description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.",
"required": false,
"location": "query",
"type": "string"
},
"expand": {
"description": "Specifies which fields in the response should be expanded.",
"required": false,
"location": "query",
"type": "array"
},
"limit": {
"description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.",
"required": false,
"location": "query",
"type": "integer"
},
"starting_after": {
"description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"description": "",
"properties": {
"data": {
"items": {
"description": "A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.\n\nWhen a customer opens a payment link it will open a new [checkout session](https://docs.stripe.com/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://docs.stripe.com/api/events/types#event_types-checkout.session.completed) to track payments through payment links.\n\nRelated guide: [Payment Links API](https://docs.stripe.com/payment-links)",
"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": "",
"properties": {
"hosted_confirmation": {
"description": "",
"properties": {
"custom_message": {
"description": "The custom message that is displayed to the customer after the purchase is complete.",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"title": "PaymentLinksResourceCompletionBehaviorConfirmationPage",
"type": "object",
"x-expandableFields": []
},
"redirect": {
"description": "",
"properties": {
"url": {
"description": "The URL the customer will be redirected to after the purchase is complete.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"url"
],
"title": "PaymentLinksResourceCompletionBehaviorRedirect",
"type": "object",
"x-expandableFields": []
},
"type": {
"description": "The specified behavior after the purchase is complete.",
"enum": [
"hosted_confirmation",
"redirect"
],
"type": "string"
}
},
"required": [
"type"
],
"title": "PaymentLinksResourceAfterCompletion",
"type": "object",
"x-expandableFields": [
"hosted_confirmation",
"redirect"
]
},
"allow_promotion_codes": {
"description": "Whether user redeemable promotion codes are enabled.",
"type": "boolean"
},
"application": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/application"
},
{
"$ref": "#/components/schemas/deleted_application"
}
],
"description": "The ID of the Connect application that created the Payment Link.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/application"
},
{
"$ref": "#/components/schemas/deleted_application"
}
]
}
},
"application_fee_amount": {
"description": "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.",
"nullable": true,
"type": "integer"
},
"application_fee_percent": {
"description": "This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.",
"nullable": true,
"type": "number"
},
"automatic_tax": {
"description": "",
"properties": {
"enabled": {
"description": "If `true`, tax will be calculated automatically using the customer's location.",
"type": "boolean"
},
"liability": {
"anyOf": [
{
"$ref": "#/components/schemas/connect_account_reference"
}
],
"description": "The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.",
"nullable": true
}
},
"required": [
"enabled"
],
"title": "PaymentLinksResourceAutomaticTax",
"type": "object",
"x-expandableFields": [
"liability"
]
},
"billing_address_collection": {
"description": "Configuration for collecting the customer's billing address. Defaults to `auto`.",
"enum": [
"auto",
"required"
],
"type": "string"
},
"consent_collection": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_consent_collection"
}
],
"description": "When set, provides configuration to gather active consent from customers.",
"nullable": true
},
"currency": {
"description": "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",
"type": "string"
},
"custom_fields": {
"description": "Collect additional information from your customer using custom fields. Up to 3 fields are supported.",
"items": {
"description": "",
"properties": {
"dropdown": {
"description": "",
"properties": {
"default_value": {
"description": "The value that will pre-fill on the payment page.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"options": {
"description": "The options available for the customer to select. Up to 200 options allowed.",
"items": {
"description": "",
"properties": {
"label": {
"description": "The label for the option, displayed to the customer. Up to 100 characters.",
"maxLength": 5000,
"type": "string"
},
"value": {
"description": "The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"label",
"value"
],
"title": "PaymentLinksResourceCustomFieldsDropdownOption",
"type": "object",
"x-expandableFields": []
},
"type": "array"
}
},
"required": [
"options"
],
"title": "PaymentLinksResourceCustomFieldsDropdown",
"type": "object",
"x-expandableFields": [
"options"
]
},
"key": {
"description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.",
"maxLength": 5000,
"type": "string"
},
"label": {
"description": "",
"properties": {
"custom": {
"description": "Custom text for the label, displayed to the customer. Up to 50 characters.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"type": {
"description": "The type of the label.",
"enum": [
"custom"
],
"type": "string"
}
},
"required": [
"type"
],
"title": "PaymentLinksResourceCustomFieldsLabel",
"type": "object",
"x-expandableFields": []
},
"numeric": {
"description": "",
"properties": {
"default_value": {
"description": "The value that will pre-fill the field on the payment page.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"maximum_length": {
"description": "The maximum character length constraint for the customer's input.",
"nullable": true,
"type": "integer"
},
"minimum_length": {
"description": "The minimum character length requirement for the customer's input.",
"nullable": true,
"type": "integer"
}
},
"title": "PaymentLinksResourceCustomFieldsNumeric",
"type": "object",
"x-expandableFields": []
},
"optional": {
"description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.",
"type": "boolean"
},
"text": {
"description": "",
"properties": {
"default_value": {
"description": "The value that will pre-fill the field on the payment page.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"maximum_length": {
"description": "The maximum character length constraint for the customer's input.",
"nullable": true,
"type": "integer"
},
"minimum_length": {
"description": "The minimum character length requirement for the customer's input.",
"nullable": true,
"type": "integer"
}
},
"title": "PaymentLinksResourceCustomFieldsText",
"type": "object",
"x-expandableFields": []
},
"type": {
"description": "The type of the field.",
"enum": [
"dropdown",
"numeric",
"text"
],
"type": "string"
}
},
"required": [
"key",
"label",
"optional",
"type"
],
"title": "PaymentLinksResourceCustomFields",
"type": "object",
"x-expandableFields": [
"dropdown",
"label",
"numeric",
"text"
]
},
"type": "array"
},
"custom_text": {
"description": "",
"properties": {
"after_submit": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_custom_text_position"
}
],
"description": "Custom text that should be displayed after the payment confirmation button.",
"nullable": true
},
"shipping_address": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_custom_text_position"
}
],
"description": "Custom text that should be displayed alongside shipping address collection.",
"nullable": true
},
"submit": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_custom_text_position"
}
],
"description": "Custom text that should be displayed alongside the payment confirmation button.",
"nullable": true
},
"terms_of_service_acceptance": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_custom_text_position"
}
],
"description": "Custom text that should be displayed in place of the default terms of service agreement text.",
"nullable": true
}
},
"title": "PaymentLinksResourceCustomText",
"type": "object",
"x-expandableFields": [
"after_submit",
"shipping_address",
"submit",
"terms_of_service_acceptance"
]
},
"customer_creation": {
"description": "Configuration for Customer creation during checkout.",
"enum": [
"always",
"if_required"
],
"type": "string"
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"inactive_message": {
"description": "The custom message to be displayed to a customer when a payment link is no longer active.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"invoice_creation": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_invoice_creation"
}
],
"description": "Configuration for creating invoice for payment mode payment links.",
"nullable": true
},
"line_items": {
"description": "The line items representing what is being sold.",
"properties": {
"data": {
"description": "Details about each object.",
"items": {
"description": "A line item.",
"properties": {
"amount_discount": {
"description": "Total discount amount applied. If no discounts were applied, defaults to 0.",
"type": "integer"
},
"amount_subtotal": {
"description": "Total before any discounts or taxes are applied.",
"type": "integer"
},
"amount_tax": {
"description": "Total tax amount applied. If no tax was applied, defaults to 0.",
"type": "integer"
},
"amount_total": {
"description": "Total after discounts and taxes.",
"type": "integer"
},
"currency": {
"description": "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",
"type": "string"
},
"description": {
"description": "An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"discounts": {
"description": "The discounts applied to the line item.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "The amount discounted.",
"type": "integer"
},
"discount": {
"description": "A discount represents the actual application of a [coupon](https://api.stripe.com#coupons) or [promotion code](https://api.stripe.com#promotion_codes).\nIt contains information about when the discount began, when it will end, and what it is applied to.\n\nRelated guide: [Applying discounts to subscriptions](https://docs.stripe.com/billing/subscriptions/discounts)",
"properties": {
"checkout_session": {
"description": "The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"customer": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/customer"
},
{
"$ref": "#/components/schemas/deleted_customer"
}
],
"description": "The ID of the customer associated with this discount.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/customer"
},
{
"$ref": "#/components/schemas/deleted_customer"
}
]
}
},
"customer_account": {
"description": "The ID of the account representing the customer associated with this discount.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"end": {
"description": "If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.",
"format": "unix-time",
"nullable": true,
"type": "integer"
},
"id": {
"description": "The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.",
"maxLength": 5000,
"type": "string"
},
"invoice": {
"description": "The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"invoice_item": {
"description": "The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"discount"
],
"type": "string"
},
"promotion_code": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/promotion_code"
}
],
"description": "The promotion code applied to create this discount.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/promotion_code"
}
]
}
},
"source": {
"description": "",
"properties": {
"coupon": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/coupon"
}
],
"description": "The coupon that was redeemed to create this discount.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/coupon"
}
]
}
},
"type": {
"description": "The source type of the discount.",
"enum": [
"coupon"
],
"type": "string"
}
},
"required": [
"type"
],
"title": "DiscountSource",
"type": "object",
"x-expandableFields": [
"coupon"
]
},
"start": {
"description": "Date that the coupon was applied.",
"format": "unix-time",
"type": "integer"
},
"subscription": {
"description": "The subscription that this coupon is applied to, if it is applied to a particular subscription.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"subscription_item": {
"description": "The subscription item that this coupon is applied to, if it is applied to a particular subscription item.",
"maxLength": 5000,
"nullable": true,
"type": "string"
}
},
"required": [
"id",
"object",
"source",
"start"
],
"title": "Discount",
"type": "object",
"x-expandableFields": [
"customer",
"promotion_code",
"source"
],
"x-resourceId": "discount"
}
},
"required": [
"amount",
"discount"
],
"title": "LineItemsDiscountAmount",
"type": "object",
"x-expandableFields": [
"discount"
]
},
"type": "array"
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"description": "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.",
"nullable": true,
"type": "object"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"item"
],
"type": "string"
},
"price": {
"anyOf": [
{
"$ref": "#/components/schemas/price"
}
],
"description": "The price used to generate the line item.",
"nullable": true
},
"quantity": {
"description": "The quantity of products being purchased.",
"nullable": true,
"type": "integer"
},
"taxes": {
"description": "The taxes applied to the line item.",
"items": {
"description": "",
"properties": {
"amount": {
"description": "Amount of tax applied for this rate.",
"type": "integer"
},
"rate": {
"description": "Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.\n\nRelated guide: [Tax rates](/billing/taxes/tax-rates)",
"properties": {
"active": {
"description": "Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.",
"type": "boolean"
},
"country": {
"description": "Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"created": {
"description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
"format": "unix-time",
"type": "integer"
},
"description": {
"description": "An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"display_name": {
"description": "The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.",
"maxLength": 5000,
"type": "string"
},
"effective_percentage": {
"description": "Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true,\nthis percentage reflects the rate actually used to calculate tax based on the product's taxability\nand whether the user is registered to collect taxes in the corresponding jurisdiction.",
"nullable": true,
"type": "number"
},
"flat_amount": {
"anyOf": [
{
"$ref": "#/components/schemas/tax_rate_flat_amount"
}
],
"description": "The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.",
"nullable": true
},
"id": {
"description": "Unique identifier for the object.",
"maxLength": 5000,
"type": "string"
},
"inclusive": {
"description": "This specifies if the tax rate is inclusive or exclusive.",
"type": "boolean"
},
"jurisdiction": {
"description": "The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"jurisdiction_level": {
"description": "The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates.",
"enum": [
"city",
"country",
"county",
"district",
"multiple",
"state"
],
"nullable": true,
"type": "string"
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"description": "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.",
"nullable": true,
"type": "object"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"tax_rate"
],
"type": "string"
},
"percentage": {
"description": "Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions.",
"type": "number"
},
"rate_type": {
"description": "Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.",
"enum": [
"flat_amount",
"percentage"
],
"nullable": true,
"type": "string"
},
"state": {
"description": "[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, \"NY\" for New York, United States.",
"maxLength": 5000,
"nullable": true,
"type": "string"
},
"tax_type": {
"description": "The high-level tax type, such as `vat` or `sales_tax`.",
"enum": [
"amusement_tax",
"communications_tax",
"gst",
"hst",
"igst",
"jct",
"lease_tax",
"pst",
"qst",
"retail_delivery_fee",
"rst",
"sales_tax",
"service_tax",
"vat"
],
"nullable": true,
"type": "string",
"x-stripeBypassValidation": true
}
},
"required": [
"active",
"created",
"display_name",
"id",
"inclusive",
"livemode",
"object",
"percentage"
],
"title": "TaxRate",
"type": "object",
"x-expandableFields": [
"flat_amount"
],
"x-resourceId": "tax_rate"
},
"taxability_reason": {
"description": "The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.",
"enum": [
"customer_exempt",
"not_collecting",
"not_subject_to_tax",
"not_supported",
"portion_product_exempt",
"portion_reduced_rated",
"portion_standard_rated",
"product_exempt",
"product_exempt_holiday",
"proportionally_rated",
"reduced_rated",
"reverse_charge",
"standard_rated",
"taxable_basis_reduced",
"zero_rated"
],
"nullable": true,
"type": "string",
"x-stripeBypassValidation": true
},
"taxable_amount": {
"description": "The amount on which tax is calculated, in cents (or local equivalent).",
"nullable": true,
"type": "integer"
}
},
"required": [
"amount",
"rate"
],
"title": "LineItemsTaxAmount",
"type": "object",
"x-expandableFields": [
"rate"
]
},
"type": "array"
}
},
"required": [
"amount_discount",
"amount_subtotal",
"amount_tax",
"amount_total",
"currency",
"id",
"object"
],
"title": "LineItem",
"type": "object",
"x-expandableFields": [
"discounts",
"price",
"taxes"
],
"x-resourceId": "item"
},
"type": "array"
},
"has_more": {
"description": "True if this list has another page of items after this one that can be fetched.",
"type": "boolean"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
"enum": [
"list"
],
"type": "string"
},
"url": {
"description": "The URL where this list can be accessed.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"data",
"has_more",
"object",
"url"
],
"title": "PaymentLinksResourceListLineItems",
"type": "object",
"x-expandableFields": [
"data"
]
},
"livemode": {
"description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
"type": "boolean"
},
"metadata": {
"additionalProperties": {
"maxLength": 500,
"type": "string"
},
"description": "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.",
"type": "object"
},
"name_collection": {
"description": "",
"properties": {
"business": {
"description": "",
"properties": {
"enabled": {
"description": "Indicates whether business name collection is enabled for the payment link.",
"type": "boolean"
},
"optional": {
"description": "Whether the customer is required to complete the field before checking out. Defaults to `false`.",
"type": "boolean"
}
},
"required": [
"enabled",
"optional"
],
"title": "PaymentLinksResourceBusinessName",
"type": "object",
"x-expandableFields": []
},
"individual": {
"description": "",
"properties": {
"enabled": {
"description": "Indicates whether individual name collection is enabled for the payment link.",
"type": "boolean"
},
"optional": {
"description": "Whether the customer is required to complete the field before checking out. Defaults to `false`.",
"type": "boolean"
}
},
"required": [
"enabled",
"optional"
],
"title": "PaymentLinksResourceIndividualName",
"type": "object",
"x-expandableFields": []
}
},
"title": "PaymentLinksResourceNameCollection",
"type": "object",
"x-expandableFields": [
"business",
"individual"
]
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value.",
"enum": [
"payment_link"
],
"type": "string"
},
"on_behalf_of": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/account"
}
],
"description": "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.",
"nullable": true,
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/account"
}
]
}
},
"optional_items": {
"description": "The optional items presented to the customer at checkout.",
"items": {
"description": "",
"properties": {
"adjustable_quantity": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_optional_item_adjustable_quantity"
}
],
"nullable": true
},
"price": {
"maxLength": 5000,
"type": "string"
},
"quantity": {
"type": "integer"
}
},
"required": [
"price",
"quantity"
],
"title": "PaymentLinksResourceOptionalItem",
"type": "object",
"x-expandableFields": [
"adjustable_quantity"
]
},
"nullable": true,
"type": "array"
},
"payment_intent_data": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_payment_intent_data"
}
],
"description": "Indicates the parameters to be passed to PaymentIntent creation during checkout.",
"nullable": true
},
"payment_method_collection": {
"description": "Configuration for collecting a payment method during checkout. Defaults to `always`.",
"enum": [
"always",
"if_required"
],
"type": "string"
},
"payment_method_types": {
"description": "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).",
"items": {
"enum": [
"affirm",
"afterpay_clearpay",
"alipay",
"alma",
"au_becs_debit",
"bacs_debit",
"bancontact",
"billie",
"blik",
"boleto",
"card",
"cashapp",
"eps",
"fpx",
"giropay",
"grabpay",
"ideal",
"klarna",
"konbini",
"link",
"mb_way",
"mobilepay",
"multibanco",
"oxxo",
"p24",
"pay_by_bank",
"paynow",
"paypal",
"payto",
"pix",
"promptpay",
"satispay",
"sepa_debit",
"sofort",
"swish",
"twint",
"us_bank_account",
"wechat_pay",
"zip"
],
"type": "string",
"x-stripeBypassValidation": true
},
"nullable": true,
"type": "array"
},
"phone_number_collection": {
"description": "",
"properties": {
"enabled": {
"description": "If `true`, a phone number will be collected during checkout.",
"type": "boolean"
}
},
"required": [
"enabled"
],
"title": "PaymentLinksResourcePhoneNumberCollection",
"type": "object",
"x-expandableFields": []
},
"restrictions": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_restrictions"
}
],
"description": "Settings that restrict the usage of a payment link.",
"nullable": true
},
"shipping_address_collection": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_shipping_address_collection"
}
],
"description": "Configuration for collecting the customer's shipping address.",
"nullable": true
},
"shipping_options": {
"description": "The shipping rate options applied to the session.",
"items": {
"description": "",
"properties": {
"shipping_amount": {
"description": "A non-negative integer in cents representing how much to charge.",
"type": "integer"
},
"shipping_rate": {
"anyOf": [
{
"maxLength": 5000,
"type": "string"
},
{
"$ref": "#/components/schemas/shipping_rate"
}
],
"description": "The ID of the Shipping Rate to use for this shipping option.",
"x-expansionResources": {
"oneOf": [
{
"$ref": "#/components/schemas/shipping_rate"
}
]
}
}
},
"required": [
"shipping_amount",
"shipping_rate"
],
"title": "PaymentLinksResourceShippingOption",
"type": "object",
"x-expandableFields": [
"shipping_rate"
]
},
"type": "array"
},
"submit_type": {
"description": "Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.",
"enum": [
"auto",
"book",
"donate",
"pay",
"subscribe"
],
"type": "string"
},
"subscription_data": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_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`.",
"nullable": true
},
"tax_id_collection": {
"description": "",
"properties": {
"enabled": {
"description": "Indicates whether tax ID collection is enabled for the session.",
"type": "boolean"
},
"required": {
"enum": [
"if_supported",
"never"
],
"type": "string"
}
},
"required": [
"enabled",
"required"
],
"title": "PaymentLinksResourceTaxIdCollection",
"type": "object",
"x-expandableFields": []
},
"transfer_data": {
"anyOf": [
{
"$ref": "#/components/schemas/payment_links_resource_transfer_data"
}
],
"description": "The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.",
"nullable": true
},
"url": {
"description": "The public URL that can be shared with customers.",
"maxLength": 5000,
"type": "string"
}
},
"required": [
"active",
"after_completion",
"allow_promotion_codes",
"automatic_tax",
"billing_address_collection",
"currency",
"custom_fields",
"custom_text",
"customer_creation",
"id",
"livemode",
"metadata",
"object",
"payment_method_collection",
"phone_number_collection",
"shipping_options",
"submit_type",
"tax_id_collection",
"url"
],
"title": "PaymentLink",
"type": "object",
"x-expandableFields": [
"after_completion",
"application",
"automatic_tax",
"consent_collection",
"custom_fields",
"custom_text",
"invoice_creation",
"line_items",
"name_collection",
"on_behalf_of",
"optional_items",
"payment_intent_data",
"phone_number_collection",
"restrictions",
"shipping_address_collection",
"shipping_options",
"subscription_data",
"tax_id_collection",
"transfer_data"
],
"x-resourceId": "payment_link"
},
"type": "array"
},
"has_more": {
"description": "True if this list has another page of items after this one that can be fetched.",
"type": "boolean"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
"enum": [
"list"
],
"type": "string"
},
"url": {
"description": "The URL where this list can be accessed.",
"maxLength": 5000,
"pattern": "^/v1/payment_links",
"type": "string"
}
},
"required": [
"data",
"has_more",
"object",
"url"
],
"title": "PaymentLinksResourcePaymentLinkList",
"type": "object",
"x-expandableFields": [
"data"
]
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('stripe')
# Call this tool
result = await agent.call_tool('getPaymentLinks', {
# Add required parameters here
})