Have your say in Community Polls: What was/is your greatest motivation to start your own business?
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.

Looking for fees shown in the UI

Looking for fees shown in the UI

jeremywh
Excursionist
12 0 11

Hi!  I'm trying to find out if there's a way to use the GraphQL API to get at the "Fee Amount" and "Fee Amount Currency" as shown in this attached screenshot:

Screenshot 2023-11-27 at 12.29.06 PM.png

 

I've tried the following order query to get there, but the fees are empty, and I don't see it coming up in the receiptJSON field, either.

{
  order(id: "gid://shopify/Order/xxxxxxxxxxxxx") {
    name
    transactions {
      id
      accountNumber
      fees {
        amount {
          amount
          currencyCode
        }
        flatFee {
          amount
        }
        flatFeeName
        rate
        rateName
        taxAmount {
          amount
        }
        type
      }
      gateway
      formattedGateway
      kind
      shopifyPaymentsSet {
        refundSet {
          acquirerReferenceNumber
        }
      }
      receiptJson
    }
  }
}

For orders that are paid with something other than Paypal, I can usually get those fees through the Finances > Payouts screen.  But orders paid with Paypal don't show up there, so I need another way of getting at them.  I figure if they're showing up in the Admin UI for the order, they must be in the data somewhere, so I'm hoping that someone can point me in the right direction.  Thanks!

Replies 2 (2)

Liam
Community Manager
3108 344 889

Hi Jeremywh,

 

Is that screenshot from the Shopify admin?

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

jeremywh
Excursionist
12 0 11

Hi Liam,

 

It is.  After opening a specific order in the admin screen

  1. scroll down to the "timeline"
  2. find an entry that says something along the lines of "Flow Platform captured $xx.xx on Paypal Express Checkout" and click it to expand it.
  3. Under that, I clicked on "information from gateway"

That expands into a whole list of fields and values, which is where I got the screenshot from.  I apologize for not taking a screenshot of the whole thing, but there's a lot of potentially sensitive information in there that I didn't have the time to properly black out.