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:
Topic summary
A developer building a Shopify Payment Customization Function App needs to display available payment and shipping methods in their app’s admin settings via GraphQL queries.
Payment Methods:
- The Admin API does not support retrieving all payment methods directly
- Alternative: Use the Storefront API to fetch accepted credit cards and digital wallets through
shop.paymentSettings - This returns
acceptedCardBrands,supportedDigitalWallets, andenabledPresentmentCurrencies
Shipping Methods:
- Available through Admin API via Delivery Profiles
- Query path:
DeliveryProfile → profileLocationGroups → DeliveryLocationGroupZone → DeliveryMethodDefinition - A sample GraphQL query was provided showing how to retrieve shipping method names and IDs
Status: The developer received guidance from Shopify Support with documentation links and working query examples. The solution involves using two different APIs (Storefront for payments, Admin for shipping) rather than a unified approach.
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:
-
Admin API: retrieve list of available shipping methods - Shopify Community
You can use this Graphql Query to get to Shipping method in your Store:
{
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
}
}
}
}

