Get Card 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 Card Details API Method

This method is used to validate cash deposit using a prepaid or debit card, prior to initiating the transaction and retrieve details including customer fee, limits and card type.

📘

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

Syntax

POST {baseUrl}/card/details

Example Request

Success Request

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

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

Negative Request

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

{
  "accountNumber": "",
  "accountIdentifier": "6287287e-b79f-4458-8830-cc5edd9d7378",
  "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.
accountNumberNoString16 digits PANAccount Number (PAN) of the card.
Note: Either AccountNumber or AccountIdentifier is required.
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
transactionAmountYesDecimal500.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.
paymentProgramTypeYesEnumRegular,
CheckCashing
Type of payment option that customer selects.
For example:
If t 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
{
"availableBalance": "20.25",
"reloadFee": "0.00",
"merchantFee": "0.00"
"maxAllowedAmount": "500",
"minAllowedAmount": "20",
"cardType": "NormalCard",
"metadata": {
"requestId": "test101",
"responseId": "a7ef836d-0ab3-49d1-8a03-f5788ba1a97f",
"responseDateTime": "2023-09-28T08:57:16.9632687Z",
"responseCode": 0,
"responseDescription": "Success"
}
}

Negative Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: c297f15c-def6-43ee-9189-b7bf411ba349
X-GD-ResponseCode: 110
{
"availableBalance": null,
"reloadFee": null,
"merchantFee": null
"maxAllowedAmount": null,
"metadata": {
"requestId": "test101",
"responseId": "c297f15c-def6-43ee-9189-b7bf411ba349",
"responseDateTime": "2023-09-28T08:58:41.8784305Z",
"responseCode": 110,
"responseDescription": "Account 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).
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.
availableBalanceNoString50.00Available balance on main account purse. If it doesn’t pass basic validation like metadata.userid validation, this field will be null.
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 this transaction.
maxAllowedAmountYesString“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.
minAllowedAmountYesString“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.
cardTypeYesEnum• Normal
• PointofBanking
cardType includes the following values:
• Normal
• PointofBanking

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.
861RetailChainUserNotFoundUser is not found.UserID in request is not found in system.
862RetailChainUserNotActiveUser is not active.UserId in request is not active.
1000GeneralFailureN/AService failure.