Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Increased Failures in creating Usage Records

Increased Failures in creating Usage Records

Brian_S
Shopify Partner
171 21 44

Hi there!

 

We've been seeing a steady increase in the number of usage record creation failures over the last 3 or 4 weeks. For some reason there are times when we can't create a usage record with a given idempotencyKey, price and description no matter how many times we try.  The result is the same:

 

{
	"data": {
		"appUsageRecordCreate": {
			"userErrors": [
				{
					"field": null,
					"message": "Failed to create usage charge",
					"__typename": "UserError"
				}
			],
			"appUsageRecord": null
		}
	}
}

 

 

Not a very helpful error message bc it's not clear what we've done wrong here. 

 

If we change the `idempotencyKey` then it works but that means we can't rely on that input to be sure we're not creating a usage record for the same action/event by our customers, which is important to us (we don't want to overcharge customers).

 

Could you help me understand why this is happening? Here's a couple example `x-request-id`s: 

b75580ca-8deb-455a-9db8-934f0030ff46

430d7a95-55b0-494a-bd91-fae4b384bf8d

 

 

Thanks in advance!

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic
Reply 1 (1)

SBD_
Shopify Staff
1831 273 423

Hey @Brian_S 

 

Thanks for flagging this. Checking with the team and will report back.

Scott | Developer Advocate @ Shopify