Bulk Refund

API Reference

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

Request

Endpoint: /mpoint/bulk-refund
Method: POST

Sample Request

The following is an example of a Bulk Refund request:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <refund client-id="[integer]" account="[integer]">
    <transaction id="5768217" order-no="UID346">
      <amount country-id="200">158726</amount>
    </transaction>
  </refund>
  <refund client-id="[integer]" account="[integer]">
    <transaction id="5768212" order-no="JZC273">
      <amount country-id="200">251100</amount>
    </transaction>
  </refund>
</root>

Request Parameters

refund

Parent: root

The root element requires one refund child for each account included in the request. Multiple refund children are allowed. Each refund child element has the following attributes:

ParameterFormatRequirementDescription
client-idIntegerRequiredThe unique ID configured for a merchant on the Velocity POP.
accountIntegerOptionalThe unique ID configured for the account that the merchant is using for this transaction. Applicable if the merchant has multiple accounts.

transaction

Parent: root: refund

Each refund element requires a transaction child. The transaction child element has the following attributes:

ParameterFormatRequirementDescription
idIntegerRequiredThe unique ID of the transaction.
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._-].

amount

Parent: root: refund: transaction

Each transaction element requires an amount child. The amount child element has the following attribute:

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

The amount child 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.

Response

Sample Success Response

The following is a sample response for a successful Bulk Refund transaction:

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <transactions client-id="[integer]">
    <transaction id="5768217" order-no="UID346">
      <status code="1000"> [message] </status>
    </transaction>
  </transactions>
  <transactions client-id="[integer]">
    <transaction id="5768212" order-no="JZC273">
      <status code="1000"> [message] </status>
    </transaction>
  </transactions>
</root>

Success Response Parameters

transactions

Parent: root

In a success response, the root element requires one transactions child for each client you've included in the request (each unique client-id). Multiple transactions children are allowed. Each transactions child element has the following attribute:

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

transaction

Parent: root: transactions

In a success response, the transactions element requires one transaction child for each transaction you've requested a refund/reversal for (associated with the given client-id). Each transactions element can have multiple transaction children. Each transaction child element has the following attribute:

ParameterFormatRequirementDescription
idIntegerRequiredThe unique ID of the transaction.
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._-].

status

Parent: root: transactions: transaction

In a success response, each transaction element requires a status child. Each status child element has the following attribute:

ParameterFormatRequirementDescription
codeIntegerRequiredA status code for the operation. 1000 indicates success.

Each status element has the following text content:

ParameterFormatRequirementDescription
messageStringRequiredA message providing details on the status code.

Sample Failure Response

The following is a sample response for a failed Bulk Refund transaction:

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

Failure Response Parameters

status

Parent: root

In a failure response, the status element is required, and it has the following attribute:

ParameterFormatRequirementDescription
codeIntegerRequiredA status code for the operation. 1000 indicates success; other response codes indicate failure. See Reference for more information.

exception

Parent: root: status

In a failure response, the exception element is required, and it has the following attribute:

ParameterFormatRequirementDescription
typeStringRequiredThe type of exception.

code

Parent: root: status: exception

In a failure response, the code element is required, and it has the following text content:

ParameterFormatRequirementDescription
codeIntegerRequiredThe code for the exception.