Skip to main content
POST
/
v1
/
setup_intents
Create Setup Intent
curl --request POST \
  --url https://api.withflex.com/v1/setup_intents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "setup_intent": {
    "partner_id": "obj_01EXAMPLE00000000000000000",
    "checkout_session": "obj_01EXAMPLE00000000000000000"
  }
}
'
{
  "setup_intent": {
    "setup_intent_id": "obj_01EXAMPLE00000000000000000",
    "client_secret": "string",
    "customer": "string",
    "description": "string",
    "payment_method": "string",
    "partner_id": "obj_01EXAMPLE00000000000000000",
    "metadata": {},
    "created_at": "2024-01-01T00:00:00Z",
    "test_mode": false,
    "status": "requires_payment_method",
    "usage": "off_session",
    "subscription_id": "obj_01EXAMPLE00000000000000000"
  }
}

Authorizations

Authorization
string
header
required

Use a Bearer token to access this API.

Body

application/json
setup_intent
object
required
Example:
{
"partner_id": "obj_01EXAMPLE00000000000000000",
"checkout_session": "obj_01EXAMPLE00000000000000000"
}

Response

Success

setup_intent
object
required
Example:
{
"setup_intent_id": "obj_01EXAMPLE00000000000000000",
"client_secret": "string",
"customer": "string",
"description": "string",
"payment_method": "string",
"partner_id": "obj_01EXAMPLE00000000000000000",
"metadata": {},
"created_at": "2024-01-01T00:00:00Z",
"test_mode": false,
"status": "requires_payment_method",
"usage": "off_session",
"subscription_id": "obj_01EXAMPLE00000000000000000"
}