Sudden spike in "Failed to create usage charge" generic errors - unable to bill merchant

Highlighted
Shopify Partner
29 0 3

I am suddenly getting "Failed to create usage charge" errors for a particular merchant. It has been working fine before and nothing has changed.

Others have reported waiting until the next billing cycle (https://community.shopify.com/c/Shopify-APIs-SDKs/422-Error-Failed-to-create-usage-charge/m-p/616997...)

But I have a lot of fees to be invoiced and waiting 2 weeks is not a good solution.

 

I am using GraphQL so I am sorry, I do not have Request IDs, but here are some details:

 

Mutation: appUsageRecordCreate

Variables

{ "subscriptionLineItemId": "gid://shopify/AppSubscriptionLineItem/13102743618?v=1&index=1", "amount": "0.75", "description": "$0.25 per ticket sold (3x July 16, 2020 03:00 PM #535318)" }

 

Example times (in PST -7)

Screen Shot 2020-07-10 at 6.56.55 AM.png

 

Thanks for any help.

 

 

0 Likes
Highlighted
Shopify Partner
6 0 1

We are seeing the same problem

0 Likes
Highlighted
Shopify Staff
Shopify Staff
619 76 139

Hey @jineshshah36 @Jeff-Blake,

Thanks for bringing this up. Our developers were able to identify and push a fix for an issue causing usage charge updates to fail, please try those updates again and they should work as expected.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
Shopify Partner
6 0 1

Hey @_JB we are still getting the same error, is there a way we can provide additional details so we can get this resolved?

0 Likes
Highlighted

@_JB -- I am seeing this same error.  I am able to create the subscription plan with recurring amount and usage charge.  

 

{
    "data": {
        "appSubscriptionCreate": {
            "userErrors": [],
            "confirmationUrl": "https://chakrastonecandles-com.myshopify.com/admin/charges/17587798171/confirm_recurring_application_charge?signature=BAh7BzoHaWRsKwibgFAYBAA6EmF1dG9fYWN0aXZhdGVU--6df3bec7d9eee8c7dcf46a251311d9af4c2a4138",
            "appSubscription": {
                "id": "gid://shopify/AppSubscription/17587798171",
                "lineItems": [
                    {
                        "id": "gid://shopify/AppSubscriptionLineItem/17587798171?v=1&index=0",
                        "plan": {
                            "pricingDetails": {
                                "__typename": "AppRecurringPricing"
                            }
                        }
                    },
                    {
                        "id": "gid://shopify/AppSubscriptionLineItem/17587798171?v=1&index=1",
                        "plan": {
                            "pricingDetails": {
                                "__typename": "AppUsagePricing"
                            }
                        }
                    }
                ]
            }
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 13,
            "actualQueryCost": 13,
            "throttleStatus": {
                "maximumAvailable": 20000.0,
                "currentlyAvailable": 19987,
                "restoreRate": 1000.0
            }
        }
    }
}

 



When I try to update the recurring charge (the first item of the original response)

 

mutation { 
  appUsageRecordCreate(
    subscriptionLineItemId: "gid://shopify/AppSubscriptionLineItem/17587798171?v=1&index=0", 
    price: { amount: 499.00, currencyCode: USD }
    description: "Tier 2: $2M to $5M")
   {
    appUsageRecord {
      id
    }
    userErrors {
      field
      message
    }
  }
}

 


I receive the error: 

 

{
    "data": {
        "appUsageRecordCreate": {
            "appUsageRecord": null,
            "userErrors": [
                {
                    "field": [
                        "subscriptionLineItemId"
                    ],
                    "message": "Invalid id"
                }
            ]
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 10,
            "actualQueryCost": 10,
            "throttleStatus": {
                "maximumAvailable": 20000.0,
                "currentlyAvailable": 19990,
                "restoreRate": 1000.0
            }
        }
    }
}

 

 

Anything obvious that I'm doing something wrong?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
619 76 139

Apologies, it seems I was confusing this with a different issue.

@JoeRzep thanks for the examples, I've forwarded those to our developers who are investigating as we speak.

@jineshshah36 If you'd like to provide query examples, feel free to send me a DM or share them here.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted

Hi @_JB, I think I've figured it out.  I believe I was using the WRONG ID.  There were 2 "plans" in my subscription.  I believe I was calling the API with the ID of the subscription, not the usage charge ID.  Once I used the other ID it worked.

Not sure if this is the same issue for @jineshshah36 

1 Like
Highlighted
Shopify Partner
6 0 1

@JoeRzep not the same issue for us. @_JB, I sent you a follow-up over DM

1 Like