> ## 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.

# Apple Pay 및 Google Pay 활성화

> Apple Pay 인증 파일을 호스팅하고 도메인을 등록하여 사이트의 Whop Elements에서 Apple Pay와 Google Pay가 작동하도록 하세요.

Apple Pay와 Google Pay를 사용하면 고객이 기기에 이미 있는 지갑으로 결제할 수 있습니다. [Whop Elements](https://docs.whop.com/ko/elements/latest/getting-started.md) 체크아웃 또는 결제 요소가 자체 사이트에서 렌더링될 때, 두 지갑 모두 해당 페이지의 도메인에서 Apple Pay가 준비되어 있어야 합니다. Apple Pay가 준비된 도메인 하나로 해당 페이지의 모든 요소에서 두 지갑을 모두 사용할 수 있습니다.

> [!NOTE]
>
> 도메인 인증은 직접 호스팅하는 페이지에만 필요합니다. Whop에서 호스팅하는
> 체크아웃 페이지와 whop.com은 이미 승인되어 있습니다.

## 사전 요구 사항

Apple Pay를 설정하기 전에 다음을 확인하세요.

* Whop Elements를 마운트할 도메인
* 해당 도메인에 파일을 호스팅할 수 있는 권한(Apple Pay 인증 파일 제공용)

## 자체 호스팅 인증

도메인을 인증하려면 도메인의 특정 경로에서 Apple Pay merchant ID 도메인 연결 파일을 제공한 다음 Whop에 도메인을 등록하세요.

### 1단계: 인증 파일 다운로드

[Apple Pay 인증 파일](https://whop.com/.well-known/apple-platform-integrator/apple-developer-merchantid-domain-association)을 다운로드하세요.

### 2단계: 파일 호스팅

도메인의 다음 경로에 이 파일을 호스팅하세요.

```
https://<your-domain>/.well-known/apple-developer-merchantid-domain-association
```

파일은 다음 조건을 충족해야 합니다.

* HTTPS로 제공
* 인증 없이 접근 가능
* 올바른 내용으로 제공(수정 없음)

> [tab] Next.js
>
> `public` 폴더에 파일을 넣으세요.
>
> ```
> public/
> └── .well-known/
>     └── apple-developer-merchantid-domain-association
> ```

> [tab] Nginx
>
> 파일을 제공하는 location 블록을 추가하세요.
>
> ```nginx theme={null}
> location /.well-known/apple-developer-merchantid-domain-association {
>     alias /path/to/apple-developer-merchantid-domain-association;
>     default_type application/octet-stream;
> }
> ```

> [tab] Vercel
>
> whop.com에 호스팅된 파일로 프록시하는 rewrite 규칙이 포함된 `vercel.json`을 만드세요.
>
> ```json theme={null}
> {
>   "rewrites": [
>     {
>       "source": "/.well-known/apple-developer-merchantid-domain-association",
>       "destination": "https://whop.com/.well-known/apple-platform-integrator/apple-developer-merchantid-domain-association"
>     }
>   ]
> }
> ```

> [tab] Cloudflare Pages
>
> 출력 디렉터리에 파일을 넣으세요.
>
> ```
> dist/
> └── .well-known/
>     └── apple-developer-merchantid-domain-association
> ```

### 3단계: 파일 접근 확인

다음 주소를 방문하여 파일에 접근할 수 있는지 테스트하세요.

```
https://<your-domain>/.well-known/apple-developer-merchantid-domain-association
```

파일이 오류 없이 다운로드되거나 내용이 표시되어야 합니다.

### 4단계: 도메인 등록

대시보드 또는 API를 통해 도메인을 등록하세요. 어느 방법이든 Whop은 Apple에 도메인을 등록하기 전에 파일에 접근할 수 있는지 확인합니다.

> [tab] 대시보드
>
> 대시보드에서 **Websites**를 열고 도메인을 선택하세요. **Fix Apple Pay**를 선택하고 단계를 따른 다음 **Check now**를 선택하세요.

> [tab] API
>
> [Domains API](https://docs.whop.com/ko/api-reference/domains/domain)를 통해 Apple Pay와 함께 도메인을 추가하세요. 계정에 이미 도메인이 있다면 대신 `apple_pay: {}`로 [업데이트](https://docs.whop.com/ko/api-reference/domains/update-domain.md)하세요. API 키에 `domain:manage` 권한이 필요합니다.
>
> ```typescript TypeScript theme={null}
> import { WhopClient } from "@whop/sdk";
>
> const client = new WhopClient({ token: process.env.WHOP_API_KEY });
>
> const domain = await client.domains.create({
>   domain: "shop.example.com",
>   apple_pay: {},
> });
>
> console.log(domain.apple_pay?.state); // "pending" while Whop registers the domain with Apple
> ```
>
> ```python Python theme={null}
> import os
> from whop_sdk import Whop
>
> client = Whop(token=os.environ["WHOP_API_KEY"])
>
> domain = client.domains.create(domain="shop.example.com", apple_pay={})
>
> print(domain.apple_pay.state)  # "pending" while Whop registers the domain with Apple
> ```
>
> Whop은 백그라운드에서 Apple에 도메인을 등록합니다. `apple_pay.state`가 `ready`가 되거나, Apple이 파일을 가져올 수 없는 경우 `action_required`가 될 때까지 [도메인을 조회](https://docs.whop.com/ko/api-reference/domains/retrieve-domain.md)하세요. 파일을 호스팅한 후에는 [Check Domain](https://docs.whop.com/ko/api-reference/domains/check-domain.md)으로 `action_required` 도메인을 다시 등록하세요.
>
> ```typescript TypeScript theme={null}
> await client.domains.check({ id: domain.id });
> ```
>
> ```python Python theme={null}
> client.domains.check(id=domain.id)
> ```
>
> Domains API는 지원 중단된 Payment Method Domains API를 대체합니다. [API 변경 로그](https://docs.whop.com/ko/developer/api/versioning.md)에서 각 요청이 Domains API의 어떤 요청에 해당하는지 확인할 수 있습니다.

## 문제 해결

> [accordion] Apple Pay 또는 Google Pay 버튼이 표시되지 않음
>
> * 도메인이 **Payment domains**에서 인증됨으로 표시되는지, 또는 [Domains API](https://docs.whop.com/ko/api-reference/domains/retrieve-domain.md)에서 `apple_pay.state: "ready"`를 반환하는지 확인하세요.
> * [ExpressCheckoutElement](https://docs.whop.com/ko/elements/latest/checkout/expressCheckout.md)는 구매자의 기기에서 결제할 수 있는 지갑만 렌더링하며, 사용 가능한 지갑이 없으면 아무것도 렌더링하지 않습니다. Apple Pay는 시뮬레이터가 아닌 실제 Apple 기기의 Safari에서 테스트하세요.
> * **Framer**를 사용하는 경우 Embed 컴포넌트가 아닌 사이트 헤더의 Custom Code를 통해 Elements 스크립트를 로드하세요. Framer의 Embed 컴포넌트는 `srcdoc` iframe을 사용하는데, Safari는 이를 안전하지 않은 컨텍스트로 간주하여 Apple Pay를 차단합니다.

> [accordion] 자체 호스팅 파일이 404를 반환함
>
> * 파일이 올바른 위치에 있는지 확인하세요:
>   `/.well-known/apple-developer-merchantid-domain-association`.
> * 웹 서버가 확장자 없는 파일을 제공하는지 확인하세요.
> * 호스팅 구성이 `.well-known` 디렉터리를 차단하지 않는지 확인하세요.

## 다음 단계

> [card] [Express Checkout](https://docs.whop.com/ko/developer/guides/express-checkout.md)
>
> 사이트에 원클릭 Apple Pay 및 Google Pay 버튼을 추가하세요

> [card] [체크아웃 링크](https://docs.whop.com/ko/payments/create-checkout-link.md)
>
> 상품의 공유 가능한 체크아웃 링크를 만드세요


## Related topics

- [자체 버튼에서 지갑 시트 열기](https://docs.whop.com/ko/developer/guides/payment-request.md)
- [Express Checkout 추가하기](https://docs.whop.com/ko/developer/guides/express-checkout.md)
- [Elements 시작하기](https://docs.whop.com/ko/elements/latest/getting-started.md)
