Skip to content

Remittance Reference

Constructor

A new instance of the Remittance class is initialized by callingconst remittanceName = TheM.remittance.newRemittance. After initialization, the required Remittance properties should be populated and then the remittance can be submitted to the server using await TheM.remittance.doSubmit(remittanceName).

const remittanceName = TheM.remittance.newRemittance;

Example

const remittanceName = TheM.remittance.newRemittance;
remittanceName.transactionTypeId = 'USA';
remittanceName.sourceAccount = TheM.accounts[0];
remittanceName.beneficiary = TheM.beneficiaries[0];
remittanceName.amount = 10;
remittanceName.currency = TheM.accounts[0].balance.currency;
await TheM.remittance.doSubmit(remittanceName);

Properties

Property table for Remittance

Property Description Required Schema
AFiRemittanceId Gets (returns) the AFiRemittanceId, the ID of this remittance transfer in ampliFi. Yes {
  "title": "remittanceName.AFiRemittanceId",
  "type": "string",
  "description": "Gets (returns) the
AFiRemittanceId, the ID of this remittance
transfer in ampliFi.",
  "$comment": "getter",
  "examples": [
   
"jb17199168600718m6acjetf8ub0z2ehhjfx9fv70c1o
a3y73pmq5t8"
  ],
  "nullable": false
}
amount Gets (returns) or sets the amount that is to be transferred. The setter can accept a string or a number, the amount must be greater than or equal to 0, and the amount must have no more than 2 decimal places. Yes {
  "title": "remittanceName.amount",
  "type": "number",
  "description": "Gets (returns) or sets the amount
that is to be transferred. The setter can accept a
string or a number, the amount must be greater than or
equal to 0, and the amount must have no more than 2
decimal places.",
  "$comment": "getter setter",
  "examples": [
    10.01
  ],
  "nullable": false
}
currency Gets (returns) or sets the currency that is to be transferred. The currency must be an allowed value. In other words, TheM.restrictions.isCurrencyAllowed(remittanceName.transactionTypeId, givenCurrency) must return true. The restrictions submodule of TheM must be one of the submodules initialized in the current session in order to successfully set the currency property and the fxrates submodule is required for currency conversion checks. Yes {
  "title": "remittanceName.currency",
  "type": "string",
  "description": "Gets (returns) or sets the
currency that is to be transferred. The currency
must be an allowed value. In other words,
TheM.restrictions.isCurrencyAllowed(remittanc
eName.transactionTypeId, givenCurrency) must
return true. The restrictions submodule of TheM
must be one of the submodules initialized in the
current session in order to successfully set the
currency property and the fxrates submodule is
required for currency conversion checks.",
  "$comment": "getter setter",
  "examples": [
    "USD"
  ],
  "nullable": false
}
beneficiary Gets (returns) or sets the beneficiary for the remittance transfer. The beneficiary must exist in the TheM.beneficiaries array for this user. When setting a new beneficiary, use remittanceName.beneficiary = AFiBeneficiaryId, where AFiBeneficiaryId is the ID in ampliFi of the desired beneficiary. Optionally, the setter can also take a Beneficiary object value, like remittanceName.beneficiary = TheM.beneficiaries[0]. The getter will return the Beneficiary object that corresponds with the set AFiBeneficiaryId. Yes {
  "title": "remittanceName.beneficiary",
  "type": "object",
  "description": "Gets (returns) or sets the
beneficiary for the remittance transfer. The
beneficiary must exist in the TheM.beneficiaries
array for this user. When setting a new beneficiary,
use remittanceName.beneficiary =
AFiBeneficiaryId, where AFiBeneficiaryId is the
ID in ampliFi of the desired beneficiary.
Optionally, the setter can also take a Beneficiary
object value, like remittanceName.beneficiary =
TheM.beneficiaries[0]. The getter will return the
Beneficiary object that corresponds with the set
AFiBeneficiaryId.",
  "$comment": "getter setter",
  "examples": [
    {
      "AFiBeneficiaryId": "testpgbenlxuma31jlu",
      "beneficiaryId": "testpgbenlxuma31jlu",
      "AFiPayeeId":
"3gzvss70aqhkjh0gcmwz6fr6eutmzmf8",
      "AFiUserId": "testaurlx8wfimcrw",
      "userId": "testaurlx8wfimcrw",
      "name": "ACH Payee Account",
      "destinationName": "Receiving account title",
      "backOfficeId": "connectFiBOIS",
      "backOfficeName": "connectFiBOIS",
      "backOffices": [],
      "type": "CHECKING",
      "typeName": "USA interbank transfer",
      "accountNumber": "1234567890123456",
      "routingNumber": "123456789",
      "bankName": "Citibank NA",
      "txnType": "USA",
      "status": "Active",
      "defaultAmount": 0,
      "defaultCurrency": "USD",
      "narrativeDebit": "ACH payment",
      "narrativeCredit": "",
      "imageBase64":
"Very_Long_Base64_Image_String",
      "dtsCreated": "2024-07-03T12:45:26.800Z",
      "dtsUpdated": "2024-07-03T12:45:26.800Z",
      "isActive": true,
      "isBusiness": false,
      "isDeleted": false,
      "isFavourite": false,
      "isHidden": false,
      "isPaying": false,
      "isValid": true,
      "toJSON": {
        "AFiBeneficiaryId": "testpgbenlxuma31jlu",
        "AFiPayeeId":
"3gzvss70aqhkjh0gcmwz6fr6eutmzmf8",
        "accountNumber": "1234567890123456",
        "routingNumber": "123456789",
        "bankName": "Citibank NA",
        "defaultAmount": 20,
        "destinationName": "Receiving account title",
        "isActive": true,
        "isBusiness": false,
        "isFavourite": true,
        "isHidden": false,
        "name": "ACH Payee Account",
        "narrativeDebit": "ACH payment",
        "status": "Active",
        "txnType": "USA",
        "type": "CHECKING",
        "imageBase64":
"Very_Long_Base64_Image_String",
        "dtsCreated": "2024-07-03T12:45:26.800Z"
      },
      "transactions": [],
      "validationMessage": ""
    }
  ],
  "nullable": false
}
sourceAccount Gets (returns) or sets the source account for the remittance transfer. The source account must belong to the user. When setting a new source account, use remittanceName.sourceAccount = AFiAccountId, where AFiAccountId is the account ID in ampliFi of the desired source account. Optionally, the setter can also take an Account object value, like remittanceName.sourceAccount = TheM.accounts[0]. The getter will return the Account object that corresponds with the set AFiAccountId. Yes {
  "title": "remittanceName.sourceAccount",
  "type": "object",
  "description": "Gets (returns) or sets the source
account for the remittance transfer. The source
account must belong to the user. When setting a new
source account, use
remittanceName.sourceAccount = AFiAccountId,
where AFiAccountId is the account ID in ampliFi of
the desired source account. Optionally, the setter
can also take an Account object value, like
remittanceName.sourceAccount =
TheM.accounts[0]. The getter will return the
Account object that corresponds with the set
AFiAccountId.",
  "$comment": "getter setter",
  "examples": [
    {
      "AFiCardId": "testgalx8wfq4sqfgb",
      "backOfficeId": "connectFiBOIS",
      "backOfficeName": "connectFiBOIS",
      "currency": "USD",
      "isClosed": false,
      "lastDepositAmount": 0,
      "rn": "123456789",
      "status": "Card was issued but has not yet been
activated",
      "type": "Current",
      "AFiAccountId": "testgalx8wfq4sqfgb",
      "AFiUserId": "testaurlx8wfimcrw",
      "balance": {
        "available": 10,
        "currency": "USD",
        "native": 10,
        "toJSON": {
          "available": 10,
          "currency": "USD",
          "native": 10
        }
      },
      "card": {},
      "cards": [
        {}
      ],
      "dtsOpened": "Mon Jun 10 2024 07:37:54 GMT-0400
(Eastern Daylight Time)",
      "dtsUpdated": "Wed Jun 12 2024 12:06:30 GMT-0400
(Eastern Daylight Time)",
      "fullName": "Main account",
      "id": "testgalx8wfq4sqfgb",
      "isActive": false,
      "isHidden": false,
      "isMain": false,
      "name": "Main account",
      "num": "1000000123456789",
      "primaryUserAFiUserId": "testaurlx8wfimcrw",
      "toJSON": {
        "AFiAccountId": "testgalx8wfq4sqfgb",
        "AFiUserId": "testaurlx8wfimcrw",
        "balance": {
          "available": 10,
          "native": 10,
          "currency": "USD"
        },
        "dtsOpened": "Mon Jun 10 2024 07:37:54 GMT-0400
(Eastern Daylight Time)",
        "dtsUpdated": "Wed Jun 12 2024 08:47:17 GMT-0400
(Eastern Daylight Time)",
        "isActive": false,
        "isHidden": false,
        "name": "Main account",
        "num": "1000000123456789",
        "transactions": [
          {}
        ],
        "typeId": "Standard"
      },
      "transactions": [
        {
          "AFiAccountId": "testgalx8wfq4sqfgb",
          "AFiUserId": "testaurlx8wfimcrw",
          "arn": "0000000000000006LBor",
          "dtsAtMerchant": "Mon Jun 10 2024 07:37:55
GMT-0400 (Eastern Daylight Time)",
          "dtsRecorded": "Mon Jun 10 2024 07:38:51 GMT-0400
(Eastern Daylight Time)",
          "fee": 0,
          "internal": {},
          "is3DSecure": false,
          "isComplete": true,
          "isDigitalWalletTrans": false,
          "isPaymentTrans": true,
          "isRecurring": false,
          "reference": "testrr8wgyjgssximb",
          "transactionIdBO": "F2167329415",
          "transactionState": "complete",
          "typeName": "",
          "amount": 10,
          "attachments": {},
          "attachmentsArray": [],
          "credit": 10,
          "currency": "USD",
          "debit": 0,
          "dtsBooked": "Mon Jun 10 2024 07:37:55 GMT-0400
(Eastern Daylight Time)",
          "dtsValue": "Mon Jun 10 2024 07:37:55 GMT-0400
(Eastern Daylight Time)",
          "isBlacklistable": false,
          "isWhitelistable": false,
          "narrative": "🎁 Welcome bonus",
          "newBalance": null,
          "transactionId":
"dcuosrklcjxpyzxagroxbbrspacuhiecwfzltzke",
          "txnType": "credit",
          "toJSON": {}
        }
      ],
      "typeId": "Standard"
    }
  ],
  "nullable": false
}
narrativeCredit Gets (returns) or sets the narrative description for this remittance transfer if it is a credit. No {
  "title": "remittanceName.narrativeCredit",
  "type": "string",
  "description": "Gets (returns) or sets the
narrative description for this remittance
transfer if it is a credit.",
  "$comment": "getter setter",
  "examples": [
    "Transfer from beneficiary"
  ]
}
narrativeDebit Gets (returns) or sets the narrative description for this remittance transfer if it is a debit. No {
  "title": "remittanceName.narrativeDebit",
  "type": "string",
  "description": "Gets (returns) or sets the
narrative description for this remittance
transfer if it is a debit.",
  "$comment": "getter setter",
  "examples": [
    "Transfer to beneficiary"
  ]
}
transactionTypeId Gets (returns) or sets the transaction type ID for the funds transfer. If remittanceName.AFiBeneficiaryId is defined and represents a valid beneficiary, then this value will be the txnType of the beneficiary. Otherwise, a string value for remittanceName.transactionTypeId may be set. Transaction types include 'USA' - an ACH transfer, 'USA_wire' - a wire transfer, 'cheque' - a paper check, 'international' - an international transfer, 'tocard' - a transfer to a card, and '2' - a transfer within ampliFi. Yes {
  "title": "remittanceName.transactionTypeId",
  "type": "string",
  "description": "Gets (returns) or sets the
transaction type ID for the funds transfer. If
remittanceName.AFiBeneficiaryId is defined and
represents a valid beneficiary, then this value
will be the txnType of the beneficiary. Otherwise, a
string value for
remittanceName.transactionTypeId may be set.
Transaction types include 'USA' - an ACH transfer,
'USA_wire' - a wire transfer, 'cheque' - a paper
check, 'international' - an international
transfer, 'tocard' - a transfer to a card, and '2' - a
transfer within ampliFi.",
  "$comment": "getter setter",
  "examples": [
    "2",
    "USA",
    "USA_wire",
    "cheque",
    "international",
    "tocard"
  ],
  "nullable": false
}
other Gets (returns) or sets an optional object containing any additional properties that relate to the remittance transfer. No {
  "title": "remittanceName.other",
  "type": "object",
  "description": "Gets (returns) or sets an optional
object containing any additional properties that
relate to the remittance transfer.",
  "$comment": "getter setter",
  "examples": [
    {
      "extraProperty": "Value of extra property"
    }
  ],
  "default": {}
}
validationMessage Gets (returns) a validation message if the remittance transfer (Remittance entity) has invalid or missing properties. No {
  "title": "remittanceName.validationMessage",
  "type": "string",
  "nullable": true,
  "description": "Gets (returns) a validation
message if the remittance transfer (Remittance
entity) has invalid or missing properties.",
  "$comment": "getter",
  "examples": [
    "Select the account your want to transfer from",
    "Select the beneficiary you want to transfer to",
    "The beneficiary has no address",
    "Select the currency",
    "Type in the amount",
    "Can not transfer money from this account to this
beneficiary",
    "Amount exceeds the balance available on the source
account"
  ],
  "default": ""
}
isValid Gets (returns) a promise that will resolve to true if all the data required for the remittance transfer is valid with current properties and transaction is ready to be submitted to the server. Yes {
  "title": "remittanceName.isValid",
  "type": "boolean",
  "description": "Gets (returns) a promise that will
resolve to true if all the data required for the
remittance transfer is valid with current
properties and transaction is ready to be submitted
to the server.",
  "$comment": "getter",
  "examples": [
    true,
    false
  ],
  "nullable": false
}