Billing Attempt Failure - UNEXPECTED_ERROR: Failed to created Order

We’ve recently seen an increase in this error code for some of our merchants and since there’s no description or indication of what was wrong I’m not sure how we’re supposed to inform the merchant or customer how to correct the problem. We’ve seen it occur multiple times in a row on multiple subscriptions. We’ve noticed sometimes that there are patterns like the subscriptions might have the same discount code but nothing seems to be 100% consistent.

What’s the recommendation when a subscription’s billing attempts fail repeatedly with this error?

Here’s a couple example billing attempts from the same subscription:

[
	{
		"node": {
			"createdAt": "2023-12-14T15:00:20Z",
			"id": "gid://shopify/SubscriptionBillingAttempt/44676153523",
			"completedAt": "2023-12-14T15:00:27Z",
			"errorMessage": "Failed to create order.",
			"errorCode": "UNEXPECTED_ERROR",
			"ready": true,
			"nextActionUrl": null,
			"order": null
		}
	},
	{
		"node": {
			"createdAt": "2023-12-10T15:00:25Z",
			"id": "gid://shopify/SubscriptionBillingAttempt/44277366963",
			"completedAt": "2023-12-10T15:00:31Z",
			"errorMessage": "Failed to create order.",
			"errorCode": "UNEXPECTED_ERROR",
			"ready": true,
			"nextActionUrl": null,
			"order": null
		}
	}
]

Any guidance on this would be appreciated : )

Hi Brian - I’ve reached out to our API team on this, are there any other error codes or response IDs that are being returned that would help with troubleshooting this?

Hi @Liam - unfortunately there’s nothing else. Thanks for the quick help here!

From taking to our internal dev team, they’ve recommended to reach out to support to be able to look in to the customer, order and any logs specific to the request. That error kind of seems like it may be a catch-all for anything not available in the other responses.

Hope this helps,