list-customer-cards
Method: GET
Path: /customers/{customer_id}/cards
Tags: Customers
Summary
List all saved cards
Description
Retrieve a list of saved payment cards for a given customer.
Storefront SDK Usage
SDK Method: sdk.customer.listCustomerCards()
Example:
typescript
const { data, error } = await sdk.customer.listCustomerCards({
customer_id: "customer_123"
});
if (error) {
console.error("Failed to list customer cards:", error);
return;
}
console.log("Customer cards:", data.cards);TypeScript Definition
typescript
"list-customer-cards": {
parameters: {
query?: never;
header?: never;
path: {
/** @description Customer Id */
customer_id: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
cards: components["schemas"]["JuspayCardDetail"][];
};
};
};
};
401: components["responses"]["Unauthorized"];
404: components["responses"]["NotFound"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["JuspayCardDetail"] | JuspayCardDetail |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["NotFound"] | NotFound |
Responses
200
OK
401
Not authorized for given operation on the Resource
404
Requested resource not found
OpenAPI Definition
json
{
"tags": [
"Customers"
],
"operationId": "list-customer-cards",
"summary": "List all saved cards",
"description": "Retrieve a list of saved payment cards for a given customer.",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/operations/list-customer-cards",
"description": "API reference for the list-customer-cards operation"
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success",
"content"
],
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"cards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/JuspayCardDetail"
}
}
},
"required": [
"cards"
],
"type": "object"
}
}
}
}
},
"links": {
"CreateOrderWithSavedCard": {
"operationId": "create-order",
"description": "Create an order using a saved card. Use `card_token` from a `JuspayCardDetail` as part of a `JusPaySavedCardToken` payment method payload."
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
},
"security": [
{
"Authorization": []
}
],
"x-speakeasy-group": "customers",
"x-speakeasy-ignore": false,
"x-speakeasy-name-override": "listCustomerCards"
}Auto-generated from OpenAPI spec and TypeScript definitions