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

# AdsAgreementElement

> 계정의 Whop Ads 서비스 및 결제 승인 계약에 서명합니다. 계정의 광고비 청구 정보를 저장하면 계약이 열리며, 권한 있는 대표자가 서명하기 전까지는 어떤 캠페인도 시작할 수 없습니다. 서명자는 전체 법적 이름과 선택적으로 직함을 입력하고 약관에 동의하며, 입력된 서명은 계약과 함께 보관됩니다. 서명이 완료되면 누가 언제 서명했는지 표시하고, 청구가 설정되기 전에는 서명할 것이 없다고 표시합니다. `campaign-creator`는 시작에 서명이 필요할 때 빌더 위에 이 엘리먼트를 자동으로 열므로, 설정 페이지나 온보딩 페이지처럼 미리 서명을 받으려는 경우에만 직접 마운트하세요.

> [!NOTE]
>
> 이 페이지는 `@whop/elements@1.10.0` 및 `@whop/elements-react@1.10.0`을 다룹니다.

*`v1.9.0`부터 사용 가능.*

[`Ads`](https://docs.whop.com/ko/elements/latest/ads/overview) 안에 마운트됩니다. `accountId`와 `accessToken`은 여기서 제공됩니다. props와 콜백은 create 옵션 또는 React props로 전달하세요.

> [!NOTE]
>
> 이 엘리먼트는 **인라인**(`create`)으로 마운트하거나 **모달** 오버레이(`createOverlay`)로 열 수 있습니다.

```tsx React theme={null}
import { WhopElements, Ads, AdsAgreementElement } from "@whop/elements-react";
import { loadWhop } from "@whop/elements";

function Example() {
  return (
    <WhopElements elements={loadWhop()}>
      <Ads /* options */>
        <AdsAgreementElement onSigned={(e) => console.log(e)} />
      </Ads>
    </WhopElements>
  );
}
```

```html JavaScript theme={null}
<script src="https://cdn.whop.com/elements/amber/elements.js" data-whop-elements></script>
<script type="module">
  const ads = window.WhopElements().ads.create({ /* options */ });
  ads.create('ads-agreement', { onSigned: (e) => console.log(e) }).mount('#ads-ads-agreement');
</script>
```

예시 데이터입니다. [플레이그라운드 열기](https://docs.whop.com/ko/elements/latest/ads/overview#playground).

## 속성(Props)

*이 엘리먼트는 소비자 props를 받지 않습니다.*

## 이벤트

콜백은 create 옵션 또는 React props로 전달하세요.

### `onSigned`

계약이 서명되고 기록되었습니다. `agreementVersion`은 서명된 버전이고, `acceptedAt`은 서명 시점을 나타내는 ISO 8601 타임스탬프입니다. 이 이벤트가 발생하면 모달이 닫힙니다.

**payload** `object`

**properties**

**agreementVersion** `string | null` *required*

**acceptedAt** `string | null` *required*

### `onLoaderStart`

로딩 스켈레톤이 처음 그려진 후, `onReady` 전에 실행됩니다.

### `onReady`

엘리먼트가 처음으로 완전히 그려진 후 실행됩니다.

### `onError`

엘리먼트가 로드에 실패하거나 충돌할 때 실행됩니다. 대체 화면은 계속 표시됩니다. 프로그래밍 방식 처리에는 `code`를 사용하세요. `sourceKey`는 실패한 호스트 상태 소스를 식별합니다.

**e** `object`

**properties**

**message** `string` *required*

**code** `string`

**sourceKey** `string`

## 메서드

`create`가 반환한 핸들에서 또는 React `ref`를 통해 호출하세요.

### `mount`

엘리먼트를 `target`에 마운트하고 로딩을 시작합니다. React 컴포넌트는 스스로 마운트됩니다.

**매개변수**

**target** `string | HTMLElement` *required*

### `destroy`

엘리먼트를 제거하고 프레임과 구독을 해제합니다. 여러 번 호출해도 됩니다. React는 엘리먼트를 자동으로 제거합니다.

### `update`

마운트된 엘리먼트에 새 props를 병합합니다. React에서는 대신 컴포넌트 props를 변경하세요.

**매개변수**

**options** `Partial\<AdsAgreementElementProps\>` *required*

## 스타일링

이 엘리먼트는 스타일링용 클래스 이름을 노출하지 않습니다. 스타일을 바꾸려면 `appearance`(테마, 강조 색상, 변수)를 사용하세요.


## Related topics

- [광고](https://docs.whop.com/ko/elements/latest/ads/overview.md)
- [CampaignCreatorElement](https://docs.whop.com/ko/elements/latest/ads/campaign-creator.md)
- [TableElement](https://docs.whop.com/ko/elements/latest/ads/reporting-table.md)
