Appearance
Payments
Execute payments from an account to beneficiaries.
Private Client SA
Get your accounts and beneficiaries and execute a payment.
js
(async function fetchData() {
try {
const accounts = await invsy.api.privateClient.pbsa.accounts.list();
const beneficiaries = await invsy.api.privateClient.pbsa.beneficiaries.list();
const payload = {
AccountId: '268750605111572692917',
BeneficiaryPaymentList: [{
'AuthoriserAId': '0',
'AuthoriserBId': '0',
'AuthPeriod': '1',
'BeneficiaryChanged': false,
'ShouldSave': false,
'SaveResponse': '',
'Amount': '2.00',
'FasterPayment': false,
'PayShapPayment': false,
'BeneficiaryAccountId': 'MTAxOTE3Mzc1NDA1Njc=',
'BeneficiaryName': 'Steyn Attorneys',
'BeneficiaryFaxNo': '',
'BeneficiaryCellNo': '',
'BeneficiaryEmail': 'ruhan.odendaal@investec.co.za',
'FaxNumber': '',
'EmailAddress': 'ruhan.odendaal@investec.co.za',
'CellNumber': '',
'BeneficiaryNotificationTypeId': '2',
'Code': '580105',
'CodeExt': 'INVESTEC BANK LIMITED',
'ApprovedBeneficiary': false,
'BenName': 'Steyn Attorneys',
'AccountNumber': '10011054512',
'BeneficiaryCategoryId': '1635431548',
'MyReference': 'local savings',
'TheirReference': 'local savings',
'AccountType': 'Cheque'
}]
}
const paymentResult = await invsy.api.privateClient.pbsa.payments.beneficiary(payload);
return paymentResult.result;
} catch (error) {
console.error(error);
}
})()(async function fetchData() {
try {
const accounts = await invsy.api.privateClient.pbsa.accounts.list();
const beneficiaries = await invsy.api.privateClient.pbsa.beneficiaries.list();
const payload = {
AccountId: '268750605111572692917',
BeneficiaryPaymentList: [{
'AuthoriserAId': '0',
'AuthoriserBId': '0',
'AuthPeriod': '1',
'BeneficiaryChanged': false,
'ShouldSave': false,
'SaveResponse': '',
'Amount': '2.00',
'FasterPayment': false,
'PayShapPayment': false,
'BeneficiaryAccountId': 'MTAxOTE3Mzc1NDA1Njc=',
'BeneficiaryName': 'Steyn Attorneys',
'BeneficiaryFaxNo': '',
'BeneficiaryCellNo': '',
'BeneficiaryEmail': 'ruhan.odendaal@investec.co.za',
'FaxNumber': '',
'EmailAddress': 'ruhan.odendaal@investec.co.za',
'CellNumber': '',
'BeneficiaryNotificationTypeId': '2',
'Code': '580105',
'CodeExt': 'INVESTEC BANK LIMITED',
'ApprovedBeneficiary': false,
'BenName': 'Steyn Attorneys',
'AccountNumber': '10011054512',
'BeneficiaryCategoryId': '1635431548',
'MyReference': 'local savings',
'TheirReference': 'local savings',
'AccountType': 'Cheque'
}]
}
const paymentResult = await invsy.api.privateClient.pbsa.payments.beneficiary(payload);
return paymentResult.result;
} catch (error) {
console.error(error);
}
})()