Reversal / Refund

API Reference

This provides API reference information for Velocity API's Refund (refund) operation. For information on how to integrate this operation, see API.

Request

Endpoint: /mpoint/refund
Method: POST

Sample Request

The following is an example of a Reversal/Refund 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>

Request Parameters

refund

Parent: root

The refund element is required, and it has the following attribute:

ParameterFormatRequirementDescription
client-idIntegerRequiredThe unique ID configured for a merchant on the Velocity POP.

transaction

Parent: root: refund

The transaction element is required, and it has the following attributes:

ParameterFormatRequirementDescription
order-noStringRequiredThe order ID that a merchant generates. Note: Some payment providers have strict guidelines for the order-no. The recommended pattern is "[a-zA-Z0-9._-].
idIntegerRequiredThe unique ID of the transaction.

amount

Parent: root: refund: transaction

The amount element is required, and it has the following attribute:

ParameterFormatRequirementDescription
country-idIntegerRequiredThe CellPoint Digital-specific country code. This is available in Reference.

The amount element has the following text content:

ParameterFormatRequirementDescription
amountIntegerRequiredThe total amount that a customer is charged for a payment transaction in a country’s smallest currency. For example, the smallest currency of USD is the penny ($0.01). If the transaction amount is $120.30, then the amount field contains the value 12030. This can be a value ranging from 0 to the authorized amount.

external_claim_reference

Parent: root: refund: transaction

The external_claim_reference element is optional, and it has the following text content:

ParameterFormatRequirementDescription
External Claim Reference numberString, up to 20 ANOptionalThe External Claim Reference number for the refund request.

source

Parent: root: refund

The source element is optional, and it has the following text content:

ParameterFormatRequirementDescription
sourceString, up to 20 ANOptionalThe source of the refund request.

Response

Once you have sent your Reversal/Refund request, Velocity API returns a Reversal/Refund (refund) response confirming if the reversal or refund was successful.

Sample Success Response

Below is an example of a response for a successful reversal or refund:

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

Sample Failed Response

Below is an example of a response for a failed reversal or refund:

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

Response Parameters

status

Parent: root

The status element is required, and it has the following attribute:

ParameterFormatRequirementDescription
codeIntegerRequiredA status code for the operation. If this is 1000, the reversal or refund was successful. Other response codes indicate failure. See Reference for more information.

exception

Parent: root: status

The exception element is optional, and it has the following attribute:

ParameterFormatRequirementDescription
typeStringOptionalThe type of exception.

code

Parent: root: status: exception

If the exception element is present, it requires a code child. Each code child element has the following text content:

ParameterFormatRequirementDescription
codeIntegerConditional Requirement: Required if exception is present.The code for the exception.