BeneficiaryUSA Reference
Constructor
The BeneficiaryUSA class extends the Beneficiary class and has all of the corresponding properties and methods, with the addition of the ACH properties specified in this documentation. See the Beneficiary Reference documentation for additional information on the base Beneficiary class.
const newBeneficiary = TheM.beneficiaries.newTempBeneficiary('USA', {//beneficiary properties});
await newBeneficiary.doSubmit(givenProperties);
Example
const newBeneficiary = TheM.beneficiaries.newTempBeneficiary('USA', {
txnType: 'USA',
name: 'ACH Payee',
bankName: 'Citibank NA',
destinationName: 'Receiving account title',
accountNumber: '1234567890123456',
routingNumber: '123456789',
defaultAmount: 20,
narrativeDebit: 'ACH payment',
isFavourite: true,
type: 'CHECKING'
});
await newBeneficiary.doSubmit({});
Properties
Property table for BeneficiaryUSA
Property | Description | Required | Schema |
---|---|---|---|
destinationName | Gets (returns) the destination account title (who owns the beneficiary account). | Yes | { "title": "TheM.beneficiaries[0].destinationName", "type": "string", "description": "Gets (returns) the destination account title (who owns the beneficiary account).", "examples": [ "Receiving account title" ], "nullable": false } |
bankName | Gets (returns) the beneficiary's bank name. | Yes | { "title": "TheM.beneficiaries[0].bankName", "type": "string", "description": "Gets (returns) the beneficiary's bank name.", "examples": [ "Citibank NA" ], "nullable": false } |
routingNumber | Gets (returns) the routing number of the beneficiary account. | Yes | { "title": "TheM.beneficiaries[0].routingNumber", "type": "string", "description": "Gets (returns) the routing number of the beneficiary account.", "examples": [ "123456789" ], "nullable": false } |
accountNumber | Gets (returns) the account number of the beneficiary account. | Yes | { "title": "TheM.beneficiaries[0].accountNumber", "type": "string", "description": "Gets (returns) the account number of the beneficiary account.", "examples": [ "1234567890123456" ], "nullable": false } |
type | Gets (returns) the beneficiary account type. | Yes | { "title": "TheM.beneficiaries[0].type", "type": "string", "description": "Gets (returns) the beneficiary account type.", "examples": [ "CHECKING", "SAVINGS" ], "nullable": false } |
isValid | Gets (returns) true if all the required beneficiary details are present and valid. For BeneficiaryUSA class instances, the transaction type (txnType) is 'USA', representing an ACH transfer, and will require the following properties to be considered valid: name, destinationName, bankName, routingNumber, accountNumber, and type. | Yes | { "title": "TheM.beneficiaries[0].isValid", "type": "boolean", "description": "Gets (returns) true if all the required beneficiary details are present and valid. For BeneficiaryUSA class instances, the transaction type (txnType) is 'USA', representing an ACH transfer, and will require the following properties to be considered valid: name, destinationName, bankName, routingNumber, accountNumber, and type.", "examples": [ true, false ], "nullable": false } |
toJSON | Gets (returns) the beneficary properties in a JSON formatted object. | Yes | { "title": "TheM.beneficiaries[0].toJSON", "type": "object", "description": "Gets (returns) the beneficary properties in a JSON formatted object.", "examples": [ { "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-06-28T11:12:10.053Z" } ], "nullable": false } |