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
refund
Parent: root
The refund
element is required, and it has the following attribute:
Parameter | Format | Requirement | Description |
---|---|---|---|
client-id | Integer | Required | The unique ID configured for a merchant on the Velocity POP. |
transaction
transaction
Parent: root: refund
The transaction
element is required, and it has the following attributes:
Parameter | Format | Requirement | Description |
---|---|---|---|
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._-] . |
id | Integer | Required | The unique ID of the transaction. |
amount
amount
Parent: root: refund: transaction
The amount
element is required, and it 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
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. |
external_claim_reference
external_claim_reference
Parent: root: refund: transaction
The external_claim_reference
element is optional, and it has the following text content:
Parameter | Format | Requirement | Description |
---|---|---|---|
External Claim Reference number | String, up to 20 AN | Optional | The External Claim Reference number for the refund request. |
source
source
Parent: root: refund
The source
element is optional, and it has the following text content:
Parameter | Format | Requirement | Description |
---|---|---|---|
source | String, up to 20 AN | Optional | The 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
status
Parent: root
The status
element is required, and it has the following attribute:
Parameter | Format | Requirement | Description |
---|---|---|---|
code | Integer | Required | A 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
exception
Parent: root: status
The exception
element is optional, and it has the following attribute:
Parameter | Format | Requirement | Description |
---|---|---|---|
type | String | Optional | The type of exception. |
code
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:
Parameter | Format | Requirement | Description |
---|---|---|---|
code | Integer | Conditional Requirement: Required if exception is present. | The code for the exception. |
Updated 11 days ago