Void API Method

This operation is used to void a load transaction within the funding delay window.

📘

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

Syntax

POST {baseUrl}/transaction/void

Example Request

Success Request

POST {baseUrl}/transaction/void
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test102

{
	"originalTransactionId": "test101",
 	"accountNumber": "",
  	"accountIdentifier": "06e33e98-5c40-4c1a-967b-930f28f509a4",
"metadata": {
    		"storeId": "CC970",
    		"merchantId": "FSCC0342",
   		"userId": "[email protected]",
    		"requestDateTime": "2023-09-28T01:00:42Z",
    		"registerId": "01"
  }
}

Negative Request

POST {baseUrl}/transaction/void
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test103

{
	"originalTransactionId": "test102",
	"accountNumber": "",
	"accountIdentifier": "06e33e98-5c40-4c1a-967b-930f28f509a4",
"metadata": {
    		"storeId": "CC97",
    		"merchantId": "FSCC0342",
   		"userId": "[email protected]",
    		"requestDateTime": "2023-09-28T01:00:42Z",
    		"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.
userIdYesStringMaxLength:50The unique ID of the 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: 20Unique merchant Id. It is defined by Green Dot – Merchant corresponding with Retailer.
originalTransactionIdYesStringMaxLength:50The transaction id of the transaction info needs to be voided. This is the same value as RequestId passed in Reload request
accountNumberNoString16 digits PANAccount Number (PAN) of the card.
Note: Either AccountNumber or AccountIdentifier is required
accountIdentifierNoGUIDe5843e05-d367-4bf1-a223-3af46ae18802Newly created unique identifier in sale card, should be using for all subsequent API calls. Either of AccountNumber / AccountIdentifier required.

Example Response

Success Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test102
X-GD-ResponseId: 57b07865-7c6f-4228-996e-d3f9d9fcc748
X-GD-ResponseCode: 0
{
	"metadata": {
		"requestId": "test102",
		"responseId": "57b07865-7c6f-4228-996e-d3f9d9fcc748",
		"responseDateTime": "2023-09-28T09:00:42.8192011Z",
		"responseCode": 0,
		"responseDescription": "Success"
	}
}

Negative Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test103
X-GD-ResponseId: 160d9d1b-c528-425c-ad09-01ade5fb5fa9
X-GD-ResponseCode: 800
{
	"metadata": {
		"requestId": "test103",
		"responseId": "160d9d1b-c528-425c-ad09-01ade5fb5fa9",
		"responseDateTime": "2023-09-28T09:03:54.8151139Z",
		"responseCode": 800,
		"responseDescription": "Store was 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.

Response Cases

CodeCodeTextResponseDescriptionDescription
0SuccessN/AVoid is successful.
100InvalidParameter• RequestId is too long
• The field RegisterId must be a string or array type with a maximum length of '20'.
• Invalid length of AccountNumber
• UserId is too long
• StoreId is too long
• MerchantId is too long
• The field OriginalTransactionId must be a string with a minimum length of 1 and a maximum length of 50.
• RequestId is required
• RequestDateTime is required
• Either AccountNumber or AccountIdentifier is required
• UserId is required
• StoreId is required
• MerchantId is required
• The OriginalTransactionId field 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.
800InvalidStoreStore was not foundStore 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.
841NotVoidableTransactionTypeUnload can not be voidedThe transaction type is not voidable, now only [InitialLoad] and [Reload] transactions are voidable, the [Unload] is not voidable.
842TransactionAlreadyVoidedTransaction was already voidedThe transaction has already been voided.
843TransactionAlreadyPostedTransaction was already committedThe transaction has been posted, it is not allowed to be voided.
848TransactionAlreadyReturnedTransaction was already returnedThe transaction has been returned, it is not allowed to be voided.
1000GeneralFailureGeneralFailureService failure.