Void
This offering is not yet live, and contract(s) may change. However, you can read below to get a sneak-peak before full release!
Void API Method
This operation is used to void a sale, reload or barcode payment 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": "1234567890123456",
"accountIdentifier": "",
"barcode": "",
"externId": "",
"transactionType": "SwipeReload",
"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": "1234567890123456",
"accountIdentifier": "",
"metadata": {
"storeId": "CC97",
"merchantId": "FSCC0342",
"userId": "[email protected]",
"requestDateTime": "2023-09-28T01:00:42Z",
"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 the 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 | Unique merchant Id. It is defined by Green Dot – Merchant corresponding with Retailer. |
originalTransactionId | Yes | String | MaxLength:50 | The transaction id of the transaction info needs to be voided. This is the same value as RequestId passed in Reload, Sale, or Barcode Payment request. |
accountNumber | No | String | 16 digits PAN | Account Number (PAN) of the card. Note: When transactionType is Reload, either AccountNumber or AccountIdentifier is required |
accountIdentifier | No | GUID | e5843e05-d367-4bf1-a223-3af46ae18802 | Newly created unique identifier in sale card, should be using for all subsequent API calls. Note: When transactionType is Reload, either AccountNumber or AccountIdentifier is required |
externId | No | String | Max 30 | The ExternId is the last 19 digits of the barcode of the package. Note: When transactionType is Sale, the ExternId is required. |
barcode | No | String | Max 30 | Barcode is 30 digits. The client can pass the full 30 digits or the last 19 digits of the barcode. Note: When transactionType is PayBarcode, the barcode is required. |
transactionType | No | Enum | • Reload • Sale • BarcodePayment | transactionType includes the following values: • Reload • Sale • BarcodePayment If request doesn’t provide the transactionType, it will use ‘Reload’ as the default value. |
Example Response
Example 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
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. |
Response Cases
Code | CodeText | ResponseDescription | Description |
---|---|---|---|
0 | Success | N/A | Void is successful. |
100 | InvalidParameter | • 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. |
130 | InvalidMerchant | InvalidMerchant | MerchantId in request has not been found/enabled in the system. |
800 | InvalidStore | Store was not found | 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. |
841 | NotVoidableTransactionType | Unload can not be voided | The transaction type is not voidable, now only [InitialLoad] and [Reload] transactions are voidable, the [Unload] is not voidable. |
842 | TransactionAlreadyVoided | Transaction was already voided | The transaction has already been voided. |
843 | TransactionAlreadyPosted | Transaction was already committed | The transaction has been posted, it is not allowed to be voided. |
848 | TransactionAlreadyReturned | Transaction was already returned | The transaction has been returned, it is not allowed to be voided. |
1000 | GeneralFailure | General Failure | Service failure. |
Updated 5 months ago