Unload
Unload API Method
This operation performs a debit on the account for the requested unload amount, provided that all the validations are successful.
Every request triggered should have a unique X-GD-RequestId value in the header.
Syntax
POST {baseUrl}/unload/execute
Example Request
Success Request
POST {baseUrl}/unload/execute
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
"metadata": {
"merchantId": "fscc0342",
"registerId": "01",
"requestDateTime": "2023-10-11T07:53:32Z",
"storeId": "CC970",
"userId": "[email protected]"
},
"accountNumber": "",
"amount": 10.00,
"accountIdentifier": "007f8f2d-f1be-49c1-b029-ef6dcc902006"
}
Negative Request
POST {baseUrl}/unload/execute
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
"metadata": {
"merchantId": "fscc0342",
"registerId": "01",
"requestDateTime": "2023-10-11T07:48:39Z",
"storeId": "CC970",
"userId": "[email protected]"
},
"accountNumber": "",
"amount": 100.00,
"accountIdentifier": "d85972b5-6912-4301-ab6f-94aa49ef7076"
}
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 | Yes | 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. |
accountNumber | No | String | 16 digits PAN | Account Number (PAN) of the card. Note: Either AccountNumber or AccountIdentifier is required |
amount | Yes | Decimal | 500.00 | Amount of money to be unload. For example: Five Hundred Dollars is entered as 500.00. Twenty Dollars is entered as 20.00) |
accountIdentifier | No | GUID | e5843e05-d367-4bf1-a223-3af46ae18802 | Newly 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: c07cdd09-85a8-438b-97bc-9c50745d3631
X-GD-ResponseCode: 0
{
"balance": "370.00",
"transactionIdentifier": "c07cdd09-85a8-438b-97bc-9c50745d3631",
"metadata": {
"requestId": "test101",
"responseId": "c07cdd09-85a8-438b-97bc-9c50745d3631",
"responseDateTime": "2023-10-11T07:53:36.1198386Z",
"responseCode": 0,
"responseDescription": "Success"
}
}
Negative Response
HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: 326f0ed2-dc63-4412-aaf6-ee021505ab39
X-GD-ResponseCode: 110
{
"balance": null,
"transactionIdentifier": null,
"metadata": {
"requestId": "test101",
"responseId": "326f0ed2-dc63-4412-aaf6-ee021505ab39",
"responseDateTime": "2023-10-11T07:48:43.2219632Z",
"responseCode": 110,
"responseDescription": "Account Status is Locked"
}
}
Response Parameters
Parameter | Required(Y/N) | 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. |
balance | Yes | String | 50.00 | Balance after unload. If transaction validation fails, this field is null. |
transactionIdentifier | No | GUID | e5843e05-d367-4bf1-a223-3af46ae18802 | Newly created unique identifier for transaction. If transaction validation fails, this field is null. |
Response Cases
Code | CodeText | ResponseDescription | Description |
---|---|---|---|
0 | Success | Success. | |
100 | InvalidParameter | • 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 • Invalid length of AccountNumber • Either AccountNumber or AccountIdentifier is required | Invalid parameter in the request. Examples: MerchantID not supplied, StoreID not supplied. |
130 | InvalidMerchant | InvalidMerchant | MerchantId in request has not been found/enabled in the system. |
800 | InvalidStore | • 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. |
861 | RetailChainUserNotFound | User is not found. | UserID in request is not found in system. |
862 | RetailChainUserNotActive | User is not active. | UserId in request is not active. |
700 | LoadLimitValidationFailed | • 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. • amount must be greater than zero. | Per transaction, account balance, daily account reload limit reached or insufficient fund on account. |
110 | InvalidAccountNumber | • 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 |
600 | UnableToProcessRequest | Unable to process request due to downstream errors. | |
1000 | GeneralFailure | GeneralFailure | Service failure. |
Updated 6 months ago