Reverse Transaction
Request method and URL
POST /condor/transaction/reversal
(deprecated)
Description
This endpoint is deprecated. Instead of using /condor endpoints, it is recommended to use /ibis endpoints. Ibis endpoints support credit-card issuing, debit-card issuing, and vAccount issuing.
This endpoint will reverse a previously completed transaction. Transactions can not be reversed for debit cards with status values of "BLOCK", "FRAUD_BLOCK", or "CLOSED" or if the checking account associated with the debit card used has insufficient funds to complete the reversal.
Required Properties | Description | Schema | Example Values |
---|---|---|---|
transactionId | The transaction ID in connectFi of the transaction to reverse | String | "cс_3mMsxtaBouaAe6mJGY0kty" |
Optional Properties | Description | Schema | Example Values |
---|---|---|---|
"forcePost" | Boolean, nullable | false | |
"reason" | A description of the reason for the reversal. The value can be null. | String, nullable | "Transaction refund" |
Request Body
HEADERS
{
"Content-Type": "application/json",
"x-connectfi-token": "a long random string" //Authorization token received from /auth/get-token request
}
REQUEST BODY
Successful Response Example
200 (HTTP response status code) -- Success, the specified transaction was reversed
{
"code": "0", //Success
"data": {
"transaction": {
"transaction_type": "DEBIT", //type of tranaction that was reversed (In this case, the original transaction was a DEBIT, so the reversal CREDITed the card)
"amount": -1.05, //amount that was reversed (In this case, the original transaction was for -1.05, so the reversal ADDED 1.05 to the available balance)
"currency_code": "USD", //currency code
"state": "COMPLETE", //state of the transaction that was reversed
"running_balance": 682.57, //available balance after the reversal has occurred (In this case, original available balance was 681.52. After 1.05 was credited back to the debit card, 682.57 is now available.)
"iso_message_type": "0400",
"international": false,
"transaction_datetime": "2022-11-02T16:57:56.614Z",
"additional_data": {},
"id": "cс_3mMsxtaBouaAe6mJGY0kty_B", //transaction ID in connectFi
"cardId": "crda_5Mx3p6lSIQevd0qwfFhhSs" //card ID in connectFi
}
}
}
Errors
400 (HTTP response status code) -- Transaction already reversed
In this example, a request to reverse a transaction that had already been successfully reversed was attempted.
{
"code": "extCondor",
"subCode": "T0010",
"context": {
"title": "cardsTransactionReversal"
},
"message": "Transaction already reversed."
}
400 (HTTP response status code) -- Insufficient funds
In this example, a reversal was attempted that would result in a negative available balance after the transaction reversal. This resulted in an error because the transaction was not allowed. Insufficient funds were available to complete the reversal.
{
"code": "extCondor",
"subCode": "T0005",
"context": {
"title": "cardsTransactionReversal"
},
"message": "MoneyGram POS Money Load Decline (MoneyGram POS Money Load Service is Not Allowed)"
}
400 (HTTP response status code) -- Reversal Decline (Inactive Card)
In this example, a request to reverse a transaction for a debit card with a status of "BLOCK" was attempted.
{
"code": "extCondor",
"subCode": "T0005",
"context": {
"title": "cardsTransactionReversal"
},
"message": "Reversal Decline (Inactive Card)"
}
400 (HTTP response status code) -- Reveral Decline (Suspected Fraud Hit, Card is Already Blocked)
In this example, a request to reverse a transaction for a debit card with a status of "FRAUD_BLOCK" was attempted.
{
"code": "extCondor",
"subCode": "T0005",
"context": {
"title": "cardsTransactionReversal"
},
"message": "Reversal Decline (Suspected Fraud Hit, Card is Already Blocked)"
}
400 (HTTP response status code) -- Reversal Decline (Closed Card)
In this example, a request to reverse a transaction for a debit card with a status of "CLOSED" was attempted.
{
"code": "extCondor",
"subCode": "T0005",
"context": {
"title": "cardsTransactionReversal"
},
"message": "Reversal Decline (Closed Card)"
}
400 (HTTP response status code) -- Transaction not found
In this example, a reversal was requested on a transaction ID that does not exist in the connectFi system.
400 (HTTP response status code) -- Customer not found (debit card customer)
In this example, a valid connectFi customerId was used, but the customer has not yet been initialized as a debit card customer. (See Create a Debit Card and Checking Account).
{
"code": "condorCustomerNotFound",
"message": "Condor Customer Not Found customerId=csta-YbQeg60v7orvQFIYA7gKU"
}
400 (HTTP response status code) -- Customer not found (connectFi)
In this example, an invalid connectFi customerId was used.
{
"code": "aggregatorCustomerNotFound",
"context": {
"customerId": "csta-YbQeg60v7orvQFIYA7gKU1"
},
"message": "Customer not found"
}
400 (HTTP response status code) -- Card not found
In this example, an invalid cardId was used in the request body. The cardId does not exist.