Skip to content

Account to Beneficiary

Request URL

POST /transfer/acc2ben/:AFiBeneficiaryId

Description

Transfers funds from a user's account to the user's pre-registered beneficiary. The beneficiary is identified by a path parameter.

This transfer is not queued. It is executed right away and cannot be undone.

Schema

Property table for schema 1 for transfer/acc2ben/:AFiBeneficiaryId

Property Description Required Schema
srcAcc srcAcc Yes {
  "type": "string"
}
AFiBeneficiaryId ampliFi ID of the beneficiary Yes {
  "type": "string"
}
amount Amount Yes {
  "type": "string"
}
currency 3-letter ISO alphabetic code to identify the currency Yes {
  "type": "string",
  "pattern": "^[A-Z]{3}$"
}
narrativeDebit A brief description, used if transaction is debit No {
  "type": "string",
  "nullable": true
}
narrativeCredit A brief description, used if transaction is credit No {
  "type": "string",
  "nullable": true
}
extrasDebit extrasDebit No {
  "type": "string",
  "nullable": true
}
extrasCredit extrasCredit No {
  "type": "string",
  "nullable": true
}

Property table for schema 2 for transfer/acc2ben/:AFiBeneficiaryId

Property Description Required Schema
sourceAccountId ampliFi ID of source account Yes {
  "type": "string"
}
AFiBeneficiaryId ampliFi ID of the beneficiary Yes {
  "type": "string"
}
amount Amount Yes {
  "type": "string"
}
currency 3-letter ISO alphabetic code to identify the currency Yes {
  "type": "string",
  "pattern": "^[A-Z]{3}$"
}
narrativeDebit A brief description, used if transaction is debit No {
  "type": "string",
  "nullable": true
}
narrativeCredit A brief description, used if transaction is credit No {
  "type": "string",
  "nullable": true
}
extrasDebit extrasDebit No {
  "type": "string",
  "nullable": true
}
extrasCredit extrasCredit No {
  "type": "string",
  "nullable": true
}

Property table for schema 3 for transfer/acc2ben/:AFiBeneficiaryId

Property Description Required Schema
sourceAFiAccountId ampliFi ID of source account Yes {
  "type": "string"
}
AFiBeneficiaryId ampliFi ID of the beneficiary Yes {
  "type": "string"
}
amount Amount Yes {
  "type": "string"
}
currency 3-letter ISO alphabetic code to identify the currency Yes {
  "type": "string",
  "pattern": "^[A-Z]{3}$"
}
narrativeDebit A brief description, used if transaction is debit No {
  "type": "string",
  "nullable": true
}
narrativeCredit A brief description, used if transaction is credit No {
  "type": "string",
  "nullable": true
}
extrasDebit extrasDebit No {
  "type": "string",
  "nullable": true
}
extrasCredit extrasCredit No {
  "type": "string",
  "nullable": true
}

Request Body

{
    "sourceAFiAccountId": "qwegal8kgtmysmels",
    "amount": 0.01,
    "currency": "USD",
    "narrativeDebit": "A description for a debit transaction"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "sourceAFiAccountId": "qwegal8kgtmysmels",
    "amount": 0.01,
    "currency": "USD",
    "narrativeDebit": "A description for a debit transaction"
};
const config = {
  method: 'POST',
  url: '${AMPLIFI_BASE_URL}/transfer/acc2ben/:AFiBeneficiaryId',
  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/transfer/acc2ben/:AFiBeneficiaryId" --data "{    \"sourceAFiAccountId\":\"qwegal8kgtmysmels\",   \"amount\":0.01,   \"currency\":\"USD\",   \"narrativeDebit\":\"A description for a debit transaction\"}" --header "Content-Type: application/json" --header "token: A long random string token received from /token request" 

Successful Response Examples

200 TRANSFER/ACC2BEN/:AFIBENEFICIARYID SUCCESSFUL RESPONSE ACCOUNT TO BENEFICIARY TRANSFER

HEADERS

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

PARAMETERS

Parameter Description Value
AFiBeneficiaryId [required] qwepgbenlq1620trhs

REQUEST BODY

{
    "sourceAFiAccountId": "qwegal8kgtmysmels",
    "amount": 0.01,
    "currency": "USD",
    "narrativeDebit": "A description for a debit transaction"
}

RESPONSE BODY

{
    "success": true,
    "reference": "vvgmxalsuwunwfptjdkv",
    "amount": 0.01,
    "currency": "USD",
    "sourceAccount": {
        "_id": "6333312f048865fc7f5dd4b4",
        "AFiAccountId": "qwegal8kgtmysmels",
        "AFiCardId": "qwegal8kgtmysmels",
        "name": "Checking",
        "typeId": "Standard",
        "accountIdBO": "cd_5cg2g8nddz3r9",
        "backOfficeId": "evolve",
        "backOfficeName": "evolve",
        "status": "active",
        "isActive": true,
        "isClosed": false,
        "num": "100000******7112",
        "rn": "084106768",
        "balance": {
            "currency": "USD",
            "native": 0.44,
            "available": 0.44
        },
        "AFiUserId": "qweaurl8kgtlv9pc",
        "dtsOpened": "2022-09-27T17:21:47.495Z",
        "id": "qwegal8kgtmysmels",
        "dtsUpdated": "2023-12-19T20:06:11.600Z",
        "cardIdBO": "cd_5cg2g8nddz3r9",
        "isActivated": false,
        "dtsExpiry": "2025-10-01T03:59:59.999Z",
        "currency": "USD",
        "name_on_card": "JOHN TESTMAN NKPB",
        "image": "images/card1.png",
        "dtsPreActivated": "2022-09-27T17:21:57.866Z",
        "dtsReissued": "2023-04-18T17:48:03.912Z"
    },
    "beneficiary": {
        "name": "Test9Wire",
        "txnType": "USA_wire",
        "routingNumber": "031101279",
        "accountNumber": "***",
        "amount": 0,
        "currency": "USD",
        "bankName": "Bancorp Bank National Assoc",
        "type": "CHECKING",
        "country": "USA",
        "destinationName": "John Doe",
        "accountTitle": "John Doe1",
        "address": {
            "addressLine1": "123 Main str",
            "addressLine2": "Apt 1",
            "city": "Harrisburg",
            "state": "PA",
            "province": "Pennsylvania",
            "countryCode": "+1",
            "postalCode": "12345"
        },
        "typeName": "USA interbank transfer",
        "logoB64": "data:image/jpeg;base64,a+very+long+b64+encoded_string",
        "AFiBeneficiaryId": "qwepgbenlq1620trhs",
        "defaultAmount": 0,
        "dtsCreated": "2023-12-11T17:07:05.007Z",
        "status": "Active",
        "userId": "qweaurl8kgtlv9pc",
        "AFiUserId": "qweaurl8kgtlv9pc",
        "isFavourite": true,
        "backOfficeId": "evolve",
        "backOfficeName": "evolve",
        "isActive": true
    }
}