Finxera

Back to documentation index

closeAccount

The closeAccount method allows you to close an account for a client. This method will not let you close an account that has a current balance. If you wish to close an account that has a current balance, you can sweep the account prior to invoking closeAccount using sendFunds, or you can specify a withdrawal method and destination in the request itself.

Request Parameters

  Parameter Required Type Description
subscriberId Y long Specify subscriber ID issued when Finxera account is created.
+ accountId Y Object Specify either bancBoxId or subscriberReferenceId for the account desired.
withdrawalMethod N String If it is necessary to sweep an account before it is cancelled, then specify the type of withdrawal desired { 'ACH', 'CHECK', 'PAYPAL' }
checkMethodType N String Specify the speed of the withdrawal { 'STD', 'TWODAY', 'OVERNIGHT', 'PLUS' }
+ withdrawalAccount N Object Fill in the information for the destination of the withdrawal, choose one of: linkedAccountId, bankAccount, checkAddress.

Response Parameters

  Parameter   Type Description
requestId   long 13 digit ID for the API request being made.
status   int Status of completed request, either 1 for pass, or 0 for fail.
+ warnings   Object A Warning object containing a code and description.
+ errors   Object Request failed, error response.
balance   double Balance
withdrawalAmount   double Withdrawal amount
expectedDate   date Expected date[YYYY-MM-DD]
withdrawalMethod   String Responds with one of the following withdrawalMethods { 'ACH', 'CHECK', 'PAYPAL' }
checkMethodType   String Responds with one of the following checkMethodType { 'STD', 'TWODAY', 'OVERNIGHT', 'PLUS' }

WSDL URL (Production) :  https://api.bancbox.com/v1/BBXPort?wsdl
WSDL URL (SandBox) :  https://sandbox-api.bancbox.com/v1/BBXPort?wsdl

Sample Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="schema.bancbox.com">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="XWSSGID-1261544568770-474929336" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>sample@email.com</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">sample</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
   <soapenv:Body>
      <sch:closeAccount>
         <closeAccountRequest>
           <subscriberId>?</subscriberId>
            <accountId>
               <!--Optional:-->
               <bancBoxId>?</bancBoxId>
               <!--Optional:-->
               <subscriberReferenceId>?</subscriberReferenceId>
            </accountId>
            <!--Optional:--> 
            <withdrawalMethod>?</withdrawalMethod>
            <!--Optional:-->
            <checkMethodType>?</checkMethodType>
                <!--Optional:-->
		<withdrawalAccount> 
               <!--You have a CHOICE of the next 3 items at this level--> 
               <linkedAccountId>?</linkedAccountId> 
               <bankAccount> 
                  <routingNumber>?</routingNumber> 
                  <accountNumber>?</accountNumber> 
                  <holderName>?</holderName> 
                  <bankAccountType>?</bankAccountType> 
               </bankAccount> 
               <checkAddress> 
                  <name>?</name> 
                  <address> 
                     <line1>?</line1> 
                     <!--Optional:--> 
                     <line2>?</line2> 
                     <city>?</city> 
                     <state>?</state> 
                     <zipcode>?</zipcode> 
                  </address> 
               </checkAddress> 
            </withdrawalAccount> 
         </closeAccountRequest>
      </sch:closeAccount>
   </soapenv:Body>
</soapenv:Envelope>

Sample Response

<sch:closeAccountResponse>
         <return>
            <!--Optional:-->
            <requestId>?</requestId>
            <status>?</status>
            <!--Zero or more repetitions:-->
            <warnings>
               <!--Optional:-->
               <code>?</code>
               <!--Optional:-->
               <message>?</message>
            </warnings>
            <!--Zero or more repetitions:-->
            <errors>
               <!--Optional:-->
               <code>?</code>
               <!--Optional:-->
               <message>?</message>
            </errors>
            <!--Zero or more repetitions:-->

            <!--Optional:-->
            <balance>?</balance>
            <!--Optional:-->
            <withdrawalAmount>?</withdrawalAmount>
            <!--Optional:-->
            <expectedDate>?</expectedDate>
            <withdrawalMethod>?</withdrawalMethod>
            <!--Optional:-->
            <checkMethodType>?</checkMethodType>
         </return>
</sch:closeAccountResponse>

Note:For REST, Content-type should be set to application/json
URL (Production) :  https://api.bancbox.com/v1/BBXPortRest/closeAccount
URL (SandBox) :  https://sandbox-api.bancbox.com/v1/BBXPortRest/closeAccount

Sample Request

{ 
   "authentication": 
    { 
        "apiKey":"YOUR_API_KEY_HERE", 
        "secret":"SECRET_PASSPHRASE" 
    }, 
    "subscriberId":?, 
    "accountId": 
    { 
        "bancBoxId":?, 
        "subscriberReferenceId":"?" 
    }, 
    "withdrawalMethod":"?", 
     "checkMethodType":"?", 
    "withdrawalAccount": 
     { 
        "linkedAccountId":?, 
        "bankAccount": 
        { 
            "routingNumber":"?", 
            "accountNumber":"?", 
            "holderName":"?", 
            "bankAccountType":"?" 
        }, 
        "checkAddress": 
        { 
            "name":"?", 
            "address": 
            { 
                "line1":"?", 
                "line2":"?", 
                "city":"?", 
                "state":"?", 
                "zipcode":"?" 
             } 
         } 
    } 
} 

Sample Response

{
    "balance": ? ,
    "withdrawalAmount" : ? ,
    "expectedDate" : "?",
    "withdrawalMethod": "?",
    "requestId": ? ,
    "status" : ? ,
    "warnings" : [{
        "code": "?",
        "message": "?"
    }],
    "errors": [{
        "code": "?",
        "message": "?"
    }]
}