This mode is used when issuing a return using billing information from a previous authorization based on the submitted prevorderid and origorderid. Billing data is valid for 2 years. The return will bear a new orderID, either that submitted or gateway-generated.
Transaction Administration - Return Previous
Overview
The Return Previous operation issues a refund using payment data stored from a prior transaction. Unlike a standard return, this method creates a new transaction record and is not directly tied to the original transaction’s settlement structure.
Request Parameters
| Variable | Requirement | Type | Max Size | Possible Values / Example | Description | Notes |
|---|---|---|---|---|---|---|
publisher-name |
Mandatory | string | N/A | Example: gatewayuser |
Gateway account username issued to you. | |
publisher-password |
Mandatory | string | N/A | Example: securepassword |
Remote Client Password used for API authentication. | This differs from the administrative login password. |
mode |
Mandatory | string | N/A | returnprev |
Specifies refund using previously stored transaction data. | Must be set to returnprev. |
origorderid |
Mandatory | string | N/A | Example: 1234567890 |
Original Cardholder Initiated transaction ID. | Original transaction in which the cardholder gave permission to store card data for future use. |
prevorderid |
Mandatory | string | 20 | Example: 1234567890 |
Related transaction ID used as the source of stored billing data. | Billing data is valid for 2 years from the original transaction date. Only the most recent order ID should be retained for reuse. |
card-amount |
Mandatory | decimal | 10 | 1234.56 |
Amount to be refunded. 1 | Must be a valid decimal value. |
currency |
Optional / Mandatory | string | 3 | USD |
ISO 3-character currency code. | Used with card-amount. Defaults to USD; required for multicurrency accounts. |
orderID |
Optional | string | 20 | Example: 1234567890 |
Unique identifier for the new return transaction. | If omitted, a system-generated value is created. Must be unique for future references. |
transflags |
Optional | string | N/A | cit, mit |
Card on File indicators for the return. | See allowed values below. Card on File combinations are documented separately. |
transflags Allowed Values
cit/mit– Card on File indicators for cardholder-initiated or merchant-initiated stored credential transactions; see Card On File Requirements
Response Parameters
| Variable | Value | Description | Notes |
|---|---|---|---|
FinalStatus |
success, problem, pending |
Overall result of the return request. | May return pending depending on processor behavior. |
Duplicate |
yes, blank |
Indicates duplicate submission of orderID. |
If yes, original transaction data is echoed. |
success |
yes, no |
Indicates whether the request succeeded. | |
Mstatus |
success, problem, pending |
Legacy status field. | Deprecated in favor of FinalStatus. |
aux-msg |
string | Informational success message. | Example: order marked for settlement. |
MErrMsg |
string | Error message returned on failure. | Includes issues such as invalid orderID or previously returned transactions. |
Notes
- This operation is not directly linked to the original transaction’s settlement records.
- A new
orderIDis generated for each return unless explicitly provided. - Cannot be used for transactions older than 2 years.
- Multiple returns are allowed per original transaction.
- Use this mode when issuing additional or repeated refunds beyond the initial return.
- Ensure the most recent
orderIDis stored for tracking purposes. - Ensure transaction reuse aligns with card storage and Card on File compliance requirements.
Related Documentation
⚠️ Formatting Rule (Applies to All Amount Fields)
-
All monetary values must be numeric only in the format
1234.56. Do not include currency symbols, commas, or formatting. Exactly two decimal places are required. ↩︎