The Credit transaction enables you to refund money to a customer, even if the original transaction occurred outside of Vantiv’s system. You can submit refunds against any of the following payment transactions:
• Capture Transactions
• Capture Given Auth Transactions
• Force Capture Transactions
• Sale Transactions
• External Sale or Capture Transactions
Example: Online Credit Request for a Vantiv Processed Transaction
To request a Credit against a sale settled by Vantiv, you need only specify the <litleTxnId> element. The application uses the <litleTxnId> to look up the Capture referenced and obtain all the necessary information including the amount. The example below includes the optional <customBilling> and <enhancedData> elements.
If the sale occurred outside of Vantiv’s system, you must specify the following elements in your Credit request: <orderId>, <amount>, and <card>, or <token> (<paypal> not supported for this transaction type).
<cnpOnlineRequest version="12.0" xmlns="http://www.vantivcnp.com/schema" merchantId="100">
<authentication>
<user>User Name</user>
<password>password</password>
</authentication>
<credit id="2" reportGroup="ABC Division" customerId="038945">
<cnpTxnId>13254123434</cnpTxnId>
<customBilling>
<phone>8888888888</phone>
<descriptor>descriptor</descriptor>
</customBilling>
<enhancedData>
<customerReference>PO12345</customerReference>
<salesTax>125</salesTax>
<taxExempt>false</taxExempt>
<discountAmount>0</discountAmount>
<shippingAmount>495</shippingAmount>
<dutyAmount>0</dutyAmount>
<shipFromPostalCode>01851</shipFromPostalCode>
<destinationPostalCode>01851</destinationPostalCode>
<destinationCountryCode>USA</destinationCountryCode>
<invoiceReferenceNumber>123456</invoiceReferenceNumber>
<orderDate>2016-07-14</orderDate>
<detailTax>
<taxIncludedInTotal>true</taxIncludedInTotal>
<taxAmount>55</taxAmount>
<taxRate>0.0059</taxRate>
<taxTypeIdentifier>00</taxTypeIdentifier>
<cardAcceptorTaxId>011234567</cardAcceptorTaxId>
</detailTax>
<lineItemData>
<itemSequenceNumber>1</itemSequenceNumber>
<itemDescription>chair</itemDescription>
<productCode>CH123</productCode>
<quantity>1</quantity>
<unitOfMeasure>EACH</unitOfMeasure>
<taxAmount>125</taxAmount>
<lineItemTotal>9380</lineItemTotal>
<lineItemTotalWithTax>9505</lineItemTotalWithTax>
<itemDiscountAmount>0</itemDiscountAmount>
<commodityCode>300</commodityCode>
<unitCost>93.80</unitCost>
<detailTax>
<taxIncludedInTotal>true</taxIncludedInTotal>
<taxAmount>55</taxAmount>
<taxRate>0.0059</taxRate>
<taxTypeIdentifier>03</taxTypeIdentifier>
<cardAcceptorTaxId>011234567</cardAcceptorTaxId>
</detailTax>
</lineItemData>
<lineItemData>
<itemSequenceNumber>2</itemSequenceNumber>
<itemDescription>table</itemDescription>
<productCode>TB123</productCode>
<quantity>1</quantity>
<unitOfMeasure>EACH</unitOfMeasure>
<lineItemTotal>30000</lineItemTotal>
<itemDiscountAmount>0</itemDiscountAmount>
<commodityCode>300</commodityCode>
<unitCost>300.00</unitCost>
</lineItemData>
</enhancedData>
</credit>
</cnpOnlineRequest>
Credit Response
The Credit response message is identical for Online and Batch transactions except Online includes the postDate element.
The example below illustrates a Batch Credit response. A response for an Online transaction uses a litleOnlineResponse element as the parent.
<cnpOnlineResponse version="12.0" xmlns="http://www.vantivcnp.com/schema" id="123" cnpSessionId="987654321" response="0"
message="Valid Format">
<batchResponse id="01234567" cnpBatchId="4455667788" merchantId="100">
<creditResponse id="AX54325432" reportGroup="RG12">
<cnpTxnId>84568457</cnpTxnId>
<response>000</response>
<responseTime>2017-04-01T10:24:31</responseTime>
<message>Approved</message>
</creditResponse>
</batchResponse>
</cnpOnlineResponse>
Return to a list of sample XML transactions
For additional information, consult the LitleXML reference guide