Get Barcode Details

🚧

This offering is not yet live, and contract(s) may change. However, you can read below to get a sneak-peak before full release!

Get Barcode Details API Method

This method is used to validate cash deposit using a barcode, prior to initiating the transaction and retrieve details including customer fee and limits.

📘

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

Syntax

POST {baseUrl}barcode/details

Example Request

Success Request

POST {baseUrl}/barcode/details
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101

{
  "barcode": "5344560000816246",
  "paymentProgramType": "Regular",
  "transactionAmount": 20.00,
  "metadata": {
    "storeId": "CC970",
    "merchantId": "FSCC0342",
    "userId": "[email protected]",
    "requestDateTime": "2023-09-28T00:56:25Z",
    "registerId": "01"
  }
}

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
userIdNoStringMaxLength:50The unique ID of 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: 20The unique merchant Id. Defined by Green Dot – Merchant corresponding with Retailer.
barcodeYesStringMax: 30Barcode is 30 digits. The client can pass the full 30 digits or the last 19 digits of the barcode.
transactionAmountNoDecimal500.00Amount of money to be reloaded. Must be greater than zero.
For example: Five Hundred Dollars is entered as 500.00. Twenty Dollars is entered as 20.00.
paymentProgramTypeNoEnumRegular,
CheckCashing
Type of payment option that customer selects.
For example:
The customer is paying with a check, then it will be “CheckCashing”.
If they are paying by cash, or a combination of check and cash, PaymentProgramType will be “Regular”.

Example Response

Success Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: a7ef836d-0ab3-49d1-8a03-f5788ba1a97f
X-GD-ResponseCode: 0
{
"reloadFee": "0.00",
"merchantFee": "0.00"
"maxAllowedAmount": "500",
"minAllowedAmount": "20",
"fixedAllowedAmount": "",
"metadata": {
"requestId": "test101",
"responseId": "a7ef836d-0ab3-49d1-8a03-f5788ba1a97f",
"responseDateTime": "2023-09-28T08:57:16.9632687Z",
"responseCode": 0,
"responseDescription": "Success"
}
}

Response Parameters

ParameterParameterFormat/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.
fixedAllowedAmountNoDecimal50.00This field returns the fixed amount if current transaction only support the fixed amount.
reloadFeeYesString3.95Reload fee for the card. If there’s no fee config in Greendot, the value will be null.
merchantFeeYesString2.00This is the merchant fee for the transaction.
availableBalanceNoString50.00Available balance on main account purse. If it doesn’t pass basic validation like metadata.userid validation, this field will be null.
maxAllowedAmountNoString“9500.00”The max amount allowed to perform the reload based on load limit check. It has value only when the request fails the load limit validation.
minAllowedAmountNoString“20.00”The min amount allowed to perform the reload based on load limit check. It has value only when the request fails the load limit validation.

Response Codes

CodeCodeTextResponseDescriptionDescription
0SuccessSuccessSuccess.
100InvalidParameter• RequestId is too long
• The field RegisterId must be a string or array type with a maximum length of '20'.
• UserId is too long
• StoreId is too long
• MerchantId is too long
• RequestId is required
• RequestDateTime is required
• Either AccountNumber or AccountIdentifier is required
• UserId is required
• StoreId is required
• MerchantId is required
• TransactionAmount should be greater than zero
• Invalid length of AccountNumber
Invalid parameter in the request. Examples: MerchantID not supplied, StoreID not supplied.
110InvalidAccountNumber• AccountStatus is Closed.
• AccountStatus is Pending.
• AccountStatus is Locked.
• Account Status is Restricted
• Account Not Found.
• AccountNotFound
• This account is in a restricted state that does not allow inbound or internal transfers.
Account is not found, account status is not valid or account is not reloadable for current partner
130InvalidMerchantInvalidMerchantMerchantId in request has not been found/enabled in the system.
600UnableToProcessRequestN/AUnable to process request due to fee split not set and downstream error.
700LoadLimitValidationFailedExceeds account daily load limitThe transaction amount does not pass load limit verification.
800InvalidStoreStore was not foundStore is not found; store is not for the partner or store does not support this operation.
801StoreBlockedThe store is blockedStore is blocked by GD store blocker rules.
1000GeneralFailureN/AService failure.