I am trying to use Send Admin API Request to mutate the subscriptionContractSetNextBillingDate.
This is the input and it runs without error but the mutation does not occur. After execution the next billing date is still the same.
{
“contractId”: “gid://shopify/SubscriptionContract/18985517340”,
“date”: “2024-08-06T14:00:00Z”
}
I read in dev docs here that this mutation “Requires write_own_subscription_contracts access scope. Also: The user must have manage_orders_information permission” and I am wondering if this is the issue. I have full admin access to my store. Do I need to set the permission’s somewhere inside of the Flow action?
Any ideas would be much appreciated!
It’s challenging when you can’t just see the full response from the admin api mutation. I’m guessing that the mutation is being run under the flow app and not under the app that owns that subscription contract, so that’s probably the issue?
Bummer! I was afraid that this wouldn’t work. It doesn’t appear Shopify Flow allows a mutation without using something like Send Admin API and since this would require a call to the app API I am thinking it is not possible.
I just looked at your profile and saw you also use Mechanic. Is this something you would be interested in solving for us? I have all of the logic written already for the nextBillingDate calculation but when I looked into using Mechanic it didn’t appear to allow using JS unless it was deployed onto the storefront, hence why I wanted to use Flow so the JS was just running on the backend.
The subscription app is called Skio. I found in their API docs how the mutation is structured, if you are curious to price it out for us. I’ll reach out via your website.
https://code.skio.com/#mutation-updateNextBillingDate
Oh nice - yeah I’d love to help. In the case of making an api call to skio’s api and not the shopify subscription api, you should be able to use the send http request action in flow.
But yes, I’d be more than happy to help in either case!