I'm a test automation engineer working for a company that has a Shopify App for managing recurring subscriptions. My company has created a feature to sync and compare our internal subscription contract metadata with Shopify's subscription contract metadata. I have been tasked with building an automated test framework to confirm the subscription contract syncing functionality is working as expected.
TL;DR: There is no way to programmatically (via REST or GraphQL) create a subscription contract. A subscription contract is only created by completing a checkout with a subscription product via the customer-facing Shopify Checkout.
Further Details: In order to test the subscription contract syncing service we created, a new subscription contract must be created. Currently, the only way to create a NEW Shopify Subscription Contract is to complete a checkout via the customer-facing shopify store. The user must add a subscription product to their cart and then complete the purchase through the customer-facing Shopify checkout (with a test-card payment via stripe). Upon successful payment, a "subscription contract" is created and my company uses this Subscription Contract to build our subscription-management service off of.
What I need:
I'm searching for a way to create a test checkout on a test store with a test subscription product programmatically via a REST or GraphQL endpoint. I cannot find any information online on whether Shopify has an endpoint(s) I can hit to simulate the customer-facing Shopify Checkout on a subscription product so I can create a subscription contract. I really don't want to have to write a slow/expensive automated UI/E2E test simply to go through the checkout as if they were a real user in order to create a subscription contract.
Does shopify really not have any endpoints available to Shopify App developers to complete a Shopify checkout directly through REST or GraphQL?