curl -X GET 'https://api.weir.ai/org/cards' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"cards": [
{
"cardId": "card_123456789",
"last4": "4242",
"brand": "Visa",
"expiryMonth": 12,
"expiryYear": 2025,
"isDefault": true,
"createdAt": "2024-01-01T00:00:00Z"
}
]
},
"message": "Cards retrieved successfully",
"status": "success"
}
Retrieve organization payment cards
curl -X GET 'https://api.weir.ai/org/cards' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"cards": [
{
"cardId": "card_123456789",
"last4": "4242",
"brand": "Visa",
"expiryMonth": 12,
"expiryYear": 2025,
"isDefault": true,
"createdAt": "2024-01-01T00:00:00Z"
}
]
},
"message": "Cards retrieved successfully",
"status": "success"
}
curl -X GET 'https://api.weir.ai/org/cards' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console'
{
"data": {
"cards": [
{
"cardId": "card_123456789",
"last4": "4242",
"brand": "Visa",
"expiryMonth": 12,
"expiryYear": 2025,
"isDefault": true,
"createdAt": "2024-01-01T00:00:00Z"
}
]
},
"message": "Cards retrieved successfully",
"status": "success"
}
const getCards = async (accessToken) => {
const response = await fetch('https://api.weir.ai/org/cards', {
headers: {
'Authorization': `Bearer ${accessToken}`,
'x-source': 'console'
}
});
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
return await response.json();
};
Was this page helpful?