Refund or Void Transaction

15. Refund or Void Transaction

You can use the refund transaction API to refund a transaction to a customer. The refund is based on the amount you provide. You can provide a partial or complete refund.

If you do not specify an amount, a customer receives the complete refund. Velocity exposes an API to cancel an authorized transaction or refund a captured transaction based on the status of the transaction. The Amount field can take values equal to or less that the captured or authorized amount.

Path NamePath Details
End Point[Velocity URL]/mpoint/refund
Format/Content Typetext/xml
AuthenticationHTTP basic access authentication

15.1 Request

The following is an example of a Refund Transaction request:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <refund client-id = "[integer]">
      <transaction order-no="XCDFGG" id="1859798">
        <amount country-id="200">14000</amount>
        <external_claim_reference>ABCD1234</external_claim_reference>
      </transaction>
      <source>API</source>
  </refund>
</root>

The parameters are listed and defined in the table below.

ParameterTypeDescription
external_claim_referenceStringThe External Claim Reference number for refund request. Optional. Maximum length – 20 characters.
sourceStringThe source of refund request. Optional. Maximum length – 20 characters.

15.2 Response

The following is an example of a Refund Transaction response:

Note: If the status code is 1000, the refund is successful. Other rest response codes indicate a failure. Refer to Refund Payment codes for details.

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <status code="1000"> [message] <status/>
</root>

OR

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <status code="9400">
	<!--For Exceptions-->
        <exception type="http">
            <code>400</code>
        </exception>
    </status>
</root>