pos-get-card-info
Method: GET
Path: /pos/payments/card-info
Tags: Payments
Summary
Get card information
Description
Retrieve card information based on the initial 9 digits (card BIN) of the card number.
Pos SDK Usage
SDK Method: pos.getCardInfo()
Example:
typescript
const { data, error } = await pos.getCardInfo({ card_number: "411111" });
if (error) {
console.error("Card lookup failed:", error.message);
} else {
console.log(`${data.card_brand} ${data.card_type}`);
}TypeScript Definition
typescript
"pos-get-card-info": {
parameters: {
query: {
/** @description Initial 9 digits of card number (card BIN) */
cardbin: 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: {
card_info: components["schemas"]["CardbinInfo"];
};
};
};
};
400: components["responses"]["BadRequest"];
401: components["responses"]["Unauthorized"];
404: components["responses"]["NotFound"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["CardbinInfo"] | CardbinInfo |
components["responses"]["BadRequest"] | BadRequest |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["NotFound"] | NotFound |
Parameters
- cardbin (query): Initial 9 digits of card number (card BIN)
Responses
200
OK
400
Bad request
401
Not authorized for given operation on the Resource
404
Requested resource not found
OpenAPI Definition
json
{
"operationId": "pos-get-card-info",
"summary": "Get card information",
"description": "Retrieve card information based on the initial 9 digits (card BIN) of the card number.",
"parameters": [
{
"name": "cardbin",
"in": "query",
"description": "Initial 9 digits of card number (card BIN)",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"card_info": {
"$ref": "#/components/schemas/CardbinInfo"
}
},
"required": [
"card_info"
],
"type": "object"
}
},
"required": [
"message",
"success",
"content"
]
}
}
},
"links": {
"CreateOrderWithCard": {
"operationId": "create-pos-order",
"description": "Create a POS order from a cart."
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
},
"security": [
{
"Authorization": []
}
],
"tags": [
"Payments"
],
"x-speakeasy-group": "pos",
"x-speakeasy-name-override": "getCardInfo"
}Auto-generated from OpenAPI spec and TypeScript definitions