# 注文の支払い方法をGraphiQL Admin APIで取得したい

**URL:** <https://community.shopify.com/t/graphiql-admin-api/584778>\
**Category:** 総合的なディスカッション\
**Created:** [January 20, 2026, 7:12am UTC](https://community.shopify.com/t/graphiql-admin-api/584778 "2026-01-20T07:12:35Z")\
**Posts on this page:** 5\
**Page:** 1

## AI-generated summary

GraphiQL Admin APIで注文の「支払い方法」を取得したいが、`paymentCollectionDetails` / `vaultedPaymentMethods` では値が返らない、という相談。開発ストアでBogusゲートウェイのテスト注文を確認していた。 

回答では、`paymentCollectionDetails` は保存済みのクレジットカードやPayPalアカウントなどのVault情報向けで、Bogusゲートウェイのテスト注文では通常空になると説明された。単に注文で使われた支払い方法を知りたい場合は、`paymentGatewayNames` を参照すればよく、「Bogus Gateway」など実際の決済手段が取得できる。 

あわせて、`transactions` 配下の `gateway`、`formattedGateway`、`paymentDetails` を取得するGraphQL例も共有された。`paymentDetails` ではカード決済時の `paymentMethodName` など、より具体的な情報を確認できる。 

最終的に、質問者は `paymentGatewayNames` と `transactions.paymentDetails` で目的の情報を取得できたと報告しており、解決済み。

<div class="post-metadata">

**Author:** ![store\_K](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@store\_K](https://community.shopify.com/u/store_K)\
**Post date:** [January 20, 2026, 7:12am UTC](https://community.shopify.com/t/graphiql-admin-api/584778/1 "2026-01-20T07:12:35Z")

</div>

GraphiQL Admin APIで注文の情報を取得するときに、「支払い方法」を取得したいです。  
「paymentCollectionDetails」を下記の記述で取得すればできると思っていたのですが、  
記述が間違っているのか、そもそも項目を間違えてしまっているのか値が取得できていません。

注文の「支払い方法」を取得したい場合、どの項目をどのような記述で取得すればよろしいでしょうか。

paymentCollectionDetails{  
vaultedPaymentMethods{  
paymentInstrument{  
\_\_typename  
…on VaultPaypalBillingAgreement{  
name  
}  
…on VaultCreditCard{  
name  
}  
}  
}  
}

※確認しているのは開発ストアで、下記を元にBogusゲートウェイでテスト注文した結果を取得しようとしています。  
[https://help.shopify.com/ja/manual/checkout-settings/test-orders](https://help.shopify.com/ja/manual/checkout-settings/test-orders)

---

<div class="post-metadata">

**Author:** ![Zicosavvy](https://avatars.discourse-cdn.com/v4/letter/z/e9c0ed/32.png) [@Zicosavvy](https://community.shopify.com/u/Zicosavvy)\
**Post date:** [January 20, 2026, 11:36am UTC](https://community.shopify.com/t/graphiql-admin-api/584778/2 "2026-01-20T11:36:53Z")

</div>

paymentCollectionDetails や vaultedPaymentMethods は、保存済みのクレジットカードやPayPalアカウントの情報を取得するためのものです。

Bogusゲートウェイでのテスト注文では、保存済み情報がないため値は返ってきません。

注文の支払い方法を知りたいだけなら、paymentGatewayNames を見ればOKです。ここに「Bogus Gateway」など、実際に使われた支払い方法が入っています。

要するに、テスト注文ではVault情報は空なので、支払い方法は paymentGatewayNames を参照するのが正解です。

---

<div class="post-metadata">

**Author:** ![Eric-HAN](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/eric-han/32/142735_2.png) [@Eric-HAN](https://community.shopify.com/u/Eric-HAN)\
**Post date:** [January 21, 2026, 5:56am UTC](https://community.shopify.com/t/graphiql-admin-api/584778/3 "2026-01-21T05:56:56Z")

</div>

私はこのように注文の支払い方法を取得しています。参考までに記載します。

```auto
query queryOrders($query:String) {
  orders(first:10,query:$query) {
    edges {
      node {
        id
        name
        createdAt
        lineItems(first:10){
            nodes{
                currentQuantity
                name
                quantity
            }
        }
        totalPriceSet{
            presentmentMoney{
                amount
                currencyCode
            }
        }
        transactions(first: 10) {
            gateway
            formattedGateway
            paymentDetails {
                __typename
                ... on CardPaymentDetails {
                paymentMethodName
                }
                ... on ShopPayInstallmentsPaymentDetails {
                paymentMethodName
                }
            }
            paymentIcon {
                url
            }
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![store\_K](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@store\_K](https://community.shopify.com/u/store_K)\
**Post date:** [January 21, 2026, 6:29am UTC](https://community.shopify.com/t/graphiql-admin-api/584778/4 "2026-01-21T06:29:27Z")

</div>

@Zicosavvy  
@Eric-HAN  
有難うございます！  
「paymentGatewayNames」や「transactions下のpaymentDetails」で  
支払方法を確認できました！

---

<div class="post-metadata">

**Author:** ![store\_K](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@store\_K](https://community.shopify.com/u/store_K)\
**Post date:** [January 21, 2026, 6:31am UTC](https://community.shopify.com/t/graphiql-admin-api/584778/5 "2026-01-21T06:31:54Z")

</div>

@Eric-HAN  
transactionsの情報だとテスト注文でも支払方法の詳細が確認できるんですね！  
おかげでクレジットカード支払いのときは具体的にどのような情報が取得できるのかを確認できました。  
有難うございます。
