Skip to main content
GET
/
v1
/
setup_intents
/
{id}
Get Setup Intent
curl --request GET \
  --url https://api.withflex.com/v1/setup_intents/{id} \
  --header 'Authorization: Bearer <token>'
{
  "subscription": "string",
  "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.

Path Parameters

id
string
required
Example:

"obj_01EXAMPLE00000000000000000"

Query Parameters

limit
integer<int32> | null

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

Example:

10

offset
integer<int32> | null

Number of objects to skip before returning results.

Example:

0

customer
string | null

Filter by customer ID.

Example:

"obj_01EXAMPLE00000000000000000"

starting_after
string | null

A cursor for use in pagination. starting_after is a setup intent ID that defines your place in the list. For instance, if you make a list request and receive 20 setup intents, ending with fsi_xyz, your subsequent call can include starting_after=fsi_xyz to fetch the next page.

Example:

"obj_01EXAMPLE00000000000000000"

ending_before
string | null

A cursor for use in pagination. ending_before is a setup intent ID that defines your place in the list. For instance, if you make a list request and receive 20 setup intents, starting with fsi_abc, your subsequent call can include ending_before=fsi_abc to fetch the previous page.

Example:

"obj_01EXAMPLE00000000000000000"

expand
string
default:""

Comma-separated list of fields to expand (e.g., "subscription").

Example:

""

Response

Success

SetupIntent response with expandable subscription (for GET endpoint)

setup_intent_id
string
required

The unique identifier for the object.

Example:

"obj_01EXAMPLE00000000000000000"

partner_id
string
required

The ID of the Partner associated with this SetupIntent

Example:

"obj_01EXAMPLE00000000000000000"

created_at
string
required

Time at which the object was created. ISO 8601 format.

Example:

"2024-01-01T00:00:00Z"

test_mode
boolean
required

Whether or not the setup intent is in test mode.

Example:

false

status
enum<string>
required

Status of the SetupIntent. One of requires_payment_method, requires_confirmation, requires_action, processing, succeeded, or canceled.

Available options:
requires_payment_method,
requires_confirmation,
requires_action,
processing,
succeeded,
canceled
Example:

"requires_payment_method"

usage
enum<string>
required

Indicates how the payment method is intended to be used in the future.

Available options:
off_session,
on_session
Example:

"off_session"

subscription
string | null

The subscription this SetupIntent is associated with (expandable).

Example:

"string"

client_secret
string | null
customer

The ID of the Customer this SetupIntent belongs to.

Example:

"string"

description
string | null

An arbitrary string attached to the setup intent.

Example:

"string"

payment_method
string | null

Payment method used with this SetupIntent.

metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

Example:
{}
subscription_id
string | null

The ID of the Subscription this SetupIntent is associated with (for payment method updates).

Example:

"obj_01EXAMPLE00000000000000000"