Get Transaction Info

GetTransactionInfo API Method

This operation is to retrieve the transaction information using the “RequestID” as the TransactionID sent in a Reload or Unload request. It will only return transaction info within the last 12 hours.

Note: The transaction info contains a field named [VoidableCode], it indicates if the transaction can be voided or not at that time.

📘

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

Syntax

POST {baseUrl}/transaction/information 

Example Request

Success Request

POST {baseUrl}/transaction/information 
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
    "metadata": {
        "merchantId": "fscc0342",
        "registerId": "01",
        "requestDateTime": "2023-11-09T05:46:38Z",
        "storeId": "CC970",
        "userId": "[email protected]"
    },
  "transactionId": "202311082215000929" 
}

Negative Request

POST {baseUrl}/transaction/information 
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
    "metadata": {
        "merchantId": "fscc0342",
        "registerId": "01",
        "requestDateTime": "2023-11-09T05:50:33Z",
        "storeId": "CC970",
        "userId": "[email protected]"
    },
  "transactionId": "12345654321"
}

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.
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.
transactionIdYesStringMaxLength:50The transaction id of the transaction info that needs to be retrieved. This is the same value as X-GD-RequestId passed in the transaction that you would like to search.

Example Response

Success Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: 53af721a-9ff2-4ee3-b74d-b6b1282e17a1
X-GD-ResponseCode: 0

{
    "transactionInfo": {
        "transactionId": "202311082215000929",
        "transactionType": "Unload",
        "transactionStatus": "Posted",
        "transactionDate": "2023-11-08T22:15:00",
        "transactionAmount": 16.1300,
        "merchantCode": "fscc0342",
        "storeID": "Store1",
        "userID": "[email protected]",
        "voidableCode": 841,
        "maskedAccountNumber": "534456******6246"
},    
"metadata": {
        "requestId": "test101",
        "responseId": "53af721a-9ff2-4ee3-b74d-b6b1282e17a1",
        "responseDateTime": "2023-11-09T05:46:40.6804659Z",
        "responseCode": 0,
        "responseDescription": "Success"
    } }

Negative Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: be16db75-a51e-4e27-abbe-3bfb16d7154b
X-GD-ResponseCode: 840

{
    "transactionInfo": null,
    "metadata": {
        "requestId": "test101",
        "responseId": "be16db75-a51e-4e27-abbe-3bfb16d7154b",
        "responseDateTime": "2023-11-09T05:50:35.1560348Z",
        "responseCode": 840,
        "responseDescription": "TransactionNotFound"
}
}

Response Parameters

ParameterRequired(Y/N)Format/Data TypePatternDescription
requestIdYesStringMaxLength:50The unique request ID from request.
responseIdYesStringMaxLength:50The unique Response Identifier (generated by GreenDot).
responseDateTimeYesDateTime2023-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
responseCodeYesNumericMaxLength:4Indicates success and failure of the response codes. It is in the numeric format.
responseDescriptionYesStringMaxLength:255Describes the Response Code in more detail. It is in the String format.
transactionInfoNoobject{ 1, … }Transaction information fetched from database. Null if no transaction has been found.
transactionIdYesStringMaxLength:50The transaction id of the transaction that was retrieved.
transactionTypeYesStringInitialLoad,
Reload,
Unload
Type of the transaction.
transactionStatusYesStringPending,
Posted,
Voided,
Failed
Status of the transaction.
transactionDateYesDateTime2023-11-08T22:15:00Date and time that transaction performed. It’s equal to the requestDateTime in previous transaction request meta data payload.
transactionAmountYesDecimal500.00Transaction amount of the transaction.
merchantCodeYesStringMaxLength: 20Merchant code of the transaction. It’s equal to mechantId in transaction request meta data payload.
storeIDYesStringMaxLength: 20storeId of the transaction.
userIDYesStringMaxLength: 50userId of the transaction.
voidableCodeYesNumber0
841
842
843
844
Potential return values:
0 : Voidable
841: NotVoidableTransactionType
842: TransactionAlreadyVoided
843: TransactionAlreadyPosted
844: NotVoidableTransactionStatus
maskedAccountNumberYesString534456**7386Masked account number.

Response Cases

CodeCodeTextResponse DescriptionExplanation of the Response Code
0SuccessSuccessOperation is finished successfully.
100InvalidParameter• The TransactionId field is required.
• MerchantId is required
• StoreId is required
• UserId is required
• RequestId is required
• RequestDateTime is required
• RequestId is too long
• UserId is too long
• StoreId is too long
• MerchantId is too long
Invalid parameter in the request. Examples: MerchantID not supplied, StoreID not supplied.
130InvalidMerchantInvalidMerchantMerchantId in request has not been found/enabled in the system.
800InvalidStoreStore was not foundStore is not found; store is not for the partner or store does not support this operation.
861RetailChainUserNotFoundUser is not found.UserID in request is not found in system.
862RetailChainUserNotActiveUser is not active.UserId in request is not active.
840TransactionNotFoundTransactionNotFoundTransaction is not found, and the [TransactionInfo] is null.
1000GeneralFailureGeneralFailureService failure.