Gift Card Credit Transactions
The Gift Card Credit transaction allows you to refund funds previously captured on a Closed-loop gift card.
Gift Card Credit Request
You must specify the Gift Card Credit request as follows. There are two possible structures for this transaction type. You use the structure containing the cnpTxnId
element, when the Worldpay processed the capture transaction. You use the structure containing the orderId
, when the processor of the capture transaction was not Worldpay. Typically, this occurs when you first migrate your processing to Worldpay. The structures of the requests are identical for either an Online or a Batch submission.
<giftCardCredit id="Id" reportGroup="iQ Report Group" customerId="Customer Id">
<cnpTxnId>Transaction Id from Auth Response</cnpTxnId>
<creditAmount>Amt of Credit</creditAmount>
<card>
</giftCardCredit>
or
<giftCardCredit id="Id" reportGroup="iQ Report Group" customerId="Customer Id">
<orderId>Order Id from Capture</cnpTxnId>
<creditAmount>Amt of Credit</captureAmount>
<orderSource></orderSource>
<card>
</giftCardCredit>
Example: Online Gift Card Credit Transaction (Worldpay Processed Capture)
<cnpOnlineRequest version="12.0" xmlns="http://www.vantivcnp.com/schema" merchantId="100">
<authentication>
<user>User Name</user>
<password>Password</password>
</authentication>
<giftCardCredit id="834262" reportGroup="ABC Division" customerId="038945">
<cnpTxnId>82823534116454002</cnpTxnId>
<creditAmount>40000</creditAmount>
<card>
<type>GC</type>
<number>9000000000000001</number>
</card>
</giftCardCredit>
</cnpOnlineRequest>
Example: Online Gift Card Credit Transaction (Non-Worldpay Processed Capture)
<cnpOnlineRequest version="12.0" xmlns="http://www.vantivcnp.com/schema" merchantId="100">
<authentication>
<user>User Name</user>
<password>Password</password>
</authentication>
<giftCardCredit id="834262" reportGroup="ABC Division" customerId="038945">
<orderId>116454002</orderId>
<creditAmount>4000</creditAmount>
<orderSource>ecommerce</orderSource>
<card>
<type>GC</type>
<number>9000000000000001</number>
</card>
</giftCardCredit>
</cnpOnlineRequest>
Gift Card Credit Response
A Gift Card Credit response has the following structure. The response message is identical for either request structure, as well as Online and Batch transactions except Online includes the <postDate> element.
<giftCardCaptureResponse id="Load Id" reportGroup="iQ Report Group" customerId="Customer Id">
<cnpTxnId>Transaction Id</cnpTxnId>
<response>Response Code</response>
<responseTime>Date and Time in GMT</responseTime>
<postDate>Date transaction posted</postDate> (Online Only)
<message>Response Message</message>
<location>Processing Location</location>
</giftCardCreditResponse>
Example: Gift Card Credit Response
<cnpOnlineResponse version="12.13" xmlns="http://www.vantivcnp.com/schema" response="0" message="Valid Format">
<giftCardCreditResponse id="834262" reportGroup="ABC Division">
<cnpTxnId>9695064321</cnpTxnId>
<response>000</response>
<responseTime>2020-03-22T15:13:43</responseTime>
<postDate>2020-03-22</postDate>
<message>Approved</message>
<giftCardResponse>
<txnTime>2020-03-22T12:00:00</txnTime>
<refCode>003558</refCode>
<systemTraceId>834528</systemTraceId>
<sequenceNumber>123456</sequenceNumber>
<availableBalance>0</availableBalance>
</giftCardResponse>
</giftCardCreditResponse>
</cnpOnlineResponse>