Idempotent creation of AppUsageRecord
API
Effective March 10, 2023
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 appUsageRecord
s 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.