KashierDevelopersKashier Developers

Retrieve tokens

curl -X GET "https://test-fep.kashier.io/v3/cards/customer?customerReference=string&merchantId=string" \  -H "Kashier-Hash: string"
{  "status": "SUCCESS",  "messages": {    "en": "Card tokens retrieved successfully",    "ar": "Card tokens retrieved successfully"  },  "response": {    "paymentMethods": [      {        "type": "CARD",        "card": {          "expiry": {            "month": "06",            "year": "25"          },          "number": "5123********0008",          "nameOnCard": "John Doe",          "cardToken": "7a5e3c72-61d9-4ebf-88b9-27dc0f77b638"        },        "customer": {          "reference": "01163550555"        }      },      {        "type": "CARD",        "card": {          "expiry": {            "month": "12",            "year": "25"          },          "number": "5123********2346",          "nameOnCard": "Mohamed Khaled",          "cardToken": "9d8332cb-6195-40ea-aed0-86c3aa60fbaa"        },        "customer": {          "reference": "01163550555",          "customerIp": ""        }      },      {        "type": "CARD",        "card": {          "expiry": {            "month": "12",            "year": "25"          },          "number": "5506********0305",          "nameOnCard": "Mohamed Khaled",          "cardToken": "886f122a-2d9e-4a35-8be8-79fdd88b9ffd"        },        "customer": {          "reference": "01163550555"        }      },      {        "type": "CARD",        "card": {          "expiry": {            "month": "12",            "year": "25"          },          "number": "5506********0347",          "nameOnCard": "Hossam El-Kassas",          "cardToken": "a6791b9e-78ea-46e0-bc51-bef7d85b8c28"        },        "customer": {          "reference": "01163550555"        }      }    ]  }}

Retrieves a customer's saved card tokens and info. The request is validated with a Kashier-Hash header — an HMAC SHA256 of the path /?tokenization={mid}.{customerReference} keyed with your Payment API Key (not the Secret Key). Use only those parameters in the hash creation; don't add extra parameters. A customer with no saved card returns 400 with "There are no cards with this token" — an empty result, not an auth failure.

Query Parameters

customerReference*string

your customer Id

merchantId*string

your merchant Id

Header Parameters

Kashier-Hash*string

Order hash generated from your backend using the HMAC SHA256 crypto mechanism, as described in the Kashier hashing documentation.

Response Body

application/json

application/json

application/json

GET
/v3/cards/customer