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

# Framer 权限

> 为付费客户解锁一个 Framer 模板重混链接。

<Info>
  Framer 权限为付费客户解锁一个 Framer 模板重混链接。您将模板上传到 Dodo Payments，附加权限到一个产品，客户会收到一个重混链接，允许他们将模板克隆到自己的 Framer 账户中。
</Info>

## 配送内容

* 您上传的 Framer 模板的唯一重混链接。
* 客户点击链接，将模板重混到他们自己的 Framer 工作区中。
* 取消或退款时，重混链接将失效。

常见用例包括付费 Framer 登陆页模板、组合包和组件库。

## 连接 Framer

首次创建模板权限时，将自动连接 Framer。无需单独的 OAuth 步骤。

<Steps>
  <Step title="Open Entitlements">
    在您的 Dodo Payments 仪表板中，前往 **Entitlements** 并点击 **+**。
  </Step>

  <Step title="Pick Framer">
    选择 **Framer Template** 作为集成。
  </Step>

  <Step title="Grab the remix link from Framer">
    打开您的 Framer 项目。从左上角菜单，前往 **File → Copy Remix Link**。这会产生一个公共重混 URL，允许任何人将项目克隆到他们自己的 Framer 账户中—这是 Dodo Payments 将共享给付费客户的链接。

    <Frame caption="Framer File menu: click Copy Remix Link to copy the template's remix URL.">
      <img src="https://mintcdn.com/dodopayments/do-W-dMDGVB_xzr_/images/entitlements/framer/copy-remix-link.png?fit=max&auto=format&n=do-W-dMDGVB_xzr_&q=85&s=a0e1e4d5c9cc0a88ca5dbf059a4d2329" alt="Framer 文件菜单中突出显示复制重混链接选项" style={{ maxHeight: '500px', width: 'auto' }} width="906" height="1488" data-path="images/entitlements/framer/copy-remix-link.png" />
    </Frame>
  </Step>

  <Step title="Add the template and create the entitlement">
    返回 Dodo Payments 仪表板，从 **Template** 下拉菜单中选择模板。首次对新模板执行此操作时，粘贴您复制的重混链接以注册它。给权限一个 **name** 然后点击 **Create Entitlement**。

    <Frame>
      <img src="https://mintcdn.com/dodopayments/do-W-dMDGVB_xzr_/images/entitlements/framer/create.png?fit=max&auto=format&n=do-W-dMDGVB_xzr_&q=85&s=f3b5bfdb1092047e06f4eeba03d7bddf" alt="Framer 模板权限表单包含模板选择器和名称字段" style={{ maxHeight: '500px', width: 'auto' }} width="2000" height="1130" data-path="images/entitlements/framer/create.png" />
    </Frame>

    Dodo Payments 注册模板并返回一个 `framer_template_id`，您可以编程性引用。
  </Step>
</Steps>

## 客户流程

1. 客户完成结账。
2. Dodo Payments 创建一个 `pending` 授权并颁发一个绑定到该客户的唯一重混链接。
3. 授权转换为 `delivered` 一旦重混链接配置完成，链接将包含在客户的电子邮件和门户中。
4. 客户点击链接，登录 Framer，并重混模板。
5. 在撤销时，重混链接将失效。在客户的 Framer 账户中已经重混的副本将保留，因为 Framer 不提供撤销它们的方法。

## 所需配置

| 字段                   | 必需 | 描述             |
| -------------------- | -- | -------------- |
| `framer_template_id` | 是  | 上传模板时返回的模板 ID。 |

## 通过 API 创建

<CodeGroup>
  ```typescript TypeScript theme={null} theme={null}
  const entitlement = await client.entitlements.create({
    name: 'Portfolio Kit',
    integration_type: 'framer',
    integration_config: {
      framer_template_id: 'tmpl_abc123',
    },
  });
  ```

  ```python Python theme={null} theme={null}
  client.entitlements.create(
      name="Portfolio Kit",
      integration_type="framer",
      integration_config={"framer_template_id": "tmpl_abc123"},
  )
  ```

  ```go Go theme={null} theme={null}
  client.Entitlements.New(ctx, dodopayments.EntitlementNewParams{
    Name:            dodopayments.F("Portfolio Kit"),
    IntegrationType: dodopayments.F(dodopayments.EntitlementIntegrationTypeFramer),
    IntegrationConfig: dodopayments.F[dodopayments.IntegrationConfigUnionParam](
      dodopayments.IntegrationConfigFramerConfigParam{
        FramerTemplateID: dodopayments.F("tmpl_abc123"),
      },
    ),
  })
  ```
</CodeGroup>

## Webhooks

查看 [`entitlement_grant.*` webhook 事件](/developer-resources/webhooks/intents/entitlement-grant)。Framer 授权到达 `pending` 并在重混链接配置完成后转换为 `delivered`。

## 故障排除

<AccordionGroup>
  <Accordion title="Customer's remix link doesn't work">
    重混链接是单次使用并绑定到客户。如果他们在重混之前清除了链接，撤销授权并重新颁发。
  </Accordion>

  <Accordion title="Refunded customer still has a remixed copy">
    这是预期行为。Framer 将已克隆的项目视为客户自己的项目；Dodo Payments 使原始链接失效，但无法删除客户账户中的副本。
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="Customer's remix link doesn't work">
    The remix link is single-use and tied to the customer. If they cleared the link before remixing, revoke the grant and reissue.
  </Accordion>

  <Accordion title="Refunded customer still has a remixed copy">
    This is expected. Framer treats a remix as the customer's own project once it's cloned; Dodo Payments invalidates the original link but cannot delete copies in the customer's account.
  </Accordion>
</AccordionGroup>
