A place to discuss charging merchants for your apps and services using the billing API.
Hi all! Recently we've seen a few errors with our app when attempting to use the ShopifyAPI on version
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.