GiftDeals Transactions
API Call Transactions
Each request to the Exchange Service results in the creation of an API Call Transaction entity in GiftDeals. In some cases, requests may return immediately, even though processing on the GiftDeals side is not yet complete. To convey the status of the transaction, the requests that support this capability will return an additional attribute in the JSON response, isCompleted. That value is a Boolean and will be true if the request has been completed and false otherwise. If isCompleted is true, then the response as documented will be returned. If the value is false, however, then all that will be returned is the transactionId and the isCompleted flag, which will be false.
In most cases except for GetQuote, the isCompleted flag will be true.
Request Transaction Status Requests
Regardless of whether the transaction has been completed or not, details about the transaction, including the status can be obtained. In general, the transaction status may be obtained by performing an HTTP GET on the same URL for the original request, but appending the transactionId to the end of the URL path. For example, to get the status of an Acquire Card request, where the transactionId is 1JXX657P9VCKN74WVFNBH75GWR, the HTTP request is:
GET https://api.GiftDeals.com/exchange/V3/acquire/1JXX657P9VCKN74WVFNBH75GWR
Request Transaction Status Response
Because of the Transaction entity stores both the original JSON request and JSON response, the exact Transaction entity will vary, depending on the request. There are, however, several attributes that will be common to all Transactions regardless of the original request.
Once a card has been Acquired into the GiftDeals a transaction is generated which will reflect the acquisition of the card. The TransactionId from this acquisition will be sent in the settlement file so it can be settled and paid.
Updated about 4 years ago
