Migrating REST API Transactions to GraphQL

We’re in the process of migrating from the REST API to GraphQL and have encountered a challenge with a specific use case.

Currently, we use the REST API endpoint POST /orders/{order_id}/transactions to create transactions for orders, setting the source parameter to external. This approach allows us to apply manual payments for net terms orders received through an external system.

In our GraphQL migration efforts, we explored the orderMarkAsPaid mutation but found it unsuitable, as it marks orders as fully paid, whereas our orders often involve partial payments.

Is there a GraphQL mutation or recommended approach to record partial payments on orders, similar to the functionality provided by the REST API’s transaction creation with an external source?

Any guidance or suggestions would be greatly appreciated.

Hi Colby,

Have you tried using the orderCapture mutation? This allows you to capture a partial payment by specifying an amount less than the total order amount.

Hi Liam,

Thanks for the reply. We were looking at that, but didn’t see a method to do so without a reference to an authorization. Perhaps we overlooked this.

How would you perform a partial capture, let’s say $10, for a cash or other manual payment method?

Thanks!

Hi Colby,

I do see what you mean - it doesn’t seem like the GraphQL Admin API currently supports creating a partial payment when there is no authorized transaction to capture. I’ve reached out to the product team to get their input on this, will update here when I lean more.

Hi again Colby - our product team have confirmed that the GraphQL Admin API currently does not support creating partial payments with cash/manual payment methods. I’ll connect with you via DM to collect additional details from you to help us explore how best to approach this.