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>'
{
  "setup_intent_id": "<string>",
  "partner_id": "<string>",
  "created_at": "<string>",
  "test_mode": true,
  "status": "requires_payment_method",
  "usage": "off_session",
  "subscription": {
    "subscription_id": "<string>",
    "created_at": "<string>",
    "items": [
      {
        "subscription_item_id": "<string>",
        "price": {
          "price_id": "<string>",
          "unit_amount": 123,
          "active": true,
          "product": {
            "product_id": "<string>",
            "name": "<string>",
            "created_at": "<string>",
            "active": true,
            "hsa_fsa_eligibility": "not_eligible",
            "test_mode": true,
            "description": "<string>",
            "document_description": "<string>",
            "visit_type": "cbtSleep",
            "upc_code": "<string>",
            "gtin": "<string>",
            "reference_gtin": "<string>",
            "metadata": {},
            "url": "<string>"
          },
          "created_at": "<string>",
          "type": "one_time",
          "test_mode": true,
          "description": "<string>",
          "trial_period_days": 123,
          "recurring": {
            "interval": "daily",
            "interval_count": 1,
            "trial_period_days": 1
          },
          "metadata": {},
          "hsa_fsa_eligibility": "not_eligible"
        },
        "quantity": 123,
        "created_at": "<string>",
        "test_mode": true,
        "updated_at": "<string>"
      }
    ],
    "status": "incomplete",
    "cancel_at_period_end": true,
    "test_mode": true,
    "latest_invoice": {
      "invoice_id": "<string>",
      "total": 123,
      "amount_due": 123,
      "amount_paid": 123,
      "status": "draft",
      "collection_method": "charge_automatically",
      "test_mode": true,
      "created_at": "<string>",
      "payment_intent": {
        "payment_intent_id": "<string>",
        "amount": 123,
        "status": "canceled",
        "created_at": "<string>",
        "capture_method": "automatic",
        "test_mode": true,
        "amount_capturable": 123,
        "amount_received": 123,
        "application_fee_amount": 123,
        "customer": {
          "customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
          "first_name": "John",
          "last_name": "Doe",
          "email": "joh.doe@example.com",
          "created_at": "<string>",
          "test_mode": true,
          "phone": "+15555555555",
          "employer": "Flex",
          "shipping": {
            "shipping_address_id": "<string>",
            "line1": "<string>",
            "line2": "<string>",
            "city": "<string>",
            "state": "<string>",
            "postal_code": "<string>",
            "country": "<string>"
          },
          "metadata": {}
        },
        "transfer_data": {
          "destination": "<string>",
          "amount": 123
        },
        "latest_charge": "<string>",
        "invoice": "<unknown>",
        "client_secret": "<string>",
        "metadata": {},
        "payment_method": {
          "payment_method_id": "<string>",
          "billing_details": {
            "address": {
              "line1": "<string>",
              "line2": "<string>",
              "city": "<string>",
              "state": "<string>",
              "postal_code": "<string>",
              "country": "<string>"
            },
            "email": "<string>",
            "name": "<string>",
            "phone": "<string>"
          },
          "customer": {
            "customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
            "first_name": "John",
            "last_name": "Doe",
            "email": "joh.doe@example.com",
            "created_at": "<string>",
            "test_mode": true,
            "phone": "+15555555555",
            "employer": "Flex",
            "shipping": {
              "shipping_address_id": "<string>",
              "line1": "<string>",
              "line2": "<string>",
              "city": "<string>",
              "state": "<string>",
              "postal_code": "<string>",
              "country": "<string>"
            },
            "metadata": {}
          },
          "card": {
            "brand": "american_express",
            "country": "<string>",
            "exp_month": 123,
            "exp_year": 123,
            "fingerprint": "<string>",
            "funding": "credit",
            "last4": "<string>"
          },
          "created_at": "<string>",
          "test_mode": true,
          "off_session": true,
          "metadata": {}
        },
        "transfer_group": "<string>",
        "payment_card_type": "<unknown>",
        "letter_fee_amount": 123,
        "transaction_fee": 123
      },
      "charge": "<string>",
      "customer": {
        "customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
        "first_name": "John",
        "last_name": "Doe",
        "email": "joh.doe@example.com",
        "created_at": "<string>",
        "test_mode": true,
        "phone": "+15555555555",
        "employer": "Flex",
        "shipping": {
          "shipping_address_id": "<string>",
          "line1": "<string>",
          "line2": "<string>",
          "city": "<string>",
          "state": "<string>",
          "postal_code": "<string>",
          "country": "<string>"
        },
        "metadata": {}
      },
      "period_end": "<string>",
      "period_start": "<string>",
      "subscription": "<unknown>",
      "metadata": {}
    },
    "customer": {
      "customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
      "first_name": "John",
      "last_name": "Doe",
      "email": "joh.doe@example.com",
      "created_at": "<string>",
      "test_mode": true,
      "phone": "+15555555555",
      "employer": "Flex",
      "shipping": {
        "shipping_address_id": "<string>",
        "line1": "<string>",
        "line2": "<string>",
        "city": "<string>",
        "state": "<string>",
        "postal_code": "<string>",
        "country": "<string>"
      },
      "metadata": {}
    },
    "current_period_end": "<string>",
    "current_period_start": "<string>",
    "metadata": {},
    "client_secret": {
      "setup_secret": "<string>",
      "payment_secret": "<string>"
    },
    "proration_behavior": "always_invoice",
    "trial_start": "<string>",
    "trial_end": "<string>",
    "cancel_at": "<string>",
    "default_payment_method": {
      "payment_method_id": "<string>",
      "billing_details": {
        "address": {
          "line1": "<string>",
          "line2": "<string>",
          "city": "<string>",
          "state": "<string>",
          "postal_code": "<string>",
          "country": "<string>"
        },
        "email": "<string>",
        "name": "<string>",
        "phone": "<string>"
      },
      "customer": {
        "customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
        "first_name": "John",
        "last_name": "Doe",
        "email": "joh.doe@example.com",
        "created_at": "<string>",
        "test_mode": true,
        "phone": "+15555555555",
        "employer": "Flex",
        "shipping": {
          "shipping_address_id": "<string>",
          "line1": "<string>",
          "line2": "<string>",
          "city": "<string>",
          "state": "<string>",
          "postal_code": "<string>",
          "country": "<string>"
        },
        "metadata": {}
      },
      "card": {
        "brand": "american_express",
        "country": "<string>",
        "exp_month": 123,
        "exp_year": 123,
        "fingerprint": "<string>",
        "funding": "credit",
        "last4": "<string>"
      },
      "created_at": "<string>",
      "test_mode": true,
      "off_session": true,
      "metadata": {}
    }
  },
  "client_secret": "<string>",
  "customer": {
    "customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
    "first_name": "John",
    "last_name": "Doe",
    "email": "joh.doe@example.com",
    "created_at": "<string>",
    "test_mode": true,
    "phone": "+15555555555",
    "employer": "Flex",
    "shipping": {
      "shipping_address_id": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postal_code": "<string>",
      "country": "<string>"
    },
    "metadata": {}
  },
  "description": "<string>",
  "payment_method": "<string>",
  "metadata": {},
  "subscription_id": "<string>"
}

Authorizations

Authorization
string
header
required

Use a Bearer token to access this API.

Query Parameters

limit
integer<int32> | null
offset
integer<int32> | null
customer
string | null
starting_after
string | null
ending_before
string | null
expand
string
default:""

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

Response

SetupIntent response with expandable subscription (for GET endpoint)

setup_intent_id
string
required

The unique identifier for the object.

partner_id
string
required

The ID of the Partner associated with this SetupIntent

created_at
string
required

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

test_mode
boolean
required

Whether or not the setup intent is in test mode.

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
usage
enum<string>
required

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

Available options:
off_session,
on_session
subscription
object

The subscription this SetupIntent is associated with (expandable).

client_secret
string | null
customer
object

The ID of the Customer this SetupIntent belongs to.

description
string | null

An arbitrary string attached to the setup intent.

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.

subscription_id
string | null

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