允许应用重复向商店收费-appSubscriptionCreate mutation
允许应用重复向商店收取功能或服务费用。
在本页面
互动范例
这是一个示例变异查询。使用下面的嵌入式交互式工具来编辑查询。
mutation appSubscriptionCreate($name: String!, $lineItems: [AppSubscriptionLineItemInput!]!, $returnUrl: URL!) { appSubscriptionCreate(name: $name, lineItems: $lineItems, returnUrl: $returnUrl) {} }
<font style="color:#1F61A0;">appSubscription</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">id</font>
<font style="color:#555555;">}</font>
<font style="color:#1F61A0;">confirmationUrl</font>
<font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">field</font>
<font style="color:#1F61A0;">message</font>
<font style="color:#555555;">}</font>
变量:
{ “name”: “placeholder”, “lineItems”: [], “returnUrl”: “placeholder” }
<font style="color:#555555;">{</font>
<font style="color:#8B2BB9;">"plan"</font><font style="color:#555555;">:</font> <font style="color:#555555;">{}</font>
<font style="color:#555555;">}</font>
参数
AppSubscriptionLineItemInput字段
- plan(
[AppPlanInput!](https://shopify.dev/docs/admin-api/graphql/reference/billing/appplaninput)
) 必需的
定义应用程序订阅的定价模型。
返回字段
- appSubscription(
[AppSubscription](https://shopify.dev/docs/admin-api/graphql/reference/billing/appsubscription)
)
新创建的应用订阅。 - ConfirmationUrl(
[URL](https://shopify.dev/docs/admin-api/graphql/reference/scalar#url-2021-01)
)
商家批准或拒绝应用订阅的网址。 - userErrors(
[[UserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/usererror)
)
执行突变时发生的错误列表。