Skip to main content

Close Account


Overview

You can initiate account closure, at any point, using the Close Account API.

Prerequisites
  • Account closure can be initiated if the account doesn't have unprocessed transaction(s) — i.e., transactions in SCHEDULED / PENDING status.
  • The account will be closed once all transactions in PROCESSING status are COMPLETED and the SEND (created to move the outstanding balance amount from that account to the customer's external account via ACH or address via check) gets COMPLETED.

Resource Access

Production (api.ahrvo.network)

POST https://api.ahrvo.network/banking/us2/v1/customer/id/{customerId}/account/id/{accountId}/close

Staging (gateway.ahrvo.network)

POST https://gateway.ahrvo.network/banking/us2/v1/customer/id/{customerId}/account/id/{accountId}/close

Authentication

HeaderDescription
AuthorizationBearer {JWT token}
x-api-keyYour API key
Content-Typeapplication/json

Path Parameters

ParameterTypeDescription
customerIdintegerInternal customer ID
accountIdintegerInternal account ID

Arguments

FieldM / ODescription
cancelUnprocessedSchedulesOInstruction to cancel unprocessed transactions
reasonMReason for initiating account closure
commentConditionalRequired if reason is OTHERS. Additional reason(s) for account closure.
outstandingBalanceInstructionMThe destination and preferred method for moving the balance amount
outstandingBalanceInstruction.preferredMethodMPreferred method: ACH or CHECK
outstandingBalanceInstruction.destinationMDestination for the outstanding balance
outstandingBalanceInstruction.destination.externalAccount.idOExternal account ID (for ACH method)
outstandingBalanceInstruction.destination.externalAccount.externalIdOExternal account external ID (for ACH method)
outstandingBalanceInstruction.destination.address.idOAddress ID (for CHECK method)
outstandingBalanceInstruction.destination.address.externalIdOAddress external ID (for CHECK method)
outstandingBalanceInstruction.processingDetail.processingModeOProcessing mode (for ACH method)
outstandingBalanceInstruction.processingDetail.deliveryModeODelivery mode (for CHECK method)

Example Request

Close Account with ACH

POST /banking/us2/v1/customer/id/4000180/account/id/4024062/close HTTP/1.1
Host: api.ahrvo.network
Authorization: Bearer {placeholder("JWT token")}
x-api-key: {placeholder("your-api-key")}
Content-Type: application/json
{
"cancelUnprocessedSchedules": true,
"reason": "OTHERS",
"comment": "Health Emergency",
"outstandingBalanceInstruction": {
"destination": {
"externalAccount": {
"id": "4004445"
}
},
"preferredMethod": "ACH",
"processingDetail": {
"processingMode": "FORWARD"
}
}
}

Example Response

HTTP Status: 200 OK

Important Notes

Outstanding Balance

When closing an account, any outstanding balance will be transferred to the specified destination using the preferred method (ACH or CHECK).

Unprocessed Transactions

Account closure cannot be initiated if there are transactions in SCHEDULED or PENDING status. Set cancelUnprocessedSchedules to true to cancel them automatically.

ACH vs CHECK
  • ACH: Specify destination.externalAccount and processingDetail.processingMode
  • CHECK: Specify destination.address and processingDetail.deliveryMode

Interactive API Explorer