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.

Headers
  • x-applicationSource
    Type: string
    required

    A 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".

  • X-LocationId
    Type: string
    required

    The unique location identifier for the store or business location processing the transaction.

  • Content-Type
    Type: string
    required

    The media type of the request body. Must be set to application/json.

  • Authorization
    Type: string
    required

    Bearer token for API authorization. Send in the format: Bearer ACCESS_TOKEN_GOES_HERE.

Body
application/json

Request body containing the userId.

  • userId
    Type: string

    The unique identifier of the user in your system whose saved cards are to be retrieved.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/creditcard/v1/creditcards
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
}