Get Transaction History

GetTransactionHistory API Method

This operation is used to get transaction history of the card.

📘

Every request triggered should have a unique X-GD-RequestId value in the header.

Syntax

POST {baseUrl}/card/transaction-history

Example Request

Success Request

POST {baseUrl}/card/transaction-history
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
    "metadata": {
        "merchantId": "fscc0342",
        "registerId": "01",
        "requestDateTime": "2023-10-31T08:07:36Z",
        "storeId": "CC970",
        "userId": "[email protected]"
    },
 "startDate": "2023-01-30",
  "endDate": "2023-10-31",
  "accountNumber": "",
  "accountIdentifier": "06e33e98-5c40-4c1a-967b-930f28f509a4"
}

Negative Request:

POST {baseUrl}/card/transaction-history
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
    "metadata": {
        "merchantId": "fscc0342",
        "registerId": "01",
        "requestDateTime": "2023-10-31T08:10:23Z",
        "storeId": "CC970",
        "userId": "[email protected]"
    },
  "startDate": "2023-01-30T06:27:09Z",
  "endDate": "2023-10-31T06:27:09Z",
  "accountNumber": "",
  "accountIdentifier": "88e33e98-5c40-4c1a-967b-930f28f509a4"
}

Request Parameters

ParameterRequired (Y/N)Format/ Data TypePatternDescription
X-GD-RequestIdYesStringMaxLength:50It is a unique transaction identifier that is generated by the retailer.
requestDateTimeYesDateTime2023-08-08T12:34:56ZTime stamp at which transaction occurred.
The time stamp has to be in UTC time zone and follow the following date and time formats:
• YYYY-MM-DDTHH:mm:ssZ
registerIdNoStringMaxLength: 20Register where the transaction occurred.
userIdYesStringMaxLength:50The unique ID of the user generating the transaction.
If not supplied, InvalidParameter (Code:100) error will be return.
storeIdYesStringMaxLength: 20The store number associated with the retailer that sold the package.
If not supplied, InvalidParameter (Code:100) error will be return.
merchantIdYesStringMaxLength: 20Unique merchant Id. It is defined by Green Dot – Merchant corresponding with Retailer.
If not supplied, InvalidParameter (Code:100) error will be return.
accountNumberNoString16 digits PAN16 digits number.
For Insight partners, it can pass in registration id instead of PAN.
Either of AccountNumber / AccountIdentifier required.
startDateYesDate2023-01-01The start UTC date of transaction history.
endDateYesDate2023-10-10The end UTC date of transaction history.
accountIdentifierNoStringe5843e05-d367-4bf1-a223-3af46ae18802 Newly created unique identifier for sale card, should be using for all subsequent API calls.

Either of AccountNumber / AccountIdentifier required

Example Response

Success Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: ca42d529-6459-440f-84a9-acb909af9dda
X-GD-ResponseCode: 0

{
    "beginningBalance": 0.0000,
    "endingBalance": 70.2500,
    "transactions": [
        {
            "transactionIdentifier": "99f21446-395a-99bd-4614-f2995a39bd99",
            "transactionType": "Swipe Reload",
            "transactionStatus": "completed",
            "authorizationDate": null,
            "authorizationAmount": 50.0000,
            "category": null,
            "merchantID": ”CC970”,
            "merchantName": ”ABC Financial”,
            "merchantCity": null,
            "merchantState": null,
            "merchantZipCode": null,
            "merchantCategory": null,
            "mCCCode": null,
            "runningBalance": 70.2500,
            "creditPosted": 50.0000,
            "debitPosted": 0.0,
            "transactionDescription": null,
            "transactionCode": "0548",
            "postedDate": "2023-09-28T16:24:22.279263+00:00",
            "declinedCode": null,
            "declinedCodeDescription": null,
            "declineReasonDescription": null
        },
        {
            "transactionIdentifier": "62af30f2-02a4-6714-f230-af62a4021467",
            "transactionType": "Swipe Reload",
            "transactionStatus": "completed",
            "authorizationDate": null,
            "authorizationAmount": 20.2500,
            "category": null,
            "merchantID": ”abctest001”,
            "merchantName": ”ABC Test Store 001”,
            "merchantCity": ”Woodward”,
            "merchantState": ”IA”,
            "merchantZipCode": null,
            "merchantCategory": null,
            "mCCCode": null,
            "runningBalance": 20.2500,
            "creditPosted": 20.2500,
            "debitPosted": 0.0,
            "transactionDescription": null,
            "transactionCode": "0548",
            "postedDate": "2023-09-26T07:50:28.536644+00:00",
            "declinedCode": null,
            "declinedCodeDescription": null,
            "declineReasonDescription": null
        }
    ],
    "metadata": {
        "requestId": "test101",
        "responseId": "ca42d529-6459-440f-84a9-acb909af9dda",
        "responseDateTime": "2023-10-31T08:07:38.9765093Z",
        "responseCode": 0,
        "responseDescription": "Success"
    }
}

Negative Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: 1f81b469-a49d-4c73-8534-e1fd254bbaf4
X-GD-ResponseCode: 600

{
    "beginningBalance": 0.0,
    "endingBalance": 0.0,
    "transactions": null,   
    "metadata": {
     "requestId": "test101",
     "responseId": "1f81b469-a49d-4c73-8534-e1fd254bbaf4",
     "responseDateTime": " 2023-10-31T08:10:25.0819427Z",
     "responseCode": 600,
     "responseDescription": "Account not found"
    }
}

Response Parameters

ParameterFormat/Data TypePatternDescription
requestIdStringMaxLength:50The unique request ID generated from the request.
responseIdStringMaxLength:50The unique Response Identifier (generated by GreenDot).
responseDateTimeDateTime2023-09-07T16:12:23.4541445+08:00Time stamp at which transaction occurred.
The time stamp is in UTC time zone and follow the following date and time formats:
• YYYY-MM-DDTHh:mm:ssfffffffK
responseCodeNumericMaxLength:4Indicates success and failure of the response codes. It is in the numeric format.
responseDescriptionStringMaxLength:255Describes the Response Code in more detail. It is in the String format.
beginningBalanceDecimal100.86Beginning balance of the card. Will be 0.0 if basic validation fails or no transaction found.
endingBalanceDecimal968.77Ending balance of the card. Will be 0.0 if it fails request validation or no transaction found.
transactionsArray{ 1, … }The collection of transactions. Will be null if there’s no data.
transactionIdentifierStringf694f421-5028-41f2-81f9-22bf1dd93e4fNewly created unique identifier for transaction.
transactionTypeString"Swipe Reload"Transaction type.
transactionStatusString"completed"
"reversed"
"declined"
"pending"
Transaction Status (completed, reversed, declined or pending).
authorizationDateDateTime2023-10-31T07:15:25.0003+00:00Authorization Date.
authorizationAmountDecimal11.0000Authorization Amount.
categoryString"Financial institutions - automated cash disbursements"Category.
merchantIDString"123456789000000"Merchant ID.
merchantNameString"MSR MERCHANT"Merchant Name.
merchantCityString"CHICAGO"Merchant City.
merchantStateString"IL"Merchant State.
merchantZipCodeString"60131"Merchant ZipCode.
merchantCategoryString"Miscellaneous Stores"Merchant Category.
mCCCodeString"5999"MCC Code.
runningBalanceDecimal0.0Running Balance.
creditPostedDecimal0.0Credit Posted.
debitPostedDecimal11.0000Debit Posted.
transactionDescriptionStringTransaction Description.
transactionCodeString"2202"Transaction Code.
postedDateDateTime"2023-10-31T07:15:25.0003+00:00"Posted Date.
declinedCodeString"2031"Declined Code.
declinedCodeDescriptionString"NUMBER OF TIMES USED LIMIT EXCEEDED"Declined Code Description.
declineReasonDescriptionString"NUMBER OF TIMES USED LIMIT EXCEEDED"Decline Reason Description.

Response Cases

CodeCodeTextResponseDescriptionDescription
0Success• Success
• No transactions found
Success.
100InvalidParameter• Invalid Date
• The EndDate field is required.
• The StartDate field is required.
• Either AccountNumber or AccountIdentifier is required
• RequestId is required
• StoreId is required
• MerchantId is required
• UserId is required
• RequestDateTime is required
• RequestId is too long
• UserId is too long
• StoreId is too long
• MerchantId is too long
• Invalid length of AccountNumber
Invalid parameter in the request. Examples: MerchantID is required, StoreID is required,
StartDate > EndDate.
130InvalidMerchantInvalidMerchantMerchantId in request has not been found/enabled in the system.
800InvalidStoreStore was not foundStore is not found; store is not for the partner.
861RetailChainUserNotFoundUser is not found.UserID in request is not found in system.
862RetailChainUserNotActiveUser is not active.UserId in request is not active.
110InvalidAccountNumberThis account is closedInvalid accountNumber provided. If account is closed, customer can not trieve account history.
600UnableToProcessRequest• Start date or End date not formatted correctly
• Account not found
Error when retrieving records in downstream.
1000GeneralFailureGeneralFailureService failure.