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

Parameter

Required (Y/N)

Format/ Data Type

Pattern

Description

X-GD-RequestId

Yes

String

MaxLength:50

It is a unique transaction identifier that is generated by the retailer.

requestDateTime

Yes

DateTime

2023-08-08T12:34:56Z

Time 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

registerId

No

String

MaxLength: 20

Register where the transaction occurred.

userId

Yes

String

MaxLength:50

The unique ID of the user generating the transaction.

storeId

Yes

String

MaxLength: 20

The store number associated with the retailer that sold the package.
If not supplied, InvalidParameter (Code:100) error will be return.

merchantId

Yes

String

MaxLength: 20

Unique merchant Id. It is defined by Green Dot – Merchant corresponding with Retailer.

transactionId

Yes

String

MaxLength:50

The 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

Parameter

Required(Y/N)

Format/Data Type

Pattern

Description

requestId

Yes

String

MaxLength:50

The unique request ID from request.

responseId

Yes

String

MaxLength:50

The unique Response Identifier (generated by GreenDot).

responseDateTime

Yes

DateTime

2023-09-07T16:12:23.4541445+08:00

Time 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

responseCode

Yes

Numeric

MaxLength:4

Indicates success and failure of the response codes. It is in the numeric format.

responseDescription

Yes

String

MaxLength:255

Describes the Response Code in more detail. It is in the String format.

transactionInfo

No

object

{ 1, … }

Transaction information fetched from database. Null if no transaction has been found.

transactionId

Yes

String

MaxLength:50

The transaction id of the transaction that was retrieved.

transactionType

Yes

String

InitialLoad,
Reload,
Unload

Type of the transaction.

transactionStatus

Yes

String

Pending,
Posted,
Voided,
Failed

Status of the transaction.

transactionDate

Yes

DateTime

2023-11-08T22:15:00

Date and time that transaction performed. It’s equal to the requestDateTime in previous transaction request meta data payload.

transactionAmount

Yes

Decimal

500.00

Transaction amount of the transaction.

merchantCode

Yes

String

MaxLength: 20

Merchant code of the transaction. It’s equal to mechantId in transaction request meta data payload.

storeID

Yes

String

MaxLength: 20

storeId of the transaction.

userID

Yes

String

MaxLength: 50

userId of the transaction.

voidableCode

Yes

Number

0
841
842
843
844

Potential return values:
0 : Voidable
841: NotVoidableTransactionType
842: TransactionAlreadyVoided
843: TransactionAlreadyPosted
844: NotVoidableTransactionStatus

maskedAccountNumber

Yes

String

534456**7386

Masked account number.

Response Cases

Code

CodeText

Response Description

Explanation of the Response Code

0

Success

Success

Operation is finished successfully.

100

InvalidParameter

• 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.

130

InvalidMerchant

InvalidMerchant

MerchantId in request has not been found/enabled in the system.

800

InvalidStore

Store was not found

Store is not found; store is not for the partner or store does not support this operation.

861

RetailChainUserNotFound

User is not found.

UserID in request is not found in system.

862

RetailChainUserNotActive

User is not active.

UserId in request is not active.

840

TransactionNotFound

TransactionNotFound

Transaction is not found, and the his operation is is null.

1000

GeneralFailure

GeneralFailure

Service failure.