Issues with Shopify subscription API

Hello Shopify Support Team!We ran into a problem when integrating subscription functionality into our Shopify app. When trying to make certain API requests, we encounter unexpected errors that have not been seen before.Example of a request to create a subscription:
POST /admin/api/2023-04/recurring_application_charges.json
{
“recurring_application_charge”: {
“name”: “Starter”,
“price”: 19.0,
“return_url”: "https://ab96-146-158-58-33.ngrok-free.app/confirm_subscription ",
“trial_days”:5
}
}
Server response: 500 Internal Server Error

Hey @toju

Are you able to run this again and capture the request ID from the response headers? This will let us take a look at the logs on this end.

Yes let me get this for you

Hello Shopify Support Team!

I provide you with examples of requests along with their ID.
I hope for a speedy solution to this problem.


GET /admin/api/2023-07/application_charges.json HTTP/1.1
Host: recharge-test-store-afonin.myshopify.com

Status: 406 Not Acceptable
X-Request-ID: 5b50c2c1-ed9f-4965-beee-af86994df021

GET /admin/api/2023-07/recurring_application_charges.json HTTP/1.1
Host: recharge-test-store-afonin.myshopify.com

Status: 404 Not Found
X-Request-ID: f38e5b7c-7bd2-4b18-9075-b332b946388a

POST /admin/api/2023-07/recurring_application_charges.json HTTP/1.1
Host: recharge-test-store-afonin.myshopify.com
Content-Type: application/json
Content-Length: 210

{
“recurring_application_charge”: {
“name”: “Starter”,
“price”: 19.0,
“return_url”: “https://ab96-146-158-58-33.ngrok-free.app/confirm_subscription”,
“trial_days”: 5
}
}

Status: 400 Bad Request
X-Request-ID: d8188fa5-151e-4d6e-ac32-c65721a8292e


Hi Matt issue is with shopify billing api (subscription) not third party subscription app. thanks

Thanks!


GET /admin/api/2023-07/application_charges.json HTTP/1.1
Host: recharge-test-store-afonin.myshopify.com
Status: 406 Not Acceptable
X-Request-ID: 5b50c2c1-ed9f-4965-beee-af86994df021

This one is coming through with HTTP method PATCH, this endpoint only accepts GET & POST requests.


GET /admin/api/2023-07/recurring_application_charges.json HTTP/1.1
Host: recharge-test-store-afonin.myshopify.com
Status: 404 Not Found
X-Request-ID: f38e5b7c-7bd2-4b18-9075-b332b946388a

This one is hitting /admin/api/2023-07/recurring_application_charges**..**json (notice the two periods).


POST /admin/api/2023-07/recurring_application_charges.json HTTP/1.1
Host: recharge-test-store-afonin.myshopify.com
Content-Type: application/json
Content-Length: 210

{
“recurring_application_charge”: {
“name”: “Starter”,
“price”: 19.0,
“return_url”: “https://ab96-146-158-58-33.ngrok-free.app/confirm_subscription”,
“trial_days”: 5
}
}

Status: 400 Bad Request
X-Request-ID: d8188fa5-151e-4d6e-ac32-c65721a8292e

There’s no body attached to this request.


Hi Pls let me know if any update. Thanks

Hey @toju

Not sure if you saw my response above?

Thank you. will review with team and get back shortly.