How to process payment for Draft Order API

How to process payment for Draft Order API

usaamatahir
Shopify Partner
3 0 1

Hi all
I'm working on a custom checkout for our headless Shopify site and I'm using Shopify Draft Order API to complete the checkout process. The Draft Order API processes shipping addresses and shipping methods in checkout. After this, I need to complete the order by processing payment through Stripe. I'm thinking of completing the Draft Order with a mark paymentPending as false as I'll do this after the payment through Stripe is successful. Is that a safe way to complete the order or not?

I'm referring to this API
https://shopify.dev/docs/api/admin-graphql/2023-01/mutations/draftOrderComplete#examples-Complete_a_...

If there is any other secure way to do that, please recommend it.

Note: I'm not using checkout API because we are using discounted pricing and checkout API is not accepting manual pricing.

Replies 0 (0)