Skip to main content
POST
/
v1
/
checkout_links
Create a Checkout Link
curl --request POST \
  --url https://api.leanrails.com/v1/checkout_links \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "line_items": [
    {
      "quantity": 2,
      "price": "<string>",
      "price_data": {
        "currency": "<string>",
        "product": "<string>",
        "unit_amount": 1,
        "tax_behavior": "inclusive"
      }
    }
  ],
  "title": "<string>",
  "mode": "payment",
  "description": "<string>",
  "currency": "<string>",
  "after_completion": {
    "type": "redirect",
    "redirect": {
      "url": "<string>"
    },
    "hosted_confirmation": {
      "custom_message": "<string>"
    }
  },
  "billing_address_collection": "auto",
  "metadata": {},
  "inactive_message": "<string>",
  "payment_method_types": [
    "<string>"
  ],
  "allow_promotion_codes": false,
  "restrictions": {
    "completed_sessions": {
      "limit": 2
    }
  },
  "submit_type": "auto"
}
'
{
  "id": "cl_xxx",
  "object": "checkout_link",
  "active": true,
  "mode": "payment",
  "url": "<string>",
  "title": "<string>",
  "currency": "<string>",
  "livemode": true,
  "created": 123,
  "description": "<string>",
  "after_completion": {
    "type": "redirect",
    "redirect": {
      "url": "<string>"
    },
    "hosted_confirmation": {
      "custom_message": "<string>"
    }
  },
  "billing_address_collection": "auto",
  "metadata": {},
  "custom_fields": [
    {}
  ],
  "custom_text": {},
  "inactive_message": "<string>",
  "payment_method_types": [
    "<string>"
  ],
  "allow_promotion_codes": true,
  "restrictions": {
    "completed_sessions": {
      "limit": 2
    }
  },
  "submit_type": "auto"
}

Documentation Index

Fetch the complete documentation index at: https://docs.fluveo.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use your secret API key as the username with an empty password.

Headers

Idempotency-Key
string
required

Unique key to ensure idempotent requests.

Maximum string length: 255
X-API-Version
string

Override the API version for this request.

Body

application/json
line_items
object[]
required
Minimum array length: 1
title
string
required
Maximum string length: 30
mode
enum<string>
default:payment
Available options:
payment,
order
description
string
Maximum string length: 500
currency
string
Required string length: 3
after_completion
object
billing_address_collection
enum<string>
default:auto
Available options:
auto,
required
metadata
object

Set of key-value pairs for storing additional information.

inactive_message
string
Maximum string length: 500
payment_method_types
string[]
allow_promotion_codes
boolean
default:false
restrictions
object
submit_type
enum<string>
default:auto
Available options:
auto,
pay,
book,
donate

Response

The created Checkout Link.

id
string
required
Example:

"cl_xxx"

object
enum<string>
required
Available options:
checkout_link
active
boolean
required
mode
enum<string>
required
Available options:
payment,
order
url
string<uri>
required

The hosted checkout link URL.

title
string
required
Maximum string length: 30
currency
string
required

Three-letter ISO currency code.

livemode
boolean
required
created
integer
required

Unix timestamp.

description
string | null
Maximum string length: 500
after_completion
object
billing_address_collection
enum<string>
Available options:
auto,
required
metadata
object

Set of key-value pairs for storing additional information.

custom_fields
object[]
custom_text
object
inactive_message
string | null
payment_method_types
string[] | null
allow_promotion_codes
boolean
restrictions
object
submit_type
enum<string>
Available options:
auto,
pay,
book,
donate