I’m working on integrating Shopify with our newspaper subscription platform. We want customers to buy both newspaper subscriptions and individual products from our Shopify store in a single checkout process.
Here’s what I need to accomplish:
Retrieve product pricing - Can I use a GET request to fetch the price of specific items from our Shopify store?
Process combined payments - We handle newspaper subscriptions through our own payment gateway. I want to add Shopify product costs to the total amount we charge customers.
Notify Shopify of successful payments - After our payment gateway processes the transaction, can I send a POST request to Shopify confirming the payment went through?
Trigger order fulfillment - Once Shopify receives the payment confirmation, the order should proceed to fulfillment automatically.
Basically, I want customers to pay once for everything (subscription + store items) while letting Shopify handle the product fulfillment part. Is this workflow supported by the Shopify API? I’ve looked through the documentation but can’t find clear examples of this external payment confirmation process.
Your setup’s complex but totally doable. Here’s what others missed - Shopify’s checkout extensibility might be way easier than building an external payment flow. If you’re set on going external though, draft orders + transactions API is the right approach. Just make sure you handle inventory locks during payment processing or you’ll run into overselling problems. And definitely test webhook ordering thoroughly in sandbox first.
Integrating Shopify with your own payment system is feasible, but requires careful planning. To retrieve pricing, utilizing the Products API with a GET request is the right approach. Just be sure to account for product variants. The challenge lies in confirming payments; it’s advisable to create draft orders and use the Transactions API to mark them as paid once your gateway has processed the payment, using the ‘mark_as_paid’ parameter. A common issue arises with inventory management; since you’re bypassing Shopify’s standard checkout, maintaining accurate stock levels becomes critical, so implementing a reservation system to hold inventory temporarily during the transaction is beneficial. Once marked as paid, order fulfillment should automatically proceed if your settings are configured appropriately.
Yeah, this workflow works with Shopify’s API, but there are some gotchas. For prices, the REST Admin API Products endpoint does the job - just make sure you’re grabbing the right variant prices since products can have multiple tiers. The payment confirmation part’s tricky though. Don’t try confirming payments after the fact. Instead, use the Draft Orders API to create pending orders first, then record your external payment with the Order Transactions API. This keeps everything in sync and prevents data issues. Watch out for webhook timing - I’ve seen fulfillment processes fire before payment data gets fully recorded. Build in proper error handling and retry logic. Also, don’t forget tax calculations. Your external system needs to match whatever tax rules Shopify would apply during normal checkout.