Solved

Show Shipping method & Payment method on Graphql Admin Api

Ahsan-ah-med
Shopify Partner
10 1 1

I create a Shopify Payment Customization Function App and I want to Show Payment & Shipping Method on My App admin settings so how can I fetch these data via Graphql Query;
like this below Image:

Ahsanahmed_0-1714749256754.pngAhsanahmed_1-1714749263336.png

 

 

 

Ahsan Ahmed
Shopify Developer | 2 Years of Experience
Transforming Websites into Shopify
 Converting Existing Websites (WooCommerce, Figma, Magento, etc.) to Shopify
️ Developing Custom Shopify Apps for Unique Client Needs
 Enhancing Shopify Functions with Checkout Extensions for Plus Users
Let's Build Your Dream Store Together!
Accepted Solution (1)

Ahsan-ah-med
Shopify Partner
10 1 1

This is an accepted solution.

Discussion With Shopify Support Team,

About Payment Method:
I've been in touch with our development team regarding your query about retrieving all payment methods available on a store via the API. Currently, it is not possible to access a list of all payment methods directly through the Admin API. However, you can retrieve a list of accepted credit cards and digital wallets that are enabled through any payment gateways on the store using the Storefront API.
 
Here is a link to some developer documentation that includes an example query:
 

{
   shop {
      paymentSettings {
         enabledPresentmentCurrencies
         acceptedCardBrands
         supportedDigitalWallets
       }
    }
}

About Shipping Method:

In regards to retrieving shipping methods for your store, you can access this information through the Delivery Profiles using the Admin API. Specifically, you can navigate through the following path: DeliveryProfile > profileLocationGroups > DeliveryProfileLocationGroup > DeliveryLocationGroupZone > DeliveryMethodDefinition. 
 
For further guidance and a query example, you might find the following developer documentation and Shopify Community Forums thread helpful:
 

 

{
  deliveryProfiles(first: 10) {
    edges {
      node {
        profileLocationGroups {
          locationGroupZones(first: 5) {
            edges {
              node {
                methodDefinitions(first: 5) {
                  edges {
                    node {
                      id
                      name
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
{
  "data": {
    "deliveryProfiles": {
      "edges": [
        {
          "node": {
            "profileLocationGroups": [
              {
                "locationGroupZones": {
                  "edges": [
                    {
                      "node": {
                        "methodDefinitions": {
                          "edges": [
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/608233718008",
                                "name": "Standard"
                              }
                            },
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/609473921272",
                                "name": "Express"
                              }
                            }
                          ]
                        }
                      }
                    },
                    {
                      "node": {
                        "methodDefinitions": {
                          "edges": [
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/608233750776",
                                "name": "Standard"
                              }
                            },
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/608233783544",
                                "name": "Free International Shipping"
                              }
                            },
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/608233816312",
                                "name": "International Shipping"
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 90,
      "actualQueryCost": 6,
      "throttleStatus": {
        "maximumAvailable": 2000,
        "currentlyAvailable": 1994,
        "restoreRate": 100
      }
    }
  }
}​​​

 

 

 

Ahsan Ahmed
Shopify Developer | 2 Years of Experience
Transforming Websites into Shopify
 Converting Existing Websites (WooCommerce, Figma, Magento, etc.) to Shopify
️ Developing Custom Shopify Apps for Unique Client Needs
 Enhancing Shopify Functions with Checkout Extensions for Plus Users
Let's Build Your Dream Store Together!

View solution in original post

Reply 1 (1)

Ahsan-ah-med
Shopify Partner
10 1 1

This is an accepted solution.

Discussion With Shopify Support Team,

About Payment Method:
I've been in touch with our development team regarding your query about retrieving all payment methods available on a store via the API. Currently, it is not possible to access a list of all payment methods directly through the Admin API. However, you can retrieve a list of accepted credit cards and digital wallets that are enabled through any payment gateways on the store using the Storefront API.
 
Here is a link to some developer documentation that includes an example query:
 

{
   shop {
      paymentSettings {
         enabledPresentmentCurrencies
         acceptedCardBrands
         supportedDigitalWallets
       }
    }
}

About Shipping Method:

In regards to retrieving shipping methods for your store, you can access this information through the Delivery Profiles using the Admin API. Specifically, you can navigate through the following path: DeliveryProfile > profileLocationGroups > DeliveryProfileLocationGroup > DeliveryLocationGroupZone > DeliveryMethodDefinition. 
 
For further guidance and a query example, you might find the following developer documentation and Shopify Community Forums thread helpful:
 

 

{
  deliveryProfiles(first: 10) {
    edges {
      node {
        profileLocationGroups {
          locationGroupZones(first: 5) {
            edges {
              node {
                methodDefinitions(first: 5) {
                  edges {
                    node {
                      id
                      name
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
{
  "data": {
    "deliveryProfiles": {
      "edges": [
        {
          "node": {
            "profileLocationGroups": [
              {
                "locationGroupZones": {
                  "edges": [
                    {
                      "node": {
                        "methodDefinitions": {
                          "edges": [
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/608233718008",
                                "name": "Standard"
                              }
                            },
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/609473921272",
                                "name": "Express"
                              }
                            }
                          ]
                        }
                      }
                    },
                    {
                      "node": {
                        "methodDefinitions": {
                          "edges": [
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/608233750776",
                                "name": "Standard"
                              }
                            },
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/608233783544",
                                "name": "Free International Shipping"
                              }
                            },
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/608233816312",
                                "name": "International Shipping"
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 90,
      "actualQueryCost": 6,
      "throttleStatus": {
        "maximumAvailable": 2000,
        "currentlyAvailable": 1994,
        "restoreRate": 100
      }
    }
  }
}​​​

 

 

 

Ahsan Ahmed
Shopify Developer | 2 Years of Experience
Transforming Websites into Shopify
 Converting Existing Websites (WooCommerce, Figma, Magento, etc.) to Shopify
️ Developing Custom Shopify Apps for Unique Client Needs
 Enhancing Shopify Functions with Checkout Extensions for Plus Users
Let's Build Your Dream Store Together!