XB_1
October 30, 2023, 6:10pm
1
According to the docs here: https://shopify.dev/docs/api/admin-rest/2023-10/resources/recurringapplicationcharge I’m running this api request:
POST /admin/api/2023-10/recurring_application_charges.json HTTP/1.1
Host: XXXXXXX
X-Shopify-Access-Token: XXXXXXX
Content-Type: application/json
Cookie: request_method=POST
Content-Length: 135
{"recurring_application_charge":{"name":"Super Duper Plan","price":10.0,"return_url":"http://super-duper.shopifyapps.com","test":true}}
It results with 200 OK with this response:
{
"recurring_application_charges": []
}
But it should return 201 with the created recurring_application_charge?
lizk
October 30, 2023, 8:32pm
2
This result would make it seem that you are actually doing a GET request to that endpoint instead of a POST request.
If possible would you be able to share your code you are using to make this request?
XB_1
October 31, 2023, 2:29pm
3
Currently just using Postman
lizk
October 31, 2023, 2:43pm
4
In the bottom left hand corner of Postman you should see console. Open that up and you should be able to see what requests Postman is actually making.
I tried to reproduce the functionality you are seeing in Postman and I am unable to.
XB_1
October 31, 2023, 2:47pm
5
The log shows that Postman is performing the POST request as shown. But Shopify is returning 301 to the GET endpoint.
lizk
October 31, 2023, 3:01pm
6
You are making the API call to the custom domain, correct? Are you seeing this functionality when you make the API call directly to the myshopify domain?
XB_1
October 31, 2023, 3:05pm
7
This returns
{"errors":{"base":["It appears that this application is currently owned by a Shop. It must be migrated to the Shopify partners area before it can create charges with the API."]}}
That would probably be much too complicated to go the way via an external app now. Too bad…
lizk
October 31, 2023, 3:12pm
8
Hi there
The billing API can only be used on Public Apps . If you have a custom app unfortunately you will not be able to use the Billing API.