> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.stripe.core.CreatePaymentLink

- Component: `appmixer.stripe.core.CreatePaymentLink`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.stripe 3.1.0](https://connectors.appmixer.com/connector/appmixer.stripe/3.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.stripe/3.1.0/component/appmixer.stripe.core.CreatePaymentLink>

Creates a reusable payment link for one or more prices and returns its URL. Anyone with the URL can pay; the link stays active until it is deactivated.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Line Items (`lineItems`) | expression | Up to 20 prices to sell, each with a quantity. |
| Redirect URL (`redirectUrl`) | text | Where to send the customer after a completed purchase. If empty, Stripe shows its own confirmation page. |
| Metadata (`metadata`) | key-value | Optional key-value pairs to store on the object, e.g. an order ID from your system. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Payment Link ID (`id`) | string | - |
| Object (`object`) | string | - |
| URL (`url`) | string | - |
| Active (`active`) | boolean | - |
| Currency (`currency`) | string | - |
| After Completion (`after_completion`) | object | - |
| Live Mode (`livemode`) | boolean | - |
| Metadata (`metadata`) | object | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.stripe.core.CreatePaymentLink",
  "description": "Creates a reusable payment link for one or more prices and returns its URL. Anyone with the URL can pay; the link stays active until it is deactivated.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:stripe"
  },
  "quota": {
    "manager": "appmixer:stripe",
    "resources": "requests"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "lineItems": {
            "type": "object"
          },
          "redirectUrl": {
            "type": "string"
          },
          "metadata": {
            "type": "string"
          }
        },
        "required": [
          "lineItems"
        ]
      },
      "inspector": {
        "inputs": {
          "lineItems": {
            "type": "expression",
            "label": "Line Items",
            "index": 1,
            "tooltip": "Up to 20 prices to sell, each with a quantity.",
            "levels": [
              "AND"
            ],
            "fields": {
              "price": {
                "type": "text",
                "label": "Price ID",
                "index": 1,
                "tooltip": "The ID of a Stripe Price, e.g. price_1MoBy5LkdIwHu7ixZhnattbh."
              },
              "quantity": {
                "type": "number",
                "label": "Quantity",
                "index": 2,
                "defaultValue": 1,
                "tooltip": "The quantity of the price. Defaults to 1."
              }
            }
          },
          "redirectUrl": {
            "type": "text",
            "label": "Redirect URL",
            "index": 2,
            "tooltip": "Where to send the customer after a completed purchase. If empty, Stripe shows its own confirmation page."
          },
          "metadata": {
            "type": "key-value",
            "label": "Metadata",
            "index": 3,
            "tooltip": "Optional key-value pairs to store on the object, e.g. an order ID from your system."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "title": "Payment Link ID",
            "example": "plink_1MoC3ULkdIwHu7ixZjtGpVl2"
          },
          "object": {
            "type": "string",
            "title": "Object",
            "example": "payment_link"
          },
          "url": {
            "type": "string",
            "title": "URL",
            "example": "https://buy.stripe.com/test_cN25nr0iZ7bUa7meUY"
          },
          "active": {
            "type": "boolean",
            "title": "Active",
            "example": true
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "example": "usd"
          },
          "after_completion": {
            "type": "object",
            "title": "After Completion",
            "properties": {
              "type": {
                "type": "string",
                "title": "After Completion.Type",
                "example": "redirect"
              },
              "redirect": {
                "type": [
                  "object",
                  "null"
                ],
                "title": "After Completion.Redirect",
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "After Completion.Redirect.URL",
                    "example": "https://example.com/thank-you"
                  }
                },
                "example": {
                  "url": "https://example.com/thank-you"
                }
              }
            },
            "example": {
              "type": "redirect",
              "redirect": {
                "url": "https://example.com/thank-you"
              }
            }
          },
          "livemode": {
            "type": "boolean",
            "title": "Live Mode",
            "example": false
          },
          "metadata": {
            "type": "object",
            "title": "Metadata",
            "example": {
              "orderId": "1001"
            }
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
