App Usage Record
Requires The staff member must have permission to manage app billing or approve app charges if authenticated with an online access token as described in https://shopify.dev/apps/auth/oauth/access-modes.
Store usage for app subscriptions with usage pricing.
Anchor to FieldsFields
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the usage record was created.
- Anchor to descriptiondescription•String!non-null
The description of the app usage record.
- •ID!non-null
A globally-unique ID.
- Anchor to idempotencyKeyidempotency•String
Key A unique key generated by the client to avoid duplicate charges.
- Anchor to priceprice•Money
V2! non-null The price of the usage record.
- Anchor to subscriptionLineItemsubscription•App
Line Item Subscription Line Item! non-null Defines the usage pricing plan the merchant is subscribed to.
Anchor to MutationsMutations
- •mutation
Creates a usage charge for an app subscription with usage-based pricing. The charge counts toward the capped amount limit set when creating the subscription.
Usage records track consumption of app features or services on a per-use basis. You provide the charge amount, a description of what you consumed, and the subscription line item ID. The optional
parameter prevents duplicate charges if you send the same request multiple times.If the new charge would cause total usage charges in the current billing interval to exceed the capped amount, then the mutation returns an error.
Learn more about creating usage-based subscriptions.
- Anchor to subscriptionLineItemIdsubscription•ID!
Line Item Id required The ID of the app subscription line item to create the usage record under. This app subscription line item must have a usage pricing plan.
- Anchor to priceprice•Money
Input! required The price of the app usage record.
- Anchor to descriptiondescription•String!required
The description of the app usage record.
- Anchor to idempotencyKeyidempotency•String
Key A unique key generated by the client to avoid duplicate charges. Maximum length of 255 characters.
Arguments