New Shopify Certification now available: Liquid Storefronts for Theme Developers

Subscription API not creating order at next date

HD_WORK
New Member
20 0 0

Can anyone help me to find out why subscription contract does not creating an order at next date.

i have created an app. everything is working fine. customer can purchase subscription product but its not creating order at next date automatically

can anyone help me in that ????

 

I have used mutation of create billing attempt but i want to automate it.

I want that my app create renewing order automatically on next billing date

can anyone help me in this ???

Replies 2 (2)
diegolippel
Shopify Staff
Shopify Staff
19 4 6

Hi there!

Processing the billing attempts is the way to create an order from a subscription contract.

Hopefully this documentation helps: https://shopify.dev/tutorials/create-manage-subscription-contracts#create-a-billing-attempt

To learn more visit the Shopify Help Center or the Community Blog.

colinloretz
Excursionist
16 2 7

Unfortunately, as mentioned by @diegolippel, you will have to keep track of subscription next charge dates in your own application and trigger a billing attempt.

@HD_WORK be very careful when building this and make sure you use idempotency tokens. The contract will also let you create a billing attempt on a SubscriptionContract even if its not "due" yet (which means the next billing date is just a value store). There are no guardrails other than the idempotency token so you will need to build your own.

I would love to hear from Shopify why this is the case as it does not work like any other subscription API out there (Stripe, etc). I would imagine that end customers would trust Shopify to bill them as per the "Subscription Contract" which turns out to not be a contract whatsoever.