Changelog

Method is used to retrieve list of all the credit cards registered on the user. The list will contain all credit cards

👍

Pre-Conditions

You have obtained user's permanent access token from Exchange Token endpoint

To read more about authentication process and access token please refer to Authentication Documentation

Request

https://api.dapi.com/v2/data/cards/get

Headers

ParameterTypeDescription
Authorization
REQUIRED
StringSet type to bearer token and the value to the accessToken obtained using the Exchange Token
request.

Body Parameter

ParameterTypeDescription
appSecret
REQUIRED
StringPrivate token generated at application creation.
userSecret
REQUIRED
StringEncrypted version of the userKey.
userInputs
OPTIONAL
Array<userInputs>Array of UserInputs object, required only if initial request responded with user inputs specification.

You can read more about user inputs specification on Specify User Input

Request Example

{
	"appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
	"userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY="
}

Response

📘

Note

Your responses may differ from those listed below on a case-by-case basis.

ParameterTypeDescription
operationIDStringUnique ID generated to identify a specific operation.
successBooleanReturns true if request is successful and false for all else.
statusEnumThe status of the job.

done - Operation Completed

failed - Operation Failed

user_input_required - Pending User Input

initialized - Operation In Progress

*For further explanation see Operation Statuses
cardsArray<Card>An array containing the cards data of the user.

Is only returned if request was successful
typeEnumType of error encountered

Is only returned if the request was not successful
msgStringDetailed description of the error

Is only returned if the request was not successful

Account Schema

📘

Note

Routing Number object is only returned for USA banks. For all other banks it will not be provided

ParameterTypeDescription
creditLimitnumber The card's credit limit as provided by the financial institution.
cardNumberStringThe card's number as provided by the financial institution.
expiryDateDateThe expiry date of the credit card as provided by the financial institution
nameStringThe card's name.
statusEnumThe status of the card whether its active, blocked or disabled
idStringThe card's unique identifier.
currencyObject<Currency>An object containing the card's currency information.
typeStringThe account type is set to credit for this

Currency Schema

ParameterTypeDescription
codeStringThe ISO 4217 code of the currency.
nameStringThe full name of the currency.

Card Status Schema

ParameterTypeDescription
blockedStringThe card is blocked.
activeStringThe card is active.
disabledStringThe card is disabled.

Response Example

{
  "operationID": "9802b235-013f-45c9-a902-a40f4c811b00",
  "status": "done",
  "success": true,
  "cards": [
        {
            "amountDue": 1856,
            "cardNumber": "XXXXXXXXXXXX7740",
            "creditLimit": 15000,
            "currency": {
                "code": "AED",
                "name": "UNITED ARAB EMIRATES DIRHAM"
            },
            "dueDate": "2021-06-04T00:00:00.000Z",
            "expiryDate": "2025-05-31T00:00:00.000Z",
            "id": "bAnHdRND1mqR9b4WNothdcc2fbnjzfgDFKsnvVtYltpcVWoP+MNlaE2+eqOfUDXVwQKD4nKIJOPwTRApYJZHFQ==",
            "name": "BASIC CREDIT",
            "status": "active",
            "type": "credit"
        },
        {
            "cardNumber": "XXXXXXXXXXXX4573",
            "creditLimit": 15000,
            "currency": {
                "code": "AED",
                "name": "UNITED ARAB EMIRATES DIRHAM"
            },
            "expiryDate": "2025-05-31T00:00:00.000Z",
            "id": "ZO+2PLOpJ1TaNxjxQh8ZFjMXvJX7IdHvP4/USrpKoZZjnQN0Yy9wgRoYmngysisQE66WryXOaGqzCNHBDVqCNw==",
            "name": "BASIC CREDIT",
            "status": "active",
            "type": "credit"
        }
    ]}

Successful Request/Response

Successful Request

{
	"appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
	"userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY="
}

Successful Response

{
  "operationID": "b43adac4-392e-4bfd-9782-69ba7d7c84fe",
  "success": true,
  "status": "done",
  "cards": [
        {
            "amountDue": 1856,
            "cardNumber": "XXXXXXXXXXXX7740",
            "creditLimit": 15000,
            "currency": {
                "code": "AED",
                "name": "UNITED ARAB EMIRATES DIRHAM"
            },
            "dueDate": "2021-06-04T00:00:00.000Z",
            "expiryDate": "2025-05-31T00:00:00.000Z",
            "id": "bAnHdRND1mqR9b4WNothdcc2fbnjzfgDFKsnvVtYltpcVWoP+MNlaE2+eqOfUDXVwQKD4nKIJOPwTRApYJZHFQ==",
            "name": "BASIC CREDIT",
            "status": "active",
            "type": "credit"
        },
        {
            "cardNumber": "XXXXXXXXXXXX4573",
            "creditLimit": 15000,
            "currency": {
                "code": "AED",
                "name": "UNITED ARAB EMIRATES DIRHAM"
            },
            "expiryDate": "2025-05-31T00:00:00.000Z",
            "id": "ZO+2PLOpJ1TaNxjxQh8ZFjMXvJX7IdHvP4/USrpKoZZjnQN0Yy9wgRoYmngysisQE66WryXOaGqzCNHBDVqCNw==",
            "name": "BASIC CREDIT",
            "status": "active",
            "type": "credit"
        }
    ]
}

Successful Request / Response - When User Input Required

Successful Request - When User Input Is Required

{
	"appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
	"userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY="
}

Successful Response - When User Input Is Required

{
    "operationID": "47204fa6-dca6-44a5-8111-6c6489a232a2",
    "success": true,
    "status": "user_input_required",
   "userInputs": [
    {
      "answer": "",
      "id": "otp",
      "index": 0,
      "query": "Please enter a Smart Pass Token from your ENBD mobile application"
    }
    ]
}

Failed Request / Response - When Invalid JSON Is Provided

Failed Request - When Invalid JSON Is Provided

{
	"appSecret": invalid json
	"userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY="
}

Failed Response - When Invalid JSON Is Provided

{
  "msg": "Invalid JSON request",
  "type": "BAD_REQUEST",
  "success": false,
  "status": "failed"
}

Failed Request / Response - When Invalid Token Is Provided

Failed Request - When Invalid Token Is Provided

{
	"appSecret": "invalid_key",
	"userSecret": "DSv56dS/PB7QGJI/IGX4qKDhGVhIvQQhWo4zxTDT0gn079JlHnUSSq8NAtavX4fpHj7PGQ74BzVXBO9pFHXdSeLCMnayKLTLD0+zmMu7wfGzy+ZhkYTBe040CXWQ+AYaPhGTzfVWu3Lz6oM2QnqM9X56BbvpC80tN8Zg72VJHWC6YjazdQQ2NK0pl9+ePbmqn7PNjFKLhipgpTl7Hw3kvnLrSIC9AcXzVYQeSWYAv3LAEbECB1aNLXC0glMG2W7L2iLTMwy54wHbXXfSQlK9S6X7wmnZ0tn28H0MwMqWdLLtxvcFyYlMr3E0hqYnK4a5sU0IvF1yJAMHMBCbjw2Trnx2VMuX5IWjdxScfh+8IxWGvKl6RypksJTyNg100H+Q+j0vfKW/bOijFolZgHJtAxUowPlewK9JwoWahkbX2KTGoqQbSCh6KSzaCxdbg7ykNI5n+m6vdoWzGfZGFYjfgMX6aMInAM3b32ZAp9DlfFxRkg3oeoLBuTGTz73E51bZj9mGgD0FxkIXFPIWGx0WyxoYpMEesJeT8phNy0G82Bd7qzWCPGP4gK70jGpqfCWsvj1XZKMMMjReCdUrhtXKB4spQIFi+63WcGV7vDyWQdUTINOhmR8QfZOJoVm+VZgFiqCLI3Aa8AnoYw3UIPiheVjE5lxMulPNIP0QGMR31VY="
}

Failed Response - When Invalid Token Is Provided

{
  "msg": "Invalid access token",
  "type": "UNAUTHORIZED",
  "success": false,
  "status": "failed"
}

📘

Note

For more information and detailed breakdown of possible errors, please see Errors.