PSA: if shopifyPaymentsAccount.payouts returns fewer payouts than REST, check your businessEntities

quick PSA for anyone pulling payouts off the Admin API. we kept seeing GraphQL return way fewer payouts than REST for the same shop (REST gave all 32, businessEntities { shopifyPaymentsAccount { payouts } } gave 20 with hasNextPage: false), and it turned out not to be a pagination bug at all.

its the businessEntities migration. once a shop is moved to business entities the Payments account is scoped per entity, so that query only returns payouts for whichever entity you traversed. the older payouts sit on a different (often archived) entity, and REST isnt entity-scoped so it still returns everything.

if youre seeing this, loop every entity instead of assuming one:

{
  businessEntities {
    id
    archived
    shopifyPaymentsAccount {
      payouts(first: 50) { edges { node { id status } } }
    }
  }
}

the one with archived: true is usually where the missing pre-cutoff payouts are. if an entitys account is filtered from the API entirely, REST stays the fallback for the historical stuff.

anyone else hit this after the entities rollout? curious how people are handling the archived-entity payouts long term.