Skip to main content

totalUnsettledSet calculation fixed for pending captures

The totalUnsettledSet field on the OrderTransaction object now correctly calculates the unsettled amount when a capture is in pending status. The affected field is OrderTransaction.totalUnsettledSet.

What's changed

Previously, when a capture was pending, totalUnsettledSet was double-counting by incorrectly returning the authorization amount plus the pending capture amount. Now it correctly returns the actual unsettled amount.

For example, for a $100 authorization with a $50 pending capture:

  • Before: Returned $150 (incorrect)
  • After: Returns $100 (correct)

What you need to do

Nothing. Your existing queries will continue to work and no changes to your code are required. The returned value will now be correct.

What this affects

This bug only affects multi-capturable orders, which are orders where partial or multiple captures are supported.

According to our API breaking change policy, bug fixes that correct values to match documented behavior are applied immediately across all API versions.

Why we changed it

This update fixes a bug where the calculation double-counted during pending capture states. The totalUnsettledSet field represents the available amount with currency to capture on the gateway, but the previous value didn't reflect this.

This bug was introduced when multi-capturable support was added, and became more visible after Shopify Payments migrated to a flow where captures transition through PENDING status before SUCCESS.

Was this section helpful?