Skip to navigation

GraphQL Storefront API: Payment Methods

Use the paymentMethods field on the site query to list the payment methods enabled for the current store, channel, and currency. Each payment method returns an entityId, a display name, and optional capabilities. The capabilities describe what the method supports, such as saving payment instruments for future use. For the full schema, see the paymentMethods field on the site query.

This field does not require a customer login, so you can call it with a regular storefront token.

The list reflects the shopper’s active currency and the channel of the request. The same store can return different methods for different currencies.

If the merchant has translated a payment method’s name for the shopper’s language, name returns the translation.

For some dynamic payment providers, including Stripe, BlueSnap, and Adyen, support for listing alternative payment methods (APMs) is in progress. The list does not yet include every APM that these providers offer, and more APMs from these providers appear as support is added.

Get the store’s enabled payment methods

The example below requests all enabled payment methods with their vaulting capabilities.

Example query: Get the store's enabled payment methods
query {
site {
paymentMethods {
edges {
node {
entityId
name
capabilities {
vaulting {
configuration {
isCustomerVaultingEnabled
isGuestVaultingEnabled
}
actions {
isAddSupported
isEditSupported
isDeleteSupported
}
requirements {
isInitializationRequired
}
}
}
}
}
}
}
}

If vaulting is supported, capabilities.vaulting shows what the method supports. If requirements.isInitializationRequired is true, create a vault initialization before you save a payment instrument. See Create a vault initialization. To update or delete a saved instrument, use the updateStoredPaymentInstrument and deleteStoredPaymentInstrument mutations.

Resources

Documentation

API reference