RocketKOR

Reverse a Transaction

Reverse a transaction. You can reverse transactions that have a SETTLED or CLEARED status. This API is available for some RocketKOR solutions, such as ACH.

You can reverse a transaction for the following reasons:

  • The transaction is a duplicate transaction (DUPLICATE_PAYMENT).
  • The debit or credit Financial Account used in the transaction is incorrect (INCORRECT_RECIPIENT).
  • The transaction amount is incorrect (INCORRECT_AMOUNT).

When you reverse a transaction, the following operations are performed:

  • A transaction history entry is recorded for the original transaction with an event_type of REVERSAL.
  • A new REVERSAL transaction is created. The REVERSAL transaction is linked to the original transaction through the parentId field.
  • If the transaction amount or Financial Account ID has been changed, a new correction transaction is created.

Reversal Transaction

The reversal transaction is identical to the original transaction, with the following exceptions:

  • transactionType is REVERSAL.
  • settlementPriority is NEXT_DAY.
  • parentTransactionId is set to the ID of the original transaction.
  • A value is provided for reversalReason.

Correction Transaction

For INCORRECT_RECIPIENT and INCORRECT_AMOUNT reversals, a new correction transaction is posted after the original transaction is reversed.

  • For SEND transactions, a correction transaction will be created for the original credit Financial Account.
  • For REQUEST transactions, a correction transaction will be created for the original debit Financial Account.

Endpoint

POST /v1/transactions/{transactionId}/reverse

Authorization Header

Authorization: Bearer <access_token>

Idempotency-Key Header

Idempotency-Key: <key>

where <key> is a v4 UUID or any other unique string with a minimum length of 6 characters and a maximum length of 255 characters.

The idempotency key identifies the request. If a network error occurs, you can safely retry the request using the same idempotency key and the request will only be executed once. This ensures that calling the API multiple times will not result in duplicate requests. For more information, see Idempotent Calls.

Path Parameters

transactionId  REQUIRED

string (UUID)

ID of the transaction in the RocketKOR system.

Request Body

reversalReason  REQUIRED

string enum, values: DUPLICATE_PAYMENT, INCORRECT_RECIPIENT, INCORRECT_AMOUNT

Reason to reverse the transaction. The following values are supported:

  • DUPLICATE_PAYMENT  The transaction is a duplicate transaction.
  • INCORRECT_RECIPIENT  The debit or credit Financial Account is incorrect.
  • INCORRECT_AMOUNT  The transaction amount is incorrect.

correctionAmount  CONDITIONAL

string

Required for INCORRECT_AMOUNT reversals only. Leave blank for other reversal types.

Provide the correct transaction amount. This amount will be used in the correction transaction.

correctionFinancialAccountId  CONDITIONAL

string (UUID)

Required for INCORRECT_RECIPIENT reversals only. Leave blank for other reversal types.

Provide the correct debit or credit Financial Account ID for the transaction. This Financial Account ID will be used in the correction transaction. Provide only one of the following:

  • debitFinancialAccountId  ID of the Financial Account used as the debit account (source of the funds) for the transaction.
  • creditFinancialAccountId  ID of the Financial Account used as the credit account (receiver of the funds) for the transaction.

Returns

Returns a Transaction object for the reversal transaction and a Transaction object for the correction transaction (if one is created).

SAMPLE REQUEST

				
					{
  "reversalReason": "INCORRECT_AMOUNT",
  "correctionAmount": "1200.00"
}
				
			

SAMPLE RESPONSE

				
					{
  "reversalTransaction": {
    "id": "e4e10775-1dd1-4001-a797-2de429637f1c",
    "businessAccountId": "4hy47a98-2453-9867-u3qa-5p347q98kim4",
    "metadata": {
      "myPaymentId": "100000333",
      "invoiceNumber": "123232333",
      "authorizedBy": "user@email.com"
    },
    "debitFinancialAccountId": "6a017f06-83a3-44b7-be6f-5e5cae4a9ed7",
    "creditFinancialAccountId": "4py56a34-4686-1539-c2ga-1a723g55dlq3",
    "transactionType": "REVERSAL",
    "solution": "ach",
    "paymentReasonId": "loan-payouts",
    "paymentReason": "Loan Payouts",
    "amount": "900.00",
    "currency": "USD",
    "settlementPriority": "SAME_DAY",
    "latestStatus": {
      "status": "NEW",
      "message": "Transaction creation successful",
      "createdBy": {
        "id": "b6333b53-3222-4227-a71e-718b25ca3ea4",
        "type": "service-account"
      },
      "createdAt": "2022-12-02T03:06:08.901Z"
    },
    "createdBy": {
      "id": "b6333b53-3222-4227-a71e-718b25ca3ea4",
      "type": "service-account"
    },
    "createdAt": "2022-12-02T03:06:08.901Z",
    "reversalReason": "INCORRECT_AMOUNT",
    "description": "ABC",
    "memo": "ABC"
  },
  "correctionTransaction": {
    "id": "44ac9fec-e792-4bb2-9c52-78845345a8b8",
    "businessAccountId": "4hy47a98-2453-9867-u3qa-5p347q98kim4",
    "metadata": {
      "myPaymentId": "100000333",
      "invoiceNumber": "123232333",
      "authorizedBy": "user@email.com"
    },
    "debitFinancialAccountId": "6a017f06-83a3-44b7-be6f-5e5cae4a9ed7",
    "creditFinancialAccountId": "4py56a34-4686-1539-c2ga-1a723g55dlq3",
    "transactionType": "SEND",
    "solution": "ach",
    "paymentReasonId": "loan-payouts",
    "paymentReason": "Loan Payouts",
    "amount": "1200.00",
    "currency": "USD",
    "settlementPriority": "SAME_DAY",
    "latestStatus": {
      "status": "NEW",
      "message": "Transaction creation successful",
      "createdBy": {
        "id": "b6333b53-3222-4227-a71e-718b25ca3ea4",
        "type": "service-account"
      },
      "createdAt": "2022-12-13T03:06:08.901Z"
    },
    "createdBy": {
      "id": "b6333b53-3222-4227-a71e-718b25ca3ea4",
      "type": "service-account"
    },
    "createdAt": "2022-12-13T03:06:08.901Z",
    "reversalReason": "",
    "description": "ABC",
    "memo": "ABC"
  }
}