Validate Card For Unload

ValidateCardForUnload API Method

This operation validates the below and is used to check if the account is unload-able when customer provides card details and unload amount.
• If card is Green Dot Card (Non-GD card is not allowed)
• If status of the account/card is healthy.
• If validateAmount is true, system will do balance & limit check.

📘

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

Syntax

POST {baseUrl}/unload/validate/card

Example Request

Success Request

POST {baseUrl}/unload/validate/card
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
    "metadata": {
        "merchantId": "fscc0342",
        "registerId": "01",
        "requestDateTime": "2023-10-11T07:25:43Z",
        "storeId": "CC970",
        "userId": "[email protected]"
    },
    "accountNumber": "",
    "transactionAmount": 50.00,
    "validateAmount": true,
    "accountIdentifier": "007f8f2d-f1be-49c1-b029-ef6dcc902006"    
}

Negative Request

POST {baseUrl}/unload/validate/card
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
    "metadata": {
        "merchantId": "fscc0342",
        "registerId": "01",
        "requestDateTime": "2023-12-11T06:16:06",
        "storeId": "CC970",
        "userId": "[email protected]"
    },
    "accountNumber": "",
    "transactionAmount": 40000.00,
    "validateAmount": true,
    "accountIdentifier": "007f8f2d-f1be-49c1-b029-ef6dcc902006"    
}

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 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.
accountNumberNoString16 digits PANAccount Number (PAN) of the card. If accountIdentifier is supplied this value should be empty. If AccountNumber and accountIdentifier both supplied, system will use accountNumber.
Note: Either AccountNumber or AccountIdentifier is required
transactionAmountYesDecimal500.00Amount of money to be unload. Must be greater than zero.
For example: Five Hundred Dollars is entered as 500.00. Twenty Dollars is entered as 20.00.
validateAmountYesBooltrue or falseTrue: system checks if there is enough amount and if it pass the unload limit check.
False: system skips the balance & limit checking.
accountIdentifierNoGUIDe5843e05-d367-4bf1-a223-3af46ae18802Newly created unique identifier for sale card, should be using for all subsequent API calls
Note: Either AccountNumber or AccountIdentifier is required

Example Response

Success Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: 9c3bd050-9c6b-4d87-8029-26a480c22eb7
X-GD-ResponseCode: 0
{
    "balance": "380.00",
"unloadFee": null,
"maxAllowedAmount": null,
    "metadata": {
        "requestId": "test101",
        "responseId": "9c3bd050-9c6b-4d87-8029-26a480c22eb7",
        "responseDateTime": "2023-10-11T07:25:46.3031642Z",
        "responseCode": 0,
        "responseDescription": "Success"
    }
}

Negative Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: be8e4cf4-1698-46dd-9e35-ed15fc3d6ba6
X-GD-ResponseCode: 700
{
    "balance": "44801.19",
"unloadFee": null,
"maxAllowedAmount": "24990.00",
    "metadata": {
    "requestId": "test101",
    "responseId": "be8e4cf4-1698-46dd-9e35-ed15fc3d6ba6",
    "responseDateTime": "2023-12-11T06:16:10.5019499Z",
    "responseCode": 700,
    "responseDescription": "Exceeds account daily unload limit"
    }
}

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.
balanceYesString50.00Current available balance in main account purse. If it fails basic validation like metadata value validation or account not found, this field will be null.
unloadFeeYesString50.00Fee for unload. If there’s no fee at GD side, no value(null) will be returned.
maxAllowedAmountYesString“370.00”The max amount allowed to perform the unload based on load limit check. If ValidateAmount is false, no value will be returned.

Response Cases

CodeCodeTextResponse DescriptionDescription
0SuccessSuccess.
100InvalidParameter• RequestId is required
• UserId is required
• RequestDateTime is required
• StoreId is required
• MerchantId is required
• RequestId is too long
• UserId is too long
• StoreId is too long
• MerchantId is too long
• Either AccountNumber or AccountIdentifier is required
• TransactionAmount should be greater than zero
• TransactionAmount is required.
• The ValidateAmount field is required.
• The field RegisterId must be a string or array type with a maximum length of '20'.
• Invalid length of AccountNumber
• Either AccountNumber or AccountIdentifier is required
Invalid parameter in the request. Examples: MerchantID not supplied, StoreID not supplied.
130InvalidMerchantInvalidMerchantMerchantId in request has not been found/enabled in the system.
800InvalidStore• Store feature is invalid
• Store was not found
• Block by Store Hierarchy setting
Store 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.
700LoadLimitValidationFailed• Exceeds account daily unload limit
• Exceeds account monthly unload limit
• Unload amount of Non-active initial card should equal to available balance.
• The account has insufficient funds to execute the transfer.
Per transaction, account balance, daily account reload limit reached or insufficient fund on account.
110InvalidAccountNumber• ProgramCode does not match the card
• AccountStatus is Closed.
• AccountStatus is Pending.
• AccountStatus is Locked.
• Account Status is Restricted
• Account Not Found.
• AccountNotFound
Account is not found, account status is not valid or account is not unloadable
600UnableToProcessRequestUnable to process request due to downstream errors.
1000GeneralFailureGeneralFailureService failure.