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.

Charge_id from subscription_sale_adjustment is always null

Charge_id from subscription_sale_adjustment is always null

Honglei
Visitor
1 0 2

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
          }
        }
      }
    }
  }
}
Replies 4 (4)

Liam
Community Manager
3108 344 910

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.

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

dtrz
Shopify Partner
6 0 0

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#M127...). 

When will you guys solve this problem? 

sinuhe
Shopify Partner
29 0 9

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.

Auglio
Shopify Partner
1 0 0

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