Skip to main content
POST
/
v1
/
setup_intents
Create a SetupIntent
curl --request POST \
  --url https://api.leanrails.com/v1/setup_intents \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "customer": "<string>",
  "usage": "on_session"
}
'
{
  "id": "<string>",
  "object": "setup_intent",
  "status": "requires_payment_method",
  "customer": "<string>",
  "livemode": true,
  "created": 123,
  "payment_method": "<string>",
  "usage": "on_session",
  "client_secret": "<string>"
}

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
customer
string
required
usage
enum<string>
Available options:
on_session,
off_session

Response

Created

id
string
required
object
enum<string>
required
Available options:
setup_intent
status
enum<string>
required
Available options:
requires_payment_method,
requires_confirmation,
processing,
canceled,
succeeded
customer
string
required
livemode
boolean
created
integer
payment_method
string | null
usage
enum<string>
Available options:
on_session,
off_session
client_secret
string