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
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 | No | String | MaxLength:50 | The unique ID of 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 | The unique merchant Id. Defined by Green Dot – Merchant corresponding with Retailer. |
barcode | Yes | String | Max: 30 | Barcode is 30 digits. The client can pass the full 30 digits or the last 19 digits of the barcode. |
transactionAmount | No | Decimal | 500.00 | Amount 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. |
paymentProgramType | No | Enum | Regular, 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
Parameter | Parameter | 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. |
fixedAllowedAmount | No | Decimal | 50.00 | This field returns the fixed amount if current transaction only support the fixed amount. |
reloadFee | Yes | String | 3.95 | Reload fee for the card. If there’s no fee config in Greendot, the value will be null. |
merchantFee | Yes | String | 2.00 | This is the merchant fee for the transaction. |
availableBalance | No | String | 50.00 | Available balance on main account purse. If it doesn’t pass basic validation like metadata.userid validation, this field will be null. |
maxAllowedAmount | No | String | “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. |
minAllowedAmount | No | String | “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
Code | CodeText | ResponseDescription | Description |
---|---|---|---|
0 | Success | Success | Success. |
100 | InvalidParameter | • 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. |
110 | InvalidAccountNumber | • 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 |
130 | InvalidMerchant | InvalidMerchant | MerchantId in request has not been found/enabled in the system. |
600 | UnableToProcessRequest | N/A | Unable to process request due to fee split not set and downstream error. |
700 | LoadLimitValidationFailed | Exceeds account daily load limit | The transaction amount does not pass load limit verification. |
800 | InvalidStore | Store was not found | Store is not found; store is not for the partner or store does not support this operation. |
801 | StoreBlocked | The store is blocked | Store is blocked by GD store blocker rules. |
1000 | GeneralFailure | N/A | Service failure. |
Updated 6 months ago