Void eGift
Introduction
This API Operation voids the full value of an eGift specified by the provided eGift details. The API Operation voidEGift voids one eGift at a time (there is no batch capability).
IMPORTANT
Voiding an eGift may not always be an option. Reach out to your Account Manager to find out whether this is an option for you.
Note that this API is not a substitute for the
reverseEGift
API. Reverse eGift only applies when there is a timeout error response following an eGift request. See Reverse eGift for more information.
Method | Service Name | Service Type |
---|---|---|
POST | eGiftProcessing/v1/voidEGift | Synchronous |
- Post-Production URI:
https://api.certification.blackhawknetwork.com/eGiftProcessing/v1/voidEGift
- Production URI:
https://api.blackhawknetwork.com/eGiftProcessing/v1/voidEGift
Request Header Attributes
All of these header attributes are optional; however, if a client wants idempotency support then they should specify all three on every request.
Name | Type | Max Length | Required | Description |
---|---|---|---|---|
requestorId | String | 50 | N | A value defined by the client application that can be used to uniquely identify that client application. If the client application does not specify a value, a globally unique identifier will be filled in automatically. |
requestId | String | 50 | Y | A value defined by the client application that can be used to uniquely identify that specific request from client. This value is used if the client application uses reversals in case of timeouts. |
contractId | String | 50 | N | The contract ID from generateEGift transaction (if applicable). If the value of this header attribute is different that the value passed in with the generateEGift transaction, the original value will be used. A unique value assigned by Blackhawk to identify a merchant for all transaction processing. |
Request Elements
Name | Type | Max Length | Required | Description |
---|---|---|---|---|
EGiftVoidRequest | EGiftVoidRequest | N | The eGift to be voided |
EGiftVoidRequest
Name | Type | Max Length | Required | Description |
---|---|---|---|---|
eGiftId | GUID | 26 | Y | To obtain this parameter, the Digital Distribution Partner (DDP) must use the value of entityId from the original eGift generation |
retrievalReferenceNumber | String | 12 | N | Retrieval reference number the client can use to track a given transaction. |
correlationId | String | 26 | N | Correlation id used to correlate the transactions. |
Response Elements
Name | Type | Description |
---|---|---|
eGift | eGift | The voided eGift |
Error Codes
HTTP Status Code | Error Code | Error Message |
---|---|---|
400 | egiftprocessing.eGiftId.null | There was no eGiftId passed in the request |
400 | egitprocessing.invalid.contract.id | The contractId passed in the header is invalid. It should not be more than 11 characters in length. |
400 | egiftprocessing.retrievalReferenceNumber.invalid | Retrieval Reference Number in the request is more than 12 characters. |
409 | egiftprocessing.egift.not.found | Could not find the egift for the given eGift id. |
409 | egiftprocessing.account.void.failed.invalid.merchant | The client is not authorized to make this transaction. |
409 | egiftprocessing.egift.already.voided | The eGift is already voided OR underlying account is already closed. |
409 | egiftprocessing.account.void.failed.invalid.transaction | The transaction was rejected by the provider indicating it as invalid |
409 | egiftprocessing.account.void.failed.exceeds.transaction.count.limit | The transaction was rejected by the provider indicating that the maximum number of transaction limit has reached |
409 | egiftprocessing.account.void.failed.transaction.duplicate | The transaction was rejected by the provider indicating it as a Duplicate transaction |
409 | egiftprocessing.account.void.failed.transaction.cannot.process | The transaction could not be processed by the provider |
409 | egiftprocessing.account.void.failed.general.decline | The transaction was declined by the provider |
409 | egiftprocessing.account.not.found | The eGift id does not have an account id tied to it OR the account is invalid. |
409 | transaction.not.found | The transaction done to create the eGift is not found in the system |
504 | provider.transaction.timeout | There was a timeout in processing the request from the provider side |
502 | There was a timeout in processing the request | |
503 | The service is temporarily unreachable | |
500 | Internal Server Error | There was an internal system error in processing the request |
Sample Request and Response
POST /eGiftProcessing/v1/voidEGift HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json
tenantId: FWVJKCH8TM6V284GM2RC8QR3FC
requestId: FWVJKCH8TM6V284GM2RC8QR3IC
previousAttempts: 0
certificateId: 0Y1R2KSHS367VCWHSTQXZ0NVV8
agent: test agent
requestorId: FWVJKCH8TM6V284GM2RC8QR3FC
roleId: FWVJKCH8TM6V284GM2RC8QR3FC
User-Agent: Jakarta
Content-Length: 95
{
"eGiftId": "MN1NFG1DV8AKA1LTFNBLJ417GH"
}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Date: Fri, 03 May 2013 20:00:02 GMT
Content-Type: application/json
Content-Length: 767
{
"entityId": "MN1NFG1DV8AKA1LTFNBLJ417GH",
"creatorId": "ZY09SCV6TF6N50Q36713ZQZANH",
"updaterId": "8YQ1LV7VW3J88DQFNJ0VNX8NG4",
"createdTimestamp": "2013-07-30T16:09:09.419+0000",
"updatedTimestamp": "2013-08-05T13:50:55.041+0000",
"notes": "Testing generateEGift from WS",
"giftFrom": "Me",
"giftTo": "You",
"giftMessage": "Gift for you",
"recipientId": "VACA88H0RS74JHPHHGZ67XAXT0",
"accountId": "2QQQ9HRJ2N5SLPAF94N2RXBLB4",
"purchaserId": "K7VLF0HM6NK2FQZHN8JSPX7P48",
"retrievalReferenceNumber": "000000045678",
"productConfigurationId": "LKS8VFXX7K939M3JAXKPT061LH",
"giftAmount": 10,
"giftCurrency": "USD",
"isVoid": true
}
Updated 6 months ago