Discussing APIs and development related to customers, discounts, and order management.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello,
We have some companies set up with net payment terms. Some of them provide a credit card at checkout, others do not (as they pay outside of Shopify via cheque (check), ACH etc.).
In the Shopify admin, we can see a difference when the orders come in.
This NET 30 order was placed with a vaulted credit card.
This NET 30 order was placed without specifying a credit card at checkout.
-> We need to be able to differentiate these orders via API calls.
We tried the ORDERS and TRANSACTIONS end points, but they did not work.
The orders.json does not include any information for the payment gateway. It is empty is either instance as these are NET xx orders. The transactions.json is of course also empty, as no transaction has happened yet.
Any pointers in the right direction are greatly appreciated.
(This is a Shopify Plus store with B2B customers only.)
Cheers,
Celtiic
Hi Celtiic,
This might not be exactly what you're trying to achieve, but if you're just looking to distinguish between a paid order and an unpaid order, the fullyPaid field on the order object returns a boolean that you could use to check if an order is paid or not - regardless of the actual payment method?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hello Liam,
Thank you.
The orders are not fully paid, they are net terms orders. No payment transaction has taken place yet at the time was placed. Do you think your suggestion would work?
Cheers,
Celtiic
If all orders are not fully paid, my suggested method would not work. There is the vaultedPaymentMethods field on the OrderPaymentCollectionDetails object which can be accessed on the order object - this will return a list of vaulted payment methods for the order with their permissions. Would this work for you?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
I am looking for a solution for REST API, not GraphQL. Would there be an equivalent for REST?
From looking into this a bit more, it appears this is only supported via GraphQL at this time - so this would be your best option right now.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog