> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# Setup Intent

> 설정 인텐트(Setup intent)를 사용하면 사용자가 즉시 구매하지 않고도 나중에 사용할 결제 수단을 저장할 수 있습니다.

> [!NOTE]
>
> 이 리소스에는 [Whop API](https://docs.whop.com/ko/api-reference/legacy/setup-intents/setup-intent.md)의 후속 리소스가 있습니다. 이 페이지는 계속 완전히 지원됩니다.

> [!NOTE]
>
> [Create setup intent](https://docs.whop.com/ko/api-reference/legacy/setup-intents/create-setup-intent.md)로 설정 인텐트를 생성하고, `mode: "setup"`으로 마운트된 [결제 요소](https://docs.whop.com/ko/elements/latest/payments/overview)의 확인 토큰 또는 재인증할 기존 결제 수단을 전달합니다. 설정 모드 [Checkout Configuration](https://docs.whop.com/ko/api-reference/checkout-configurations/create-a-checkout-configuration.md)은 구매자가 해당 체크아웃을 완료하면 설정 인텐트를 자동으로 생성합니다. 어느 방법이든 `setup_intent.succeeded` 웹훅을 수신하여 결제 수단이 저장되면 결제 수단 ID를 받으세요.
>
> 전체 흐름은 [결제 수단 저장](https://docs.whop.com/ko/developer/guides/save-payment-methods.md)을 참조하세요.

```typescript theme={null}
// Create a setup intent from a confirmation token the payment elements minted in setup mode
const setupIntent = await client.setupIntents.create({
	account_id: "biz_xxxxxxxxxxxxx",
	confirmation_token: "ctok_xxxxxxxxxxxxxx",
	return_url: "https://yoursite.com/billing/saved",
	metadata: { customer_id: "your_internal_id" },
});

// Hand setupIntent.client_secret to the elements' handleNextAction for any pending step,
// then listen for setup_intent.succeeded on your webhook handler.
```

```json Example theme={null}
{
	"checkout_configuration": {
		"id": "ch_xxxxxxxxxxxxxxx"
	},
	"company": {
		"id": "biz_xxxxxxxxxxxxxx"
	},
	"created_at": "2023-12-01T05:00:00.401Z",
	"error_message": "Your card was declined.",
	"id": "sint_xxxxxxxxxxxxx",
	"member": {
		"id": "<string>",
		"user": {
			"email": "<string>",
			"id": "<string>",
			"name": "<string>",
			"username": "<string>"
		}
	},
	"metadata": {},
	"payment_method": {
		"card": {
			"brand": "mastercard",
			"exp_month": 42,
			"exp_year": 42,
			"last4": "4242"
		},
		"created_at": "2023-12-01T05:00:00.401Z",
		"id": "payt_xxxxxxxxxxxxx",
		"mailing_address": {
			"city": "<string>",
			"country": "<string>",
			"line1": "<string>",
			"line2": "<string>",
			"name": "<string>",
			"postal_code": "<string>",
			"state": "<string>"
		},
		"payment_method_type": "acss_debit"
	},
	"status": "processing",
	"three_ds_verified": true
}
```

**checkout\_configuration** `object | null` *required*

이 설정 인텐트와 연결된 체크아웃 세션 구성입니다. 체크아웃 세션이 사용되지 않은 경우 Null입니다.

**하위 속성**

**id** `string` *required*

체크아웃 세션의 고유 식별자입니다.

예시: `ch_xxxxxxxxxxxxxxx`

**company** `object | null` *required*

이 설정 인텐트를 시작한 회사입니다. 회사가 삭제된 경우 Null입니다.

**하위 속성**

**id** `string` *required*

회사의 고유 식별자입니다.

예시: `biz_xxxxxxxxxxxxxx`

**created\_at** `string\<date-time\>` *required*

설정 인텐트가 생성된 일시입니다.

예시: `2023-12-01T05:00:00.401Z`

**error\_message** `string | null` *required*

설정 인텐트가 실패한 이유를 설명하는 사람이 읽을 수 있는 오류 메시지입니다. 오류가 발생하지 않은 경우 Null입니다.

예시: `Your card was declined.`

**id** `string` *required*

설정 인텐트의 고유 식별자입니다.

예시: `sint_xxxxxxxxxxxxx`

**member** `object | null` *required*

이 설정 인텐트와 연결된 회사 멤버입니다. 사용자가 멤버가 아닌 경우 Null입니다.

**하위 속성**

**id** `string` *required*

회사 멤버의 고유 식별자입니다.

**user** `object | null` *required*

이 멤버의 사용자입니다(있는 경우).

**하위 속성**

**email** `string | null` *required*

사용자의 디지털 메일 주소입니다.

**id** `string` *required*

회사 멤버 사용자의 고유 식별자입니다.

**name** `string | null` *required*

사용자의 전체 이름입니다.

**username** `string` *required*

Whop 사용자 이름입니다.

**metadata** `object | null` *required*

이 설정 인텐트에 첨부된 사용자 지정 키-값 쌍입니다. 메타데이터가 제공되지 않은 경우 Null입니다.

**payment\_method** `object | null` *required*

이 설정 인텐트로 생성된 저장된 결제 수단입니다. 설정이 성공적으로 완료되지 않은 경우 Null입니다.

**하위 속성**

**card** `object | null` *required*

결제 수단이 직불 카드 또는 신용카드인 경우 해당 카드 데이터입니다.

**하위 속성**

**brand** `CardBrands | null` *required*

카드 네트워크입니다(예: visa, mastercard, amex). 브랜드를 확인할 수 없는 경우 Null입니다.

사용 가능한 옵션: `mastercard`, `visa`, `amex`, `discover`, `unionpay`, `jcb`, `diners`, `link`, `troy`, `visadankort`, `visabancontact`, `china_union_pay`, `rupay`, `jcbrupay`, `elo`, `maestro`, `tarjeta_naranja`, `cirrus`, `nspk_mir`, `verve`, `ebt`, `private_label`, `local_brand`, `uatp`, `wexcard`, `uzcard`, `meeza`, `hrg_store_card`, `girocard`, `fuel_card`, `dankort`, `carnet`, `atm_card`, `china_union_payuzcard`, `codensa`, `cabal`, `hipercard`, `jcblankapay`, `cmi`, `aura`, `accel`, `culiance`, `nyce`, `pulse`, `star`, `eftpos`, `alelo`, `edenred`, `sodexo`, `unknown`

**exp\_month** `integer | null` *required*

카드의 두 자리 만료 월(1-12)입니다. 사용할 수 없는 경우 Null입니다.

예시: `42`

**exp\_year** `integer | null` *required*

카드의 두 자리 만료 연도입니다(예: 2027년의 경우 27). 사용할 수 없는 경우 Null입니다.

예시: `42`

**last4** `string | null` *required*

카드 번호의 마지막 네 자리입니다. 사용할 수 없는 경우 Null입니다.

예시: `4242`

**created\_at** `string\<date-time\>` *required*

결제 토큰이 생성된 일시입니다.

예시: `2023-12-01T05:00:00.401Z`

**id** `string` *required*

결제 토큰의 고유 식별자입니다.

예시: `payt_xxxxxxxxxxxxx`

**mailing\_address** `object | null` *required*

결제 수단 사용자와 연결된 메일 주소입니다

**하위 속성**

**city** `string | null` *required*

주소의 도시입니다.

**country** `string | null` *required*

주소의 국가입니다.

**line1** `string | null` *required*

주소의 첫 번째 줄입니다.

**line2** `string | null` *required*

주소의 두 번째 줄입니다.

**name** `string | null` *required*

고객의 이름입니다.

**postal\_code** `string | null` *required*

주소의 우편번호입니다.

**state** `string | null` *required*

주소의 주(州)입니다.

**payment\_method\_type** `PaymentMethodTypes` *required*

결제 수단의 결제 수단 유형입니다

사용 가능한 옵션: `acss_debit`, `addi`, `affirm`, `afterpay_clearpay`, `alipay`, `alipayhk`, `alma`, `amazon_pay`, `apple`, `apple_pay`, `au_bank_transfer`, `au_becs_debit`, `bacs_debit`, `bancolombia`, `bancontact`, `bank_wire`, `billie`, `blik`, `boleto`, `bre_b`, `ca_bank_transfer`, `capchase_pay`, `card`, `card_present`, `card_installments_three`, `card_installments_six`, `card_installments_twelve`, `cashapp`, `claritypay`, `coinbase`, `crypto`, `crypto_subscription`, `custom`, `customer_balance`, `demo_pay`, `duitnow_qr`, `efecty`, `eps`, `eu_bank_transfer`, `fpx`, `flex_pay`, `gb_bank_transfer`, `gcash`, `giropay`, `google_pay`, `gopay`, `grabpay`, `id_bank_transfer`, `ideal`, `interac`, `international_bank_wire`, `kakao_pay`, `klarna`, `klarna_pay_now`, `konbini`, `kr_card`, `kr_market`, `kriya`, `kueski`, `link`, `mb_way`, `m_pesa`, `mercado_pago`, `mercado_pago_ar`, `mercado_pago_mx`, `mobilepay`, `modo`, `mondu`, `multibanco`, `naver_pay`, `nequi`, `netbanking`, `ng_bank`, `ng_bank_transfer`, `ng_card`, `ng_market`, `ng_ussd`, `ng_wallet`, `nupay`, `nz_bank_account`, `oney`, `oney_3x`, `oney_4x`, `opay`, `oxxo`, `p24`, `pago_efectivo`, `pse`, `pay_by_bank`, `payco`, `paynow`, `paypal`, `paypal_express`, `paypay`, `payto`, `payto_email`, `payto_phone`, `payto_bank_account`, `pix`, `pix_automatico`, `platform_balance`, `promptpay`, `qris`, `rapipago`, `rechnung`, `revolut_pay`, `samsung_pay`, `satispay`, `scalapay`, `sencillito`, `sepa_debit`, `sequra`, `servipag`, `sezzle`, `shop_pay`, `shopeepay`, `sofort`, `south_korea_market`, `spei`, `splitit`, `sunbit`, `swish`, `tabby`, `tamara`, `touch_n_go`, `twint`, `upi`, `us_bank_account`, `us_bank_transfer`, `venmo`, `verve`, `vipps`, `webpay`, `wechat_pay`, `whop_pay`, `yape`, `zip`, `coinflow`, `unknown`

**status** `SetupIntentStatuses` *required*

설정 인텐트의 현재 상태입니다.

사용 가능한 옵션: `processing`, `succeeded`, `canceled`, `requires_action`

**three\_ds\_verified** `boolean` *required*

이 결제 수단을 설정할 때 3D Secure 인증이 완료되었는지 여부입니다.


## Related topics

- [Whop CLI 명령](https://docs.whop.com/ko/cli/commands.md)
- [Setup Intents API](https://docs.whop.com/ko/api-reference/setup-intents/setup-intent.md)
- [Retrieve Setup Intent](https://docs.whop.com/ko/api-reference/setup-intents/retrieve-setup-intent.md)
