Found transaction with null status

Found transaction with null status

bookkeeperecom
Shopify Partner
6 0 0

Hey Folks at Shopify,

 

When interacting with an API, we encountered a glitch in one of the orders where it has two transactions with equal values of the order amount. But one of the transactions has status property set as null and the other one is the usual value as "success". Judging by shopify's documentation only 5 values are possible, but we encountered a null value.

 

Should we expect more null values for status property on a transaction? What does it mean when status = null on a transaction?

Replies 5 (5)

Liam
Shopify Staff
2873 312 821

Hi - can you share the query that you're making?

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

bookkeeperecom
Shopify Partner
6 0 0

Hey Liam, for sure. The query I was using on behalf of our customer was for order transactions of an order.

https://{{store_name}}.myshopify.com/admin/api/{{api_version}}/orders/{{order_id}}/transactions.json

Here's a little preview from postman. The status is shown as null

Screenshot 2024-02-29 at 9.01.11 AM.png

Liam
Shopify Staff
2873 312 821

Would it be possible for you to try a similar query but with GraphQL (using the GraphiQL app) there's a transactions field on the Order object which has a status field. It should look something like:

 

query {
  order(id: "gid://shopify/Order/123456789") {
    id
    transactions {
      id
      kind
      status
      amountSet {
        shopMoney {
          amount
          currencyCode
        }
        presentmentMoney {
          amount
          currencyCode
        }
      }
      createdAt
    }
  }
}

 

 

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

bookkeeperecom
Shopify Partner
6 0 0

Thanks Liam. I queried the graphql endpoint as suggested. The GraphQL response has the status "AWAITING_RESPONSE" on the affected transaction. Are there plans to update the REST API to have this new status as well?

"kind": "SALE",
"status": "AWAITING_RESPONSE",
bookkeeperecom
Shopify Partner
6 0 0

Any updates @Liam