Skip to main content
POST
/
api
/
v1
/
payments
/
stripe
/
checkout-session
Create Checkout Session
curl --request POST \
  --url https://api.devkit4ai.com/api/v1/payments/stripe/checkout-session \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "price_id": "<string>",
  "success_url": "<string>",
  "cancel_url": "<string>",
  "mode": "subscription",
  "quantity": 1,
  "metadata": {},
  "allow_existing_subscription": false
}
'
{
  "session_id": "<string>",
  "checkout_url": "<string>"
}

Documentation Index

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

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

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

test_mode
boolean
default:true

Use test mode credentials

Body

application/json

Request to create a Stripe checkout session.

price_id
string
required
Minimum string length: 1
success_url
string
required
Minimum string length: 1
cancel_url
string
required
Minimum string length: 1
mode
string
default:subscription
Pattern: ^(subscription|payment)$
quantity
integer
default:1
Required range: x >= 1
metadata
Metadata · object
allow_existing_subscription
boolean
default:false

If true, allows checkout even if user has active subscription

Response

Successful Response

Stripe checkout session response.

session_id
string
required
checkout_url
string
required