list-payment-methods
Method: GET
Path: /payments/payment-methods
Tags: Payments
Summary
List payment methods
Description
Lists the payment methods the store offers on the sales channel of the caller's token: its connected payment gateways (auto) and active manual methods (manual). A method the store offers only on other channels is left out, and asking for it by payment_provider_slug fails as for an unknown slug.
Storefront SDK Usage
SDK Method: sdk.payments.listPaymentMethods()
Example:
const { data, error } = await sdk.payments.listPaymentMethods({
payment_method_type: "card",
payment_provider_slug: "payu"
});
if (error) {
console.error("Failed to list payment methods:", error.message);
} else {
console.log("Payment methods:", data.payment_methods);
data.payment_methods?.forEach(method => {
console.log("Payment method:", method.name);
console.log("Provider:", method.payment_provider_slug);
});
}TypeScript Definition
"list-payment-methods": {
parameters: {
query?: {
/** @description Selects mandate-capable details for providers that offer them. Other payment methods remain in the list. */
emandate_payment_methods?: boolean;
/** @description Filter by payment method type. Values are case-insensitive. */
payment_method_type?: "card" | "upi" | "netbanking" | "wallet" | "manual" | "bank-transfer" | "nach";
/** @description Payment provider slug */
payment_provider_slug?: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
payment_methods: components["schemas"]["PaymentMethod"][];
};
};
};
};
/** @description `validation-error`: missing or invalid input or payment configuration. */
400: components["responses"]["BadRequest"];
401: components["responses"]["Unauthorized"];
403: components["responses"]["Forbidden"];
500: components["responses"]["InternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["PaymentMethod"] | PaymentMethod |
components["responses"]["BadRequest"] | BadRequest |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["InternalServerError"] | InternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
Parameters
- emandate_payment_methods (query): Selects mandate-capable details for providers that offer them. Other payment methods remain in the list.
- payment_method_type (query): Filter by payment method type. Values are case-insensitive.
- payment_provider_slug (query): Payment provider slug
Responses
200
OK
400
Bad request
401
Authentication failed. Codes include token-required, token-expired and token_not_valid for an invalid or expired token.
403
Access denied. token-required requires an authenticated session; permission-denied means the caller cannot access this resource. On POS, session-expired requires signing in again.
500
The request failed because of an unexpected error.
504
The request timed out.
OpenAPI Definition
{
"tags": [
"Payments"
],
"operationId": "list-payment-methods",
"summary": "List payment methods",
"description": "Lists the payment methods the store offers on the sales channel of the caller's token: its connected payment gateways (`auto`) and active manual methods (`manual`). A method the store offers only on other channels is left out, and asking for it by `payment_provider_slug` fails as for an unknown slug.",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/operations/list-payment-methods",
"description": "API reference for the list-payment-methods operation"
},
"parameters": [
{
"name": "emandate_payment_methods",
"in": "query",
"description": "Selects mandate-capable details for providers that offer them. Other payment methods remain in the list.",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "payment_method_type",
"in": "query",
"description": "Filter by payment method type. Values are case-insensitive.",
"required": false,
"schema": {
"type": "string",
"enum": [
"card",
"upi",
"netbanking",
"wallet",
"manual",
"bank-transfer",
"nach"
]
}
},
{
"name": "payment_provider_slug",
"in": "query",
"description": "Payment provider slug",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success",
"content"
],
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"payment_methods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentMethod"
}
}
},
"required": [
"payment_methods"
],
"type": "object"
}
}
}
}
},
"links": {
"CreateOrder": {
"operationId": "create-order",
"description": "Create an order with a payment method. Use `payment_provider_slug` and a `gateway_reference_id` from `details[].supported_reference_ids[]` to construct the `payment_method` payload."
},
"GetCardInfo": {
"operationId": "get-card-info",
"description": "Look up card BIN info to validate card brand support before creating an order with a new card."
},
"VerifyVpa": {
"operationId": "verify-vpa",
"description": "Validate a UPI VPA before creating an order with UPI Collect."
}
}
},
"400": {
"description": "`validation-error`: missing or invalid input or payment configuration.",
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"security": [
{
"Authorization": []
}
],
"x-speakeasy-group": "payments",
"x-speakeasy-ignore": true,
"x-speakeasy-name-override": "listPaymentMethods"
}Auto-generated from OpenAPI spec and TypeScript definitions