Get EStatement Files

GetEStatementFiles API Method

This operation is used to get estatement pdf file by account.

📘

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

Syntax

POST {baseUrl}/estatement/getfiles

Example Request

Success Request

POST {baseUrl}/estatement/getfiles
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: 66219996371691

{
    "statementPeriods": [
        {
            "period": "202408"
        },
        {
            "period": "202407"
        },
        {
            "period": "202406"
        },
        {
            "period": "202405"
        },
        {
            "period": "202404"
        }
    ],
    "accountNumber": "",
    "accountIdentifier": "688A0885-67B0-4D01-8119-C1AA149C31C4",
    "metadata": {
        "storeId": "abc123",
        "merchantId": "FSCC0342",
        "userId": "TELLERIDWRUAQNIT",
        "requestDateTime": "2024-08-27T10:30:53",
        "registerId": ""
    }
}

Negative Request

POST {baseUrl}/estatement/getfiles
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: 66219996371691

{
	"accountNumber": "",
"accountIdentifier": "688A0885-67B0-4D01-8119-C1AA149C31C4",
"statementPeriods":[],
"metadata": 
{
    		"storeId": "abc123",
    		"merchantId": "FSCC0342",
        	"userId": "TELLERIDWRUAQNIT",
        	"requestDateTime": "2024-08-27T10:30:53",
        	"registerId": ""
  	}
}

Request Parameters

ParameterRequired (Y/N)Format/ Data TypePatternDescription
X-GD-RequestIdYesStringMaxLength:50It is a unique transaction identifier that is generated by the retailer.
requestDateTimeYesDateTime2024-08-13T12: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
userIdYesStringMaxLength:50The unique ID of the user generating the transaction.
storeIdYesStringMaxLength: 20The store number associated with the offline store of retailer.
If not supplied, InvalidParameter (Code:100) error will be return.
registerIdNoStringRegister where the transaction occurred.
merchantIdYesStringMaxLength: 20Unique merchant Id. It is defined by Green Dot – Merchant corresponding with Retailer.
accountNumberNoString16 digits PANAccount Number (PAN) of the card.
Note: Either AccountNumber or AccountIdentifier is required.
accountIdentifierNoGUIDe5843e05-d367-4bf1-a223-3af46ae18802Newly created unique identifier in sale card, should be using for all subsequent API calls. Either of AccountNumber / AccountIdentifier required.
statementPeriodsYesArrayThe StatementPeriods in charge of pass multiple period to call core api to get estatement pdf file.(duplicate period only return one file.)
periodString202407The period of selected billing cycle.

Example Response

Success Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: 66219996371691
X-GD-ResponseId: 0648d859-f7e3-4d51-a164-af4d2614dc90
X-GD-ResponseCode: 0
{
"metadata": {
"requestId": "66219996371691",
"responseId": "0648d859-f7e3-4d51-a164-af4d2614dc90",
"responseDateTime": "2024-08-27T10:30:56.884207Z",
"responseCode": 0,
"responseDescription": "Success"
},
"statementFiles"[{
          "period": "202408",
          "file": "JVBERi0xLjcKJe......NTU3NgolJUVPRgo"
          
},
{
          "period": "202407",
    "file": "JVBERi0xLjcKJe......E4CiUlRU9GCg=="
          
}, 
{
          "period": "202406",
          "file": "JVBERi0xLjcKJe......NTU3NgolJUVPRgo"
          
}, 
{
          "period": "202405",
          "file": "JVBERi0xLjcKJe......NTU3NgolJUVPRgo"
          
},
{
          "period": "202404",
          "file": "JVBERi0xLjcKJe......NTU3NgolJUVPRgo"
          
}

]
}

Negative Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: 66219996371691
X-GD-ResponseId: 160d9d1b-c528-425c-ad09-01ade5fb5fa9
X-GD-ResponseCode: 800
{
	"metadata": {
		"requestId": "66219996371691",
		"responseId": "160d9d1b-c528-425c-ad09-01ade5fb5fa9",
		"responseDateTime": "2024-08-27T10:30:56.884207Z",
		"responseCode": 800,
		"responseDescription": "Store was not found"
	}
}

Response Parameters

ParameterRequired(Y/N)Format/Data TypePatternDescription
requestIdYesStringMaxLength:50The unique request ID from request.
responseIdYesStringMaxLength:50The unique Response Identifier (generated by GreenDot).
responseDateTimeYesDateTime2024-098-13T16: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.
statementFilesYesArrayReturn statement files by account request.
periodYesString202407The period of selected billing cycle.
fileStringThe pdf file content encode using Base64, need decode using Base64 before download.

Response Cases

CodeCodeTextResponseDescriptionDescription
0SuccessSuccess
100InvalidParameter• RequestId is too long
• Invalid length of AccountNumber
• UserId is too long
• StoreId is too long
• MerchantId is too long
• RequestId is required
• RequestDateTime is required
• UserId is required
• StoreId is required
• MerchantId is required
• StatementPeriods can not be empty.
• The number of StatementPeriods can not over 5.
• Either AccountNumber or AccountIdentifier is required
Invalid parameter in the request. Examples: MerchantID not supplied, StoreID not supplied.
110InvalidAccountNumber• InvalidAccountNumber
• Account Not Found
Account is not found
130InvalidMerchant InvalidMerchantMerchantId in request has not been found/enabled in the system.
600UnableToProcessRequest• Invalid Statement Period
• The StatementPeriod field is required
• Invalid AccountIdentifier
Unable to process request due to downstream errors.
800InvalidStoreStore was not foundStore is not found; store is not for the partner or store does not support this operation.
861RetailChainUserNotFoundUser is not foundUserID in request is not found in system.
862RetailChainUserNotActiveUser is not activeUserId in request is not active.
1000GeneralFailureGeneralFailureService failure.