Skip to main content
GET
/
setup_intents
/
{id}
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  apiKey: 'My API Key',
});

const setupIntent = await client.setupIntents.retrieve('sint_xxxxxxxxxxxxx');

console.log(setupIntent.id);
{
  "id": "sint_xxxxxxxxxxxxx",
  "status": "processing",
  "created_at": "2023-12-01T05:00:00.401Z",
  "error_message": "<string>",
  "company": {
    "id": "biz_xxxxxxxxxxxxxx"
  },
  "checkout_configuration": {
    "id": "ch_xxxxxxxxxxxxxxx"
  },
  "member": {
    "id": "<string>",
    "user": {
      "id": "<string>",
      "email": "<string>",
      "name": "<string>",
      "username": "<string>"
    }
  },
  "payment_method": {
    "id": "payt_xxxxxxxxxxxxx",
    "created_at": "2023-12-01T05:00:00.401Z",
    "payment_method_type": "acss_debit",
    "card": {
      "brand": "mastercard",
      "last4": "<string>",
      "exp_month": 42,
      "exp_year": 42
    }
  },
  "metadata": {}
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Path Parameters

id
string
required

The ID of the Setup Intent

Example:

"sint_xxxxxxxxxxxxx"

Response

A successful response

An object representing a setup intent, which is a flow for allowing a customer to add a payment method to their account without making a purchase.

id
string
required

The setup intent ID

Example:

"sint_xxxxxxxxxxxxx"

status
enum<string>
required

The status of the setup intent

Available options:
processing,
succeeded,
canceled,
requires_action
created_at
string<date-time>
required

The datetime the payment was created

Example:

"2023-12-01T05:00:00.401Z"

error_message
string | null
required

The error message, if any.

company
object
required

The company of the setup intent

checkout_configuration
object
required

The checkout configuration associated with the setup intent

member
object
required

The member connected to the setup intent

payment_method
object
required

The payment method created during the setup, if available.

metadata
object
required

The metadata associated with the setup intent