Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions restapi/restendpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -1385,13 +1385,16 @@ This endpoint allows to Cancel/Void/Reverse a previous transaction without a rea
| `Body: amount` <span class="badge badge--secondary">Optional</span> <br />*String* | Decimal amount in String, ISO 4217; Required for partial-reversals. *Only if your acquirer supports partial-reversals*. |
| `Body: currency` <span class="badge badge--secondary">Optional</span> <br />*String* | Required for partial-reversals *Only if your acquirer supports partial-reversals*. |
| `Body: messageReasonCode` <span class="badge badge--secondary">Optional</span> <br />*String* | default: CUSTOMER_CANCELLATION. See [allowed values](restobjects.md#messageReasonCode)|
| `Body: timestamp` <span class="badge badge--secondary">Optional</span> <br />*String* | Timestamp in `YYYYMMDDHHmmssSSS` format (17 characters). Defaults to the current server time when not provided. |

**Returns**

| Response | Response Code |
| ----------- | ----------- |
| [DeferredTokenizationResponse](restobjects.md#deferredTokenizationResponse) | Response code 200. |
| **BadRequest** | Response code 400. Returned when the transaction type is not eligible for deferred tokenization. |
| Result | Notes |
| ------ | ----- |
| `200` | Reversal accepted and processed. Response body is a [ReversalResponse](restobjects.md#reversalResponse) object. |
| `400` | Business rule error from the gateway (for example, the transaction was already reversed, or a partial-reversal `amount` exceeds the original amount). Returned as `BadRequestError` with `error.code` and `error.details`. |
| `403` | Forbidden — the API key does not belong to a merchant. Partner keys are not accepted by this endpoint. |
| `422` | Payload validation error (`VALIDATION_FAILED`) — missing `originalGuid`, invalid `messageReasonCode` enum value, or invalid `currency` length. |

**Code Example**

Expand Down
81 changes: 78 additions & 3 deletions restapi/restobjects.md
Original file line number Diff line number Diff line change
Expand Up @@ -1052,11 +1052,11 @@ The exact shape is very similar across these operations; some fields (such as `o

## Reversal {#reversal}

### ViscusReversalRequest {#viscusReversalRequest}
### ReversalRequest {#reversalRequest}

`ViscusReversalRequest` <span class="badge badge--info">Object</span>
`ReversalRequest` <span class="badge badge--info">Object</span>

Object used by the [`POST /v1/reversal`](restendpoints#reversal-operations) endpoint to reverse any reversible transaction. Only `originalGuid` is required; all other fields are optional and default to sensible values when not provided.
Object used by the [`POST /v1/reversal`](restendpoints#reversal) endpoint to reverse any reversible transaction. Only `originalGuid` is required; all other fields are optional and default to sensible values when not provided.

**Properties**

Expand Down Expand Up @@ -1150,6 +1150,81 @@ curl --location --request POST 'https://cloud.handpoint.io/reversal' \

---

### ReversalResponse {#reversalResponse}

`ReversalResponse` <span class="badge badge--info">Object</span>

Object returned by [`POST /v1/reversal`](restendpoints#reversal) when the reversal is accepted and processed by the gateway.

**Properties**

| Property | Description |
| -------- | ----------- |
| `httpStatus` <br />*String* | HTTP status code as returned by the gateway (for example, `"200"`). |
| `acquirerTid` <br />*String* | Acquirer terminal identifier used to process the reversal. |
| `agreementNumber` <br />*String* | Merchant agreement number used for the reversal. |
| `amount` <br />*String* | Amount that was reversed, in major units. Matches the original transaction amount for a full reversal, or the requested `amount` for a partial reversal. |
| `approvalCode` <br />*String* | Approval code returned by the issuer for the reversal. |
| `batchNumber` <br />*String* | Batch number the reversal was recorded against, provided the acquirer returns it. |
| `cardTypeName` <br />*String* | Card brand of the reversed transaction (for example, `"Visa"`). |
| `currency` <br />*String* | ISO 4217 3-character currency code of the reversed amount. |
| `customFields` <br />*Object* | Additional gateway metadata for the reversal, returned as an `entry` array of `{key, value}` pairs (for example, the applied `messageReasonCode` and `tenderType`). |
| `expiryDateMMYY` <br />*String* | Card expiry date in `MMYY` format. |
| `f25` <br />*String* | ISO 8583 field 25 (POS condition code) returned by the acquirer. |
| `issuerResponseCode` <br />*String* | Issuer response code for the reversal (for example, `"00"` for approved). |
| `issuerResponseText` <br />*String* | Human-readable description of the issuer response (for example, `"Successful"`). |
| `maskedCardNumber` <br />*String* | Masked PAN of the reversed transaction. |
| `serverDateTime` <br />*String* | Gateway server timestamp (`YYYYMMDDHHmmssSSS`) when the reversal was processed. |
| `terminalDateTime` <br />*String* | Terminal timestamp (`YYYYMMDDHHmmssSSS`), echoed back from the request or generated by the gateway when not provided. |
| `transactionReference` <br />*String* | `transactionReference` of the original transaction, echoed back for reconciliation. |
| `authorizationGuid` <br />*String* | GUID of the original authorization/sale being reversed. |
| `originalGuid` <br />*String* | GUID of the transaction that was reversed. Mirrors the `originalGuid` from the request. |
| `reversalGuid` <br />*String* | Unique identifier generated by the gateway for this reversal operation. |

**Code example**

```json
{
"httpStatus": 200,
"acquirerTid": "ACQUIRER_TID",
"agreementNumber": "123456789010102",
"amount": "0.04",
"approvalCode": "123456",
"batchNumber": "123",
"cardTypeName": "Visa",
"currency": "USD",
"customFields": {
"entry": [
{
"key": "messageReasonCode",
"value": "4000"
},
{
"key": "tenderType",
"value": "Credit"
},
{
"key": "issuerResponseCode",
"value": "00"
}
]
},
"expiryDateMMYY": "1027",
"f25": "4000",
"issuerResponseCode": "00",
"issuerResponseText": "Successful",
"maskedCardNumber": "************0936",
"serverDateTime": "20260709074155101",
"terminalDateTime": "20260709074155083",
"transactionReference": "ee47c0b5-ff0b-4847-977c-cb8b6c4a848c",
"authorizationGuid": "9db20c30-7b69-11f1-9754-81955277651b",
"originalGuid": "9db20c30-7b69-11f1-9754-81955277651b",
"reversalGuid": "a8534cd0-7b69-11f1-a47e-6df6451d705a"
}
```

---

## Batch {#batch}

### BatchCloseRequest {#batchCloseRequest}
Expand Down
Loading