Fetch available payment methods
Retrieve the list of payment methods available for the current cart.
Query
query GetPaymentMethods($cartId: String!) {
cart(id: $cartId) {
payMethods {
name
code
externalCode
type
}
}
}
Variables
{
"cartId": "019c77b7-565f-7ea0-8660-42bc63a7f728"
}
Response
{
"data": {
"cart": {
"payMethods": [
{ "name": "On pickup", "code": "AFHALEN", "externalCode": null, "type": "EUR" },
{ "name": "Visa", "code": "CREDITCARD", "externalCode": null, "type": "EUR" },
{ "name": "Mastercard", "code": "MASTERCARD", "externalCode": null, "type": "EUR" },
{ "name": "PayPal", "code": "PAYPAL", "externalCode": null, "type": "EUR" },
{ "name": "On account", "code": "REKENING", "externalCode": null, "type": "EUR" }
]
}
}
}
How it works
The available payment methods depend on the cart context — the logged-in user, their company, and business rules may filter the list. Use the code value when setting the payment method on the cart via cartUpdate. The externalCode maps to your payment service provider's method identifier when a PSP integration is configured. Display the name field to the user in the checkout UI.