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
refundParent: 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:
| Parameter | Format | Requirement | Description |
|---|---|---|---|
client-id | Integer | Required | The unique ID configured for a merchant on the Velocity POP. |
account | Integer | Optional | The unique ID configured for the account that the merchant is using for this transaction. Applicable if the merchant has multiple accounts. |
transaction
transactionParent: root: refund
Each refund element requires a transaction child. The transaction child element has the following attributes:
| Parameter | Format | Requirement | Description |
|---|---|---|---|
id | Integer | Required | The unique ID of the transaction. |
order-no | String | Required | The 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
amountParent: root: refund: transaction
Each transaction element requires an amount child. The amount child element has the following attribute:
| Parameter | Format | Requirement | Description |
|---|---|---|---|
country-id | Integer | Required | The CellPoint Digital-specific country code. This is available in Reference. |
The amount child element has the following text content:
| Parameter | Format | Requirement | Description |
|---|---|---|---|
| amount | Integer | Required | The 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
transactionsParent: 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:
| Parameter | Format | Requirement | Description |
|---|---|---|---|
client-id | Integer | Required | The unique ID configured for a merchant on the Velocity POP. |
transaction
transactionParent: 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:
| Parameter | Format | Requirement | Description |
|---|---|---|---|
id | Integer | Required | The unique ID of the transaction. |
order-no | String | Required | The 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
statusParent: root: transactions: transaction
In a success response, each transaction element requires a status child. Each status child element has the following attribute:
| Parameter | Format | Requirement | Description |
|---|---|---|---|
code | Integer | Required | A status code for the operation. 1000 indicates success. |
Each status element has the following text content:
| Parameter | Format | Requirement | Description |
|---|---|---|---|
| message | String | Required | A 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
statusParent: root
In a failure response, the status element is required, and it has the following attribute:
| Parameter | Format | Requirement | Description |
|---|---|---|---|
code | Integer | Required | A status code for the operation. 1000 indicates success; other response codes indicate failure. See Reference for more information. |
exception
exceptionParent: root: status
In a failure response, the exception element is required, and it has the following attribute:
| Parameter | Format | Requirement | Description |
|---|---|---|---|
type | String | Required | The type of exception. |
code
codeParent: root: status: exception
In a failure response, the code element is required, and it has the following text content:
| Parameter | Format | Requirement | Description |
|---|---|---|---|
| code | Integer | Required | The code for the exception. |
Updated 5 months ago
