Developer changelog

Subscribe to the changelog to stay up to date on recent changes to Shopify’s APIs and other developer products, as well as preview upcoming features and beta releases.

Get updates by RSS

Idempotent creation of AppUsageRecord


In the Admin GraphQL API version 2023-04, appUsageRecordCreate now supports an optional parameter idempotencyKey which ensures the merchant will not be charged twice. When idempotencyKey is provided, the mutation will return the same response as any previous appUsageRecordCreate mutations with identical idempotencyKey for the intended shop and requesting app, rather than creating a new record and charging the merchant again.

This means that an idempotencyKey could be reused by an app to create appUsageRecords on different shops to charge the merchant. Different apps can also use the same idempotencyKey on the same shop and still charge the shop. But we recommend a UUID.

The appUsageRecordCreate will behave like past API versions when idempotencyKey is not provided and create a new record on every mutation.