What's your biggest current challenge? Have your say in Community Polls along the right column.
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.

ShopifyAPI ApplicationCharge Bad Request

ShopifyAPI ApplicationCharge Bad Request

soona_gus
Shopify Partner
2 0 0

Hi all! Recently we've seen a few errors with our app when attempting to use the ShopifyAPI on version

2023-07 to make an Application Charge. We are running

 

 

ShopifyAPI::Auth::Session.temp(shop: shop_domain, access_token: access_token) do
    charge = ShopifyAPI::ApplicationCharge.new
    charge.name = name
    charge.price = price
    charge.return_url = return_url
    charge.save!
    charge
end

 

 

Sometimes the `charge.save!` throws

 

 

JSON::ParserError
Empty input (after ) at line 1, column 1 [parse.c:1081] in 'Bad Request

 

 

To me this looks like the response we're getting is a Bad Request error, however I have no idea how that could be generated. If the price were under $0.5 we'd be getting a 500, if the access token no longer worked or the domain were wrong I don't think we'd get a Bad Request response either. Would love some help on this, since everything works locally and the docs make me think we're not doing anything crazy.

Replies 0 (0)