Get Saved Credit Cards
Retrieves all saved credit cards for a specific user, including card details such as last four digits, card type, and preferred status. This allows users to view and manage their saved payment methods.
- Type: stringx
-application Source requiredA custom HTTP header that accepts a free-form string value. It is used to identify the application making the API request. For example, if Punchh invokes the API, the value could be "punchh".
- Type: stringX
- Location Id requiredThe unique location identifier for the store or business location processing the transaction.
- Type: stringContent
- Type requiredThe media type of the request body. Must be set to
application/json. - Type: stringAuthorizationrequired
Bearer token for API authorization. Send in the format:
Bearer ACCESS_TOKEN_GOES_HERE.
Request body containing the userId.
- Type: stringuser
Id The unique identifier of the user in your system whose saved cards are to be retrieved.
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.partech.com/creditcard/v1/creditcards \
--header 'x-applicationSource: ' \
--header 'X-LocationId: ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--data '{
"userId": "USER_ID_GOES_HERE"
}'
{
"recordCount": 2,
"data": [
{
"id": "cc-1a2b3c4d",
"paymentMethodToken": "tok_4f8a2b1c9d3e",
"lastFourDigits": "1111",
"cardType": "Visa",
"expireMonth": 10,
"expireYear": 2027,
"cardHolderName": "John Doe",
"maskedCardNumber": "****1111",
"isPreferred": true,
"paymentType": "Credit"
},
{
"id": "cc-5e6f7g8h",
"paymentMethodToken": "tok_7b3c8d2e1f4a",
"lastFourDigits": "4242",
"cardType": "Mastercard",
"expireMonth": 6,
"expireYear": 2028,
"cardHolderName": "John Doe",
"maskedCardNumber": "****4242",
"isPreferred": false,
"paymentType": "Credit"
}
],
"errors": null,
"traceId": "00-abcdef1234567890-abcdef12-01",
"statusCode": 200
}