List of available payment methods

sebastiandev
Shopify Partner
54 1 20

Hello,

we've developed an application that allows users to conditionally hide payment methods. Everything works fine, but there's one thing we'd like to improve.

 

Currently, in the user configuration, they have to enter the name of the payment method to perform an action, which is unfortunately not very useful.

sebastiandev_3-1708632198264.png

 

 

We thought about introducing support for selecting from a dropdown list of the options that the user has set, but there's no API that would allow us to retrieve this information (or at least we can't find one). Is there any way to get a list of payment methods?

 

I stumbled upon a query that could be useful:

 

{
  translatableResources(first: 10, resourceType: PAYMENT_GATEWAY) {
    nodes {
      translatableContent {
        key
        value
      }
    }
  }
}

and result:

{
  "data": {
    "translatableResources": {
      "nodes": [
        {
          "translatableContent": [
            {
              "key": "name",
              "value": "Cash on Delivery (COD)"
            }
          ]
        },
        {
          "translatableContent": [
            {
              "key": "name",
              "value": "Money Order"
            }
          ]
        },
        {
          "translatableContent": [
            {
              "key": "name",
              "value": "Custom payment method"
            }
          ]
        }
      ]
    }
  }
}

 

However, it turns out that the API only returns part of the data, namely "Manual payment methods."

sebastiandev_0-1708632021762.png

 

Is there an API that will also return data from "Manual payment methods"?

sebastiandev_1-1708632050441.png

 

And preview in Checkout: 

sebastiandev_2-1708632140432.png

 

 

Replies 0 (0)