Get Card Transactions

Method is used to retrieve credit card transactions that user has performed over a specific period of time from their bank account. The transaction list is unfiltered, meaning the response will contain all the transactions performed by the user (not just the transactions performed using your app).

Date range of the transactions that can be retrieved varies for each bank. The range supported by the users bank is shown in the response parameter transactionRange of Get Accounts Metadata endpoint.

👍

Pre-Requirement

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/transactions/get

Headers

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

Body Parameters

ParameterTypeDescription
appSecret
REQUIRED
StringPrivate token generated at application creation.
userSecret
REQUIRED
StringEncrypted version of the userKey.
cardID
REQUIRED
StringAn identifier for a bank account the user has. Obtained from the Get Cards ]endpoint.
toDate
REQUIRED
StringDate to end transactions on.
Format as “YYYY-MM-DD”.
fromDate
REQUIRED
StringDate to start transactions from. Format as “YYYY-MM-DD”.
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": "t1fcWW3IXbzsMYdMNlr6m6E6N75WFcaaVjsMiqUieBnbmGUoUJv5O/0Zy2WwwiNKUPGmIUTa64QIxmIkG/CjIfOSe5H0ZY7XMRwNao/qqDUIlY//viU2eAyihm4x5bkiwzQ2/pg7TaQatGLv/bX0oBCOmNNf2teoT8fIHHcfVzhZCyfsWoqrA8wM0tD0UgybqK/QQcfos589TpIZ9M32Ibm0loupK8y+xWVoBE88FTp2ovqoGF0jvR39oy9FL/P3lVNWxsd/r9fGq2zn9DeUjZKRlhYeudHxDlyQbyfYQUzusY8pS1I34Yt4GMwICQbKxZINO4nkcgajlbt8/Iykkq7cEOywiOAMsjQ0pmf6SN+wn2m42FWknIzwSA7enMJn3DoPrtCzZq99E04m2Y5YRhJ2glUlbZ+4SQPlskzoOkmV6kOumBl3cEIEV0Q0NIGyA6gvBumEMJBrk7SpL27HVoFvMAdsAHtxz8PejXg1hNgxuBIFocsJeOZNq5dXALAMZzUDUl5/SlCMWms3tlUPusrWKjkKr7eOQ/HpXlauluGGq5NN03cLBaGinyVBmGWiDqgJi6IzLYrrmeB1QJzYOCg+e/JFQ54/EwfaMTB7vupkIpkHmKlu2SP83RwQ3ZMsnr+Nvun32sAKCBHB70Jq2+0WWCFUzTHZ3QIBeb/LRwg=",
    "fromDate": "2020-02-01",
    "toDate": "2020-04-30",
    "cardID": "ntV7rbYoexYaGDRfLCAo8vw1xXgu2VaXXtqvNoMU0sfy6aNErfUEGMD+P6lAlkzu/GKxPeoef7d7eNoxlHKyRw=="
}

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.
statusEnumOperation status.

done - Operation Completed

failed - Operation Failed

user_input_required - Pending User Input

initialized - Operation In Progress

*For further explanation see Operation Statuses
transactionsArray<Transaction>Array containing the transactional data for the specified period.
timestampNumberTimestamp of the operation.
Is returned only in case of failure
msgStringDescriptive message returned only in case of failure
typeEnumType of error encountered

Is only returned if the request was not successful

Transaction schema

ParameterTypeDescription
afterAmountNumberCard balance after this transaction was executed.
beforeAmountNumberCard balance before the transaction was executed.
amountNumberTransaction amount.
dateDateTransaction timestamp as provided by the financial institution (in the financial institution's timezone).
descriptionStringTransaction description as provided by the financial institution.
detailsStringAny extra details provided by the financial institution.
typeEnumSpecifies if the transaction is debit or credit.

- debit

-credit
currencyObject<Currency>Object containing the transaction's currency information.

Currency schema

ParameterTypeDescription
codeStringISO 4217 code of the currency.
nameStringCurrency's full name.

Response Example

{
    "operationID": "e1303f1a-5146-4a91-99a6-1762726cea30",
    "success": true,
    "status": "done",
    "transactions": [
        {
            "afterAmount": null,
            "beforeAmount": null,
            "amount": 44.1,
            "currency": {
            "code": "AED",
            "name": "UNITED ARAB EMIRATES DIRHAM"
            },
            "date": "2020-03-12T19:04:11.000Z",
            "description": "POTATO STATION",
            "details": "Food and drink",
            "type": "debit"
        },
        {
            "afterAmount": null,
            "beforeAmount": null,
            "amount": 67.2,
            "currency": {
            "code": "AED",
            "name": "UNITED ARAB EMIRATES DIRHAM"
            },
            "date": "2020-03-12T19:02:47.000Z",
            "description": "POTATO STATION",
            "details": "Food and drink",
            "type": "debit"
                },
    ]
}

Successful Request / Response

Successful Request

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
    "userSecret": "t1fcWW3IXbzsMYdMNlr6m6E6N75WFcaaVjsMiqUieBnbmGUoUJv5O/0Zy2WwwiNKUPGmIUTa64QIxmIkG/CjIfOSe5H0ZY7XMRwNao/qqDUIlY//viU2eAyihm4x5bkiwzQ2/pg7TaQatGLv/bX0oBCOmNNf2teoT8fIHHcfVzhZCyfsWoqrA8wM0tD0UgybqK/QQcfos589TpIZ9M32Ibm0loupK8y+xWVoBE88FTp2ovqoGF0jvR39oy9FL/P3lVNWxsd/r9fGq2zn9DeUjZKRlhYeudHxDlyQbyfYQUzusY8pS1I34Yt4GMwICQbKxZINO4nkcgajlbt8/Iykkq7cEOywiOAMsjQ0pmf6SN+wn2m42FWknIzwSA7enMJn3DoPrtCzZq99E04m2Y5YRhJ2glUlbZ+4SQPlskzoOkmV6kOumBl3cEIEV0Q0NIGyA6gvBumEMJBrk7SpL27HVoFvMAdsAHtxz8PejXg1hNgxuBIFocsJeOZNq5dXALAMZzUDUl5/SlCMWms3tlUPusrWKjkKr7eOQ/HpXlauluGGq5NN03cLBaGinyVBmGWiDqgJi6IzLYrrmeB1QJzYOCg+e/JFQ54/EwfaMTB7vupkIpkHmKlu2SP83RwQ3ZMsnr+Nvun32sAKCBHB70Jq2+0WWCFUzTHZ3QIBeb/LRwg=",
    "fromDate": "2020-02-01",
    "toDate": "2020-04-30",
    "cardID": "ntV7rbYoexYaGDRfLCAo8vw1xXgu2VaXXtqvNoMU0sfy6aNErfUEGMD+P6lAlkzu/GKxPeoef7d7eNoxlHKyRw=="
}

Successful Response

{
    "operationID": "e1303f1a-5146-4a91-99a6-1762726cea30",
    "success": true,
    "status": "done",
    "transactions": [
        {
            "afterAmount": null,
            "beforeAmount": null,
            "amount": 44.1,
            "currency": {
            "code": "AED",
            "name": "UNITED ARAB EMIRATES DIRHAM"
            },
            "date": "2020-03-12T19:04:11.000Z",
            "description": "POTATO STATION",
            "details": "Food and drink",
            "type": "debit"
        },
        {
            "afterAmount": null,
            "beforeAmount": null,
            "amount": 67.2,
            "currency": {
            "code": "AED",
            "name": "UNITED ARAB EMIRATES DIRHAM"
            },
            "date": "2020-03-12T19:02:47.000Z",
            "description": "POTATO STATION",
            "details": "Food and drink",
            "type": "debit"
                },
    ]
}

Request / Response - When User Input Required

Request - When User Input Required

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
    "userSecret": "t1fcWW3IXbzsMYdMNlr6m6E6N75WFcaaVjsMiqUieBnbmGUoUJv5O/0Zy2WwwiNKUPGmIUTa64QIxmIkG/CjIfOSe5H0ZY7XMRwNao/qqDUIlY//viU2eAyihm4x5bkiwzQ2/pg7TaQatGLv/bX0oBCOmNNf2teoT8fIHHcfVzhZCyfsWoqrA8wM0tD0UgybqK/QQcfos589TpIZ9M32Ibm0loupK8y+xWVoBE88FTp2ovqoGF0jvR39oy9FL/P3lVNWxsd/r9fGq2zn9DeUjZKRlhYeudHxDlyQbyfYQUzusY8pS1I34Yt4GMwICQbKxZINO4nkcgajlbt8/Iykkq7cEOywiOAMsjQ0pmf6SN+wn2m42FWknIzwSA7enMJn3DoPrtCzZq99E04m2Y5YRhJ2glUlbZ+4SQPlskzoOkmV6kOumBl3cEIEV0Q0NIGyA6gvBumEMJBrk7SpL27HVoFvMAdsAHtxz8PejXg1hNgxuBIFocsJeOZNq5dXALAMZzUDUl5/SlCMWms3tlUPusrWKjkKr7eOQ/HpXlauluGGq5NN03cLBaGinyVBmGWiDqgJi6IzLYrrmeB1QJzYOCg+e/JFQ54/EwfaMTB7vupkIpkHmKlu2SP83RwQ3ZMsnr+Nvun32sAKCBHB70Jq2+0WWCFUzTHZ3QIBeb/LRwg=",
    "fromDate": "2020-02-01",
    "toDate": "2020-04-30",
    "cardID": "ntV7rbYoexYaGDRfLCAo8vw1xXgu2VaXXtqvNoMU0sfy6aNErfUEGMD+P6lAlkzu/GKxPeoef7d7eNoxlHKyRw=="
}

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 Date Format Is Specified

Failed Request - When Invalid Date Format Is Specified

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",
    "userSecret": "t1fcWW3IXbzsMYdMNlr6m6E6N75WFcaaVjsMiqUieBnbmGUoUJv5O/0Zy2WwwiNKUPGmIUTa64QIxmIkG/CjIfOSe5H0ZY7XMRwNao/qqDUIlY//viU2eAyihm4x5bkiwzQ2/pg7TaQatGLv/bX0oBCOmNNf2teoT8fIHHcfVzhZCyfsWoqrA8wM0tD0UgybqK/QQcfos589TpIZ9M32Ibm0loupK8y+xWVoBE88FTp2ovqoGF0jvR39oy9FL/P3lVNWxsd/r9fGq2zn9DeUjZKRlhYeudHxDlyQbyfYQUzusY8pS1I34Yt4GMwICQbKxZINO4nkcgajlbt8/Iykkq7cEOywiOAMsjQ0pmf6SN+wn2m42FWknIzwSA7enMJn3DoPrtCzZq99E04m2Y5YRhJ2glUlbZ+4SQPlskzoOkmV6kOumBl3cEIEV0Q0NIGyA6gvBumEMJBrk7SpL27HVoFvMAdsAHtxz8PejXg1hNgxuBIFocsJeOZNq5dXALAMZzUDUl5/SlCMWms3tlUPusrWKjkKr7eOQ/HpXlauluGGq5NN03cLBaGinyVBmGWiDqgJi6IzLYrrmeB1QJzYOCg+e/JFQ54/EwfaMTB7vupkIpkHmKlu2SP83RwQ3ZMsnr+Nvun32sAKCBHB70Jq2+0WWCFUzTHZ3QIBeb/LRwg=",
    "sync": true,
    "fromDate": "2020-22-01",
    "toDate": "2020-04-30",
    "cardID": "ntV7rbYoexYaGDRfLCAo8vw1xXgu2VaXXtqvNoMU0sfy6aNErfUEGMD+P6lAlkzu/GKxPeoef7d7eNoxlHKyRw=="
}

Failed Response - When Invalid Date Format Is Specified

{
  "operationID": "9631b8b4-79ab-4568-a462-cc530fb13eb1",
  "msg": "fromDate must be before toDate",
  "type": "INVALID_DATE_FORMAT",
  "success": false,
  "status": "failed"
}

Failed Request / Response - When Invalid AppSecret Is Specified

Failed Request - When Invalid AppSecret Is Specified

{
    "appSecret": "Invalid_app_secret",
    "userSecret": "t1fcWW3IXbzsMYdMNlr6m6E6N75WFcaaVjsMiqUieBnbmGUoUJv5O/0Zy2WwwiNKUPGmIUTa64QIxmIkG/CjIfOSe5H0ZY7XMRwNao/qqDUIlY//viU2eAyihm4x5bkiwzQ2/pg7TaQatGLv/bX0oBCOmNNf2teoT8fIHHcfVzhZCyfsWoqrA8wM0tD0UgybqK/QQcfos589TpIZ9M32Ibm0loupK8y+xWVoBE88FTp2ovqoGF0jvR39oy9FL/P3lVNWxsd/r9fGq2zn9DeUjZKRlhYeudHxDlyQbyfYQUzusY8pS1I34Yt4GMwICQbKxZINO4nkcgajlbt8/Iykkq7cEOywiOAMsjQ0pmf6SN+wn2m42FWknIzwSA7enMJn3DoPrtCzZq99E04m2Y5YRhJ2glUlbZ+4SQPlskzoOkmV6kOumBl3cEIEV0Q0NIGyA6gvBumEMJBrk7SpL27HVoFvMAdsAHtxz8PejXg1hNgxuBIFocsJeOZNq5dXALAMZzUDUl5/SlCMWms3tlUPusrWKjkKr7eOQ/HpXlauluGGq5NN03cLBaGinyVBmGWiDqgJi6IzLYrrmeB1QJzYOCg+e/JFQ54/EwfaMTB7vupkIpkHmKlu2SP83RwQ3ZMsnr+Nvun32sAKCBHB70Jq2+0WWCFUzTHZ3QIBeb/LRwg=",
    "sync": true,
    "fromDate": "20201-22-01",
    "toDate": "2020-04-30",
    "cardID": "ntV7rbYoexYaGDRfLCAo8vw1xXgu2VaXXtqvNoMU0sfy6aNErfUEGMD+P6lAlkzu/GKxPeoef7d7eNoxlHKyRw=="
}

Failed Response - When Invalid AppSecret Is Specified

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

📘

Note

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