Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

Retrieve gateway property via REST API for Net Terms orders

Retrieve gateway property via REST API for Net Terms orders

Celtiic
Tourist
3 0 1

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.

Celtiic_0-1702661911488.png

This NET 30 order was placed without specifying a credit card at checkout.

Celtiic_1-1702661992697.png

 










-> 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

Replies 5 (5)

Liam
Community Manager
3108 344 910

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

Celtiic
Tourist
3 0 1

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

Liam
Community Manager
3108 344 910

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

Celtiic
Tourist
3 0 1

I am looking for a solution for REST API, not GraphQL. Would there be an equivalent for REST?

Liam
Community Manager
3108 344 910

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