v1

latestOpenAPI 3.1.02026-07-2684271522.2 KB
Payment Links

Create Payment Link

Creates a payment link: a shareable URL that generates a checkout session each time a customer opens it. The mode is determined by line_items — it becomes subscription if any price is recurring, otherwise payment; pass mode=setup to save a payment method without a charge (setup mode requires a label and empty line_items). Creating a link may create supporting objects as a side effect: inline price_data provisions a Product and Price (in Stripe and Flex), inline shipping rate data creates a Shipping Rate, and inline coupon_data discounts create Coupons. Promotion codes are not accepted as discounts here — use coupon IDs or inline coupon data.

post/v1/payment_links

Request body

Example request

{
  "payment_link": {
    "label": "Example",
    "shipping_address_collection": false,
    "shipping_options": {},
    "metadata": {
      "order_id": "8842",
      "channel": "shopify"
    },
    "payment_intent_data": {},
    "after_completion": {},
    "allow_promotion_codes": false,
    "origin": "shopify",
    "tax_rate": {},
    "mode": "payment",
    "setup_future_use": "on_session"
  }
}

Response

An envelope wrapping a single payment link object.

Example response

{
  "payment_link": {
    "payment_link_id": "fplink_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
    "label": "Example",
    "active": false,
    "allow_promotion_codes": false,
    "shipping_address_collection": false,
    "shipping_options": {},
    "metadata": {
      "order_id": "8842",
      "channel": "shopify"
    },
    "url": "https://example.com",
    "created_at": "2026-06-15T14:30:00Z",
    "payment_intent_data": {},
    "after_completion": {},
    "origin": "shopify",
    "tax_rate": {},
    "setup_future_use": "on_session",
    "test_mode": false
  }
}