Charge_id from subscription_sale_adjustment is always null

Question 1: I am using partner API, and this is the query I am using. The charge_id I got is always null so that I can’t join refund table and sale table. I also checked the shopify partner dashboard, and the data exported has same problem. How can I solve it?

Question 2: As we are selling our app on shopify, I am not sure which is the best API type that I can choose. Now we only use shopify partner api. Is there anything else may also help us? Can we also use shopify ADMIN api?

query {
  transactions(types: [APP_SALE_ADJUSTMENT], createdAtMin:":fromdate:", createdAtMax:":todate:", first: 100, after: ":cursor:") {
    pageInfo{
        hasNextPage
    }
    edges {
      cursor
      node {
        ... on AppSaleAdjustment {  
          app{
            id
            name
          }
          chargeId
          createdAt
          grossAmount {
            amount
            currencyCode
          }
          id
          netAmount{
            amount
            currencyCode
          }
          shop{
            id
            myshopifyDomain
            name
          }
          shopifyFee{
            amount
            currencyCode
          }
        }
      }
    }
  }
}
2 Likes

Hi Honglei

I’ll dig into your first issue with the charge_id but for Question 2 - yes you can use the Admin API in your app.

1 Like

Hi @Liam

I have same issue and still null on API, and asked it on another review (https://community.shopify.com/c/graphql-basics-and/partner-api-transactions-refunds/m-p/2477563#M12771).

When will you guys solve this problem?

Hi Liam,

same issue. We are using the Shopify API to create charges and everything normally works fine. But there is a small percentage of the Shopify API responses where the ‘charge_id’ value is null and we don’t find any reason why. Could you please take a look?

Thanks in advance.

Hi Liam, do you have an update on this issue? We are also experiencing the same problem.