Skip to content

Verify External Account

Request URL

POST /externalaccount/verify

Description

This method verifies an external account. It checks if the account is already verified, or calls the backoffice API for verification. The ampliFi external account ID ("AFiExternalAccountId") must be passed in the request body.

Schema

Property table for externalaccount/verify

Property Description Required Schema
AFiExternalAccountId The external account ID in ampliFi Yes {
  "type": "string"
}
amount1 Microdeposit for account verification Yes {
  "type": "number"
}
amount2 Microdeposit for account verification Yes {
  "type": "number"
}

Request Body

{
  "AFiExternalAccountId": "ealgwi5zeneqdpukkseqtq",
  "amount1": 1.50,
  "amount2": 1.01
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
  "AFiExternalAccountId": "ealgwi5zeneqdpukkseqtq",
  "amount1": 1.50,
  "amount2": 1.01
};
const config = {
  method: 'POST',
  url: '${AMPLIFI_BASE_URL}/externalaccount/verify',
  headers: {
    'Content-Type': "application/json",
    'token': "A long random string token received from /token request"
  },
  data
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/externalaccount/verify" --data "{  \"AFiExternalAccountId\":\"ealgwi5zeneqdpukkseqtq\", \"amount1\":1.50, \"amount2\":1.01}" --header "Content-Type: application/json" --header "token: A long random string token received from /token request" 

Successful Response Examples

200 EXTERNALACCOUNT/VERIFY SUCCESSFUL RESPONSE EXTERNAL ACCOUNT VERIFICATION

HEADERS

Header Value
Content-Type application/json
token A long random string token received from /token request

REQUEST BODY

{
  "AFiExternalAccountId": "ealgwi5zeneqdpukkseqtq",
  "amount1": 1.50,
  "amount2": 1.01
}

RESPONSE BODY

{
    "success": true
}