We are making Shopify App for subscriptions.
We called SubscriptionContracts GraphQL query. It returns SubscriptionContracts response. But billingAttempts field was blank``.
Also, We haven't received webhook for "subscriptionBillingAttemptsSuccess" and "subscriptionBillingAttemptsfailure" topics.
Could early access users take billingAttempts by GraphQL response or webhook?
Solved! Go to the solution
Have you created a billingAttempt?
This is an accepted solution.
After the SubscriptionContract is initiated, the app is responsible for creating billingAttempts, not Shopify.
Check out the tutorial here: https://shopify.dev/tutorials/shopify-subscriptions-overview#modeling-your-app-for-subscriptions
Following the tutorial, it notes "...Shopify generates a subscription contract and creates a billing attempt on the initial purchase"
To clarify, should we expect the initial billing attempt to be generated by Shopify or none at all? From your response, I assume the first subscription order is billed and processed by Shopify(that doesn't create a billingAttempt; hence billingAttempts field is  ), and subsequent subscription orders would be created through the app?
Welcome to the forums!
Good point, I don't think the wording on some of this is really very good. But you are correct.
From the tutorial:
A billing attempt represents an attempt at executing a billing cycle and charging the customer payment method for a subscription contract. A billing attempt executes a contract in its current state and ensures that the app’s contract data is synced with Shopify before billing.
For a new contract, there is no billingAttempt as the tasks were completed as part of the order and contract creation. All future billingAttempts will be called by the app.
Can you please let me know, how you are accessing SubscriptionContracts Graphql?
I am getting permission error - https://community.shopify.com/c/Shopify-Discussion/Unable-to-access-the-SubscriptionContract/m-p/104...