Skip to main content

Actions

The ballerinax/microsoft.dynamics365.finance.payment package exposes the following clients:

ClientPurpose
ClientProvides access to Microsoft Dynamics 365 Finance Payment entities (currencies, exchange rates, payment calendars, payment days, payment instructions, payment methods, payment terms, voucher types, and VRM reference data) via OData.

Client

Provides access to Microsoft Dynamics 365 Finance Payment entities (currencies, exchange rates, payment calendars, payment days, payment instructions, payment methods, payment terms, voucher types, and VRM reference data) via OData.

Configuration

FieldTypeDefaultDescription
authOAuth2ClientCredentialsGrantConfigRequiredOAuth2 client credentials configuration containing tokenUrl, clientId, clientSecret, and scopes for authenticating against Microsoft Entra ID.
httpVersionhttp:HttpVersionhttp:HTTP_2_0HTTP protocol version to use for outbound requests.
http1Settingshttp:ClientHttp1Settings{}Configurations related to the HTTP/1.x protocol.
secureSockethttp:ClientSecureSocket?()SSL/TLS configuration for secure connections.
proxyhttp:ProxyConfig?()HTTP proxy server configuration.

Initializing the client

import ballerinax/microsoft.dynamics365.finance.payment;

configurable string tokenUrl = ?;
configurable string clientId = ?;
configurable string clientSecret = ?;
configurable string serviceUrl = ?;

payment:Client fo = check new (
{
auth: {
tokenUrl,
clientId,
clientSecret
}
},
serviceUrl
);

Operations

Currencies

listCurrencies

Lists Currency records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListCurrenciesQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: CurrenciesCollection|error

Sample code:

payment:CurrenciesCollection result = check fo->listCurrencies();
createCurrencies

Creates a new Currency.

Parameters:

NameTypeRequiredDescription
payloadCurrencyYesThe Currency record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: Currency|error

Sample code:

payment:Currency payload = {
currencyCode: "USD",
name: "US Dollar",
symbol: "$",
currencyGender: "Male",
generalRoundingRule: 0.01,
roundingMethodSalesOrders: "Ordinary"
};
payment:Currency result = check fo->createCurrencies(payload);
getCurrencies

Retrieves a single Currency by its key.

Parameters:

NameTypeRequiredDescription
currencyCodestringYesThe currency code key field, e.g. "USD".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetCurrenciesQueriesNoOData query options: $expand, $select.

Returns: Currency|error

Sample code:

payment:Currency result = check fo->getCurrencies("USD");
deleteCurrencies

Deletes a Currency by its key.

Parameters:

NameTypeRequiredDescription
currencyCodestringYesThe currency code key field, e.g. "USD".
headersDeleteCurrenciesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deleteCurrencies("USD");
updateCurrencies

Updates an existing Currency.

Parameters:

NameTypeRequiredDescription
currencyCodestringYesThe currency code key field, e.g. "USD".
payloadCurrencyYesThe fields to update.
headersUpdateCurrenciesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: Currency|error

Sample code:

payment:Currency payload = {
symbol: "US$"
};
payment:Currency result = check fo->updateCurrencies("USD", payload);

Currency Rules

listCurrencyRules

Lists CurrencyRule records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListCurrencyRulesQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: CurrencyRulesCollection|error

Sample code:

payment:CurrencyRulesCollection result = check fo->listCurrencyRules();
createCurrencyRules

Creates a new CurrencyRule.

Parameters:

NameTypeRequiredDescription
payloadCurrencyRuleYesThe CurrencyRule record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: CurrencyRule|error

Sample code:

payment:CurrencyRule payload = {
dataAreaId: "USMF",
ruleGroup: "RG-01",
currencyRuleGroup: "CRG-01",
currency: "EUR",
rateMethod: "ExchRates",
currencyAction: "AmountCur"
};
payment:CurrencyRule result = check fo->createCurrencyRules(payload);
getCurrencyRules

Retrieves a single CurrencyRule by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
ruleGroupstringYesThe rule group key field, e.g. "RG-01".
currencyRuleGroupstringYesThe currency rule group key field, e.g. "CRG-01".
currencystringYesThe currency key field, e.g. "EUR".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetCurrencyRulesQueriesNoOData query options: $expand, $select.

Returns: CurrencyRule|error

Sample code:

payment:CurrencyRule result = check fo->getCurrencyRules("USMF", "RG-01", "CRG-01", "EUR");
deleteCurrencyRules

Deletes a CurrencyRule by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
ruleGroupstringYesThe rule group key field, e.g. "RG-01".
currencyRuleGroupstringYesThe currency rule group key field, e.g. "CRG-01".
currencystringYesThe currency key field, e.g. "EUR".
headersDeleteCurrencyRulesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deleteCurrencyRules("USMF", "RG-01", "CRG-01", "EUR");
updateCurrencyRules

Updates an existing CurrencyRule.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
ruleGroupstringYesThe rule group key field, e.g. "RG-01".
currencyRuleGroupstringYesThe currency rule group key field, e.g. "CRG-01".
currencystringYesThe currency key field, e.g. "EUR".
payloadCurrencyRuleYesThe fields to update.
headersUpdateCurrencyRulesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: CurrencyRule|error

Sample code:

payment:CurrencyRule payload = {
rateMethod: "Indexes"
};
payment:CurrencyRule result = check fo->updateCurrencyRules("USMF", "RG-01", "CRG-01", "EUR", payload);

Denominations

listDenominations

Lists Denomination records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListDenominationsQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: DenominationsCollection|error

Sample code:

payment:DenominationsCollection result = check fo->listDenominations();
createDenominations

Creates a new Denomination.

Parameters:

NameTypeRequiredDescription
payloadDenominationYesThe Denomination record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: Denomination|error

Sample code:

payment:Denomination payload = {
dataAreaId: "USMF",
name: "USD-100",
currency: "USD",
value: 100.00
};
payment:Denomination result = check fo->createDenominations(payload);
getDenominations

Retrieves a single Denomination by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
namestringYesThe name key field, e.g. "USD-100".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetDenominationsQueriesNoOData query options: $expand, $select.

Returns: Denomination|error

Sample code:

payment:Denomination result = check fo->getDenominations("USMF", "USD-100");
deleteDenominations

Deletes a Denomination by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
namestringYesThe name key field, e.g. "USD-100".
headersDeleteDenominationsHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deleteDenominations("USMF", "USD-100");
updateDenominations

Updates an existing Denomination.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
namestringYesThe name key field, e.g. "USD-100".
payloadDenominationYesThe fields to update.
headersUpdateDenominationsHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: Denomination|error

Sample code:

payment:Denomination payload = {
value: 100.50
};
payment:Denomination result = check fo->updateDenominations("USMF", "USD-100", payload);

Exchange Rates

listExchangeRates

Lists ExchangeRate records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListExchangeRatesQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: ExchangeRatesCollection|error

Sample code:

payment:ExchangeRatesCollection result = check fo->listExchangeRates();
createExchangeRates

Creates a new ExchangeRate.

Parameters:

NameTypeRequiredDescription
payloadExchangeRateYesThe ExchangeRate record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: ExchangeRate|error

Sample code:

payment:ExchangeRate payload = {
rateTypeName: "CorporateRate",
fromCurrency: "USD",
toCurrency: "EUR",
startDate: "2026-08-01",
rate: 0.92,
conversionFactor: "One"
};
payment:ExchangeRate result = check fo->createExchangeRates(payload);
getExchangeRates

Retrieves a single ExchangeRate by its key.

Parameters:

NameTypeRequiredDescription
rateTypeNamestringYesThe rate type name key field, e.g. "CorporateRate".
fromCurrencystringYesThe from currency key field, e.g. "USD".
toCurrencystringYesThe to currency key field, e.g. "EUR".
startDatestringYesThe start date key field, e.g. "2026-08-01".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetExchangeRatesQueriesNoOData query options: $expand, $select.

Returns: ExchangeRate|error

Sample code:

payment:ExchangeRate result = check fo->getExchangeRates("CorporateRate", "USD", "EUR", "2026-08-01");
deleteExchangeRates

Deletes an ExchangeRate by its key.

Parameters:

NameTypeRequiredDescription
rateTypeNamestringYesThe rate type name key field, e.g. "CorporateRate".
fromCurrencystringYesThe from currency key field, e.g. "USD".
toCurrencystringYesThe to currency key field, e.g. "EUR".
startDatestringYesThe start date key field, e.g. "2026-08-01".
headersDeleteExchangeRatesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deleteExchangeRates("CorporateRate", "USD", "EUR", "2026-08-01");
updateExchangeRates

Updates an existing ExchangeRate.

Parameters:

NameTypeRequiredDescription
rateTypeNamestringYesThe rate type name key field, e.g. "CorporateRate".
fromCurrencystringYesThe from currency key field, e.g. "USD".
toCurrencystringYesThe to currency key field, e.g. "EUR".
startDatestringYesThe start date key field, e.g. "2026-08-01".
payloadExchangeRateYesThe fields to update.
headersUpdateExchangeRatesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: ExchangeRate|error

Sample code:

payment:ExchangeRate payload = {
rate: 0.935
};
payment:ExchangeRate result = check fo->updateExchangeRates("CorporateRate", "USD", "EUR", "2026-08-01", payload);

Exchange Rates Non ISO

listExchangeRatesNonISO

Lists ExchangeRateNonISO (non-ISO currency exchange rate) records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListExchangeRatesNonISOQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: ExchangeRatesNonISOCollection|error

Sample code:

payment:ExchangeRatesNonISOCollection result = check fo->listExchangeRatesNonISO();
createExchangeRatesNonISO

Creates a new ExchangeRateNonISO.

Parameters:

NameTypeRequiredDescription
payloadExchangeRateNonISOYesThe ExchangeRateNonISO record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: ExchangeRateNonISO|error

Sample code:

payment:ExchangeRateNonISO payload = {
rateTypeName: "CorporateRate",
fromCurrency: "USD",
toCurrency: "XOF",
startDate: "2026-08-01",
rate: 605.5,
conversionFactor: "One"
};
payment:ExchangeRateNonISO result = check fo->createExchangeRatesNonISO(payload);
getExchangeRatesNonISO

Retrieves a single ExchangeRateNonISO by its key.

Parameters:

NameTypeRequiredDescription
rateTypeNamestringYesThe rate type name key field, e.g. "CorporateRate".
fromCurrencystringYesThe from currency key field, e.g. "USD".
toCurrencystringYesThe to currency key field, e.g. "XOF".
startDatestringYesThe start date key field, e.g. "2026-08-01".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetExchangeRatesNonISOQueriesNoOData query options: $expand, $select.

Returns: ExchangeRateNonISO|error

Sample code:

payment:ExchangeRateNonISO result = check fo->getExchangeRatesNonISO("CorporateRate", "USD", "XOF", "2026-08-01");
deleteExchangeRatesNonISO

Deletes an ExchangeRateNonISO by its key.

Parameters:

NameTypeRequiredDescription
rateTypeNamestringYesThe rate type name key field, e.g. "CorporateRate".
fromCurrencystringYesThe from currency key field, e.g. "USD".
toCurrencystringYesThe to currency key field, e.g. "XOF".
startDatestringYesThe start date key field, e.g. "2026-08-01".
headersDeleteExchangeRatesNonISOHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deleteExchangeRatesNonISO("CorporateRate", "USD", "XOF", "2026-08-01");
updateExchangeRatesNonISO

Updates an existing ExchangeRateNonISO.

Parameters:

NameTypeRequiredDescription
rateTypeNamestringYesThe rate type name key field, e.g. "CorporateRate".
fromCurrencystringYesThe from currency key field, e.g. "USD".
toCurrencystringYesThe to currency key field, e.g. "XOF".
startDatestringYesThe start date key field, e.g. "2026-08-01".
payloadExchangeRateNonISOYesThe fields to update.
headersUpdateExchangeRatesNonISOHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: ExchangeRateNonISO|error

Sample code:

payment:ExchangeRateNonISO payload = {
rate: 610.0
};
payment:ExchangeRateNonISO result = check fo->updateExchangeRatesNonISO("CorporateRate", "USD", "XOF", "2026-08-01", payload);

Payment Calendar Rules

listPaymentCalendarRules

Lists PaymentCalendarRule records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListPaymentCalendarRulesQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: PaymentCalendarRulesCollection|error

Sample code:

payment:PaymentCalendarRulesCollection result = check fo->listPaymentCalendarRules();
createPaymentCalendarRules

Creates a new PaymentCalendarRule.

Parameters:

NameTypeRequiredDescription
payloadPaymentCalendarRuleYesThe PaymentCalendarRule record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: PaymentCalendarRule|error

Sample code:

payment:PaymentCalendarRule payload = {
dataAreaId: "USMF",
moduleType: "Vendor",
priority: 1,
name: "Vendor default calendar rule",
ruleType: "LegalEntityLocation",
isActive: "Yes"
};
payment:PaymentCalendarRule result = check fo->createPaymentCalendarRules(payload);
getPaymentCalendarRules

Retrieves a single PaymentCalendarRule by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
moduleTypestringYesThe module type key field, e.g. "Vendor".
priorityintYesThe priority key field, e.g. 1.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetPaymentCalendarRulesQueriesNoOData query options: $expand, $select.

Returns: PaymentCalendarRule|error

Sample code:

payment:PaymentCalendarRule result = check fo->getPaymentCalendarRules("USMF", "Vendor", 1);
deletePaymentCalendarRules

Deletes a PaymentCalendarRule by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
moduleTypestringYesThe module type key field, e.g. "Vendor".
priorityintYesThe priority key field, e.g. 1.
headersDeletePaymentCalendarRulesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deletePaymentCalendarRules("USMF", "Vendor", 1);
updatePaymentCalendarRules

Updates an existing PaymentCalendarRule.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
moduleTypestringYesThe module type key field, e.g. "Vendor".
priorityintYesThe priority key field, e.g. 1.
payloadPaymentCalendarRuleYesThe fields to update.
headersUpdatePaymentCalendarRulesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: PaymentCalendarRule|error

Sample code:

payment:PaymentCalendarRule payload = {
isActive: "No"
};
payment:PaymentCalendarRule result = check fo->updatePaymentCalendarRules("USMF", "Vendor", 1, payload);

Payment Days

listPaymentDays

Lists PaymentDay records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListPaymentDaysQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: PaymentDaysCollection|error

Sample code:

payment:PaymentDaysCollection result = check fo->listPaymentDays();
createPaymentDays

Creates a new PaymentDay.

Parameters:

NameTypeRequiredDescription
payloadPaymentDayYesThe PaymentDay record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: PaymentDay|error

Sample code:

payment:PaymentDay payload = {
dataAreaId: "USMF",
name: "Month-end",
frequency: "Month",
dayOfWeek: "None",
dayOfMonth: 30,
description: "Month-end payment day"
};
payment:PaymentDay result = check fo->createPaymentDays(payload);
getPaymentDays

Retrieves a single PaymentDay by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
namestringYesThe name key field, e.g. "Month-end".
frequencystringYesThe frequency key field, e.g. "Month".
dayOfWeekstringYesThe day of week key field, e.g. "None".
dayOfMonthintYesThe day of month key field, e.g. 30.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetPaymentDaysQueriesNoOData query options: $expand, $select.

Returns: PaymentDay|error

Sample code:

payment:PaymentDay result = check fo->getPaymentDays("USMF", "Month-end", "Month", "None", 30);
deletePaymentDays

Deletes a PaymentDay by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
namestringYesThe name key field, e.g. "Month-end".
frequencystringYesThe frequency key field, e.g. "Month".
dayOfWeekstringYesThe day of week key field, e.g. "None".
dayOfMonthintYesThe day of month key field, e.g. 30.
headersDeletePaymentDaysHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deletePaymentDays("USMF", "Month-end", "Month", "None", 30);
updatePaymentDays

Updates an existing PaymentDay.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
namestringYesThe name key field, e.g. "Month-end".
frequencystringYesThe frequency key field, e.g. "Month".
dayOfWeekstringYesThe day of week key field, e.g. "None".
dayOfMonthintYesThe day of month key field, e.g. 30.
payloadPaymentDayYesThe fields to update.
headersUpdatePaymentDaysHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: PaymentDay|error

Sample code:

payment:PaymentDay payload = {
description: "Month-end payment day - revised"
};
payment:PaymentDay result = check fo->updatePaymentDays("USMF", "Month-end", "Month", "None", 30, payload);

Payment Instructions

listPaymentInstructions

Lists PaymentInstruction records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListPaymentInstructionsQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: PaymentInstructionsCollection|error

Sample code:

payment:PaymentInstructionsCollection result = check fo->listPaymentInstructions();
createPaymentInstructions

Creates a new PaymentInstruction.

Parameters:

NameTypeRequiredDescription
payloadPaymentInstructionYesThe PaymentInstruction record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: PaymentInstruction|error

Sample code:

payment:PaymentInstruction payload = {
dataAreaId: "USMF",
paymentInstructionCode: "PI-EFT",
name: "Electronic funds transfer",
description: "Standard EFT payment instruction"
};
payment:PaymentInstruction result = check fo->createPaymentInstructions(payload);
getPaymentInstructions

Retrieves a single PaymentInstruction by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
paymentInstructionCodestringYesThe payment instruction code key field, e.g. "PI-EFT".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetPaymentInstructionsQueriesNoOData query options: $expand, $select.

Returns: PaymentInstruction|error

Sample code:

payment:PaymentInstruction result = check fo->getPaymentInstructions("USMF", "PI-EFT");
deletePaymentInstructions

Deletes a PaymentInstruction by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
paymentInstructionCodestringYesThe payment instruction code key field, e.g. "PI-EFT".
headersDeletePaymentInstructionsHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deletePaymentInstructions("USMF", "PI-EFT");
updatePaymentInstructions

Updates an existing PaymentInstruction.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
paymentInstructionCodestringYesThe payment instruction code key field, e.g. "PI-EFT".
payloadPaymentInstructionYesThe fields to update.
headersUpdatePaymentInstructionsHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: PaymentInstruction|error

Sample code:

payment:PaymentInstruction payload = {
description: "Standard EFT payment instruction - revised"
};
payment:PaymentInstruction result = check fo->updatePaymentInstructions("USMF", "PI-EFT", payload);

Payment Methods

listPaymentMethods

Lists PaymentMethod records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListPaymentMethodsQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: PaymentMethodsCollection|error

Sample code:

payment:PaymentMethodsCollection result = check fo->listPaymentMethods();
createPaymentMethods

Creates a new PaymentMethod.

Parameters:

NameTypeRequiredDescription
payloadPaymentMethodYesThe PaymentMethod record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: PaymentMethod|error

Sample code:

payment:PaymentMethod payload = {
dataAreaId: "USMF",
payMethod: "CHECK",
payedByTxt: "Company check",
postMethod: "Bank",
automaticPayment: "No",
costOwner: "Company"
};
payment:PaymentMethod result = check fo->createPaymentMethods(payload);
getPaymentMethods

Retrieves a single PaymentMethod by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
payMethodstringYesThe pay method key field, e.g. "CHECK".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetPaymentMethodsQueriesNoOData query options: $expand, $select.

Returns: PaymentMethod|error

Sample code:

payment:PaymentMethod result = check fo->getPaymentMethods("USMF", "CHECK");
deletePaymentMethods

Deletes a PaymentMethod by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
payMethodstringYesThe pay method key field, e.g. "CHECK".
headersDeletePaymentMethodsHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deletePaymentMethods("USMF", "CHECK");
updatePaymentMethods

Updates an existing PaymentMethod.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
payMethodstringYesThe pay method key field, e.g. "CHECK".
payloadPaymentMethodYesThe fields to update.
headersUpdatePaymentMethodsHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: PaymentMethod|error

Sample code:

payment:PaymentMethod payload = {
automaticPayment: "Yes"
};
payment:PaymentMethod result = check fo->updatePaymentMethods("USMF", "CHECK", payload);

Payment Terms

listPaymentTerms

Lists PaymentTerm records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListPaymentTermsQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: PaymentTermsCollection|error

Sample code:

payment:PaymentTermsCollection result = check fo->listPaymentTerms();
createPaymentTerms

Creates a new PaymentTerm.

Parameters:

NameTypeRequiredDescription
payloadPaymentTermYesThe PaymentTerm record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: PaymentTerm|error

Sample code:

payment:PaymentTerm payload = {
dataAreaId: "USMF",
name: "Net30",
description: "Net 30 days",
paymentMethodType: "Net",
numberOfDays: 30,
isDefaultPaymentTerm: "No"
};
payment:PaymentTerm result = check fo->createPaymentTerms(payload);
getPaymentTerms

Retrieves a single PaymentTerm by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
namestringYesThe name key field, e.g. "Net30".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetPaymentTermsQueriesNoOData query options: $expand, $select.

Returns: PaymentTerm|error

Sample code:

payment:PaymentTerm result = check fo->getPaymentTerms("USMF", "Net30");
deletePaymentTerms

Deletes a PaymentTerm by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
namestringYesThe name key field, e.g. "Net30".
headersDeletePaymentTermsHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deletePaymentTerms("USMF", "Net30");
updatePaymentTerms

Updates an existing PaymentTerm.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
namestringYesThe name key field, e.g. "Net30".
payloadPaymentTermYesThe fields to update.
headersUpdatePaymentTermsHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: PaymentTerm|error

Sample code:

payment:PaymentTerm payload = {
numberOfDays: 45
};
payment:PaymentTerm result = check fo->updatePaymentTerms("USMF", "Net30", payload);

VRM Currencies

listVRMCurrencies

Lists VRMCurrency (vendor registration and management currency) records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListVRMCurrenciesQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: VRMCurrenciesCollection|error

Sample code:

payment:VRMCurrenciesCollection result = check fo->listVRMCurrencies();
createVRMCurrencies

Creates a new VRMCurrency.

Parameters:

NameTypeRequiredDescription
payloadVRMCurrencyYesThe VRMCurrency record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: VRMCurrency|error

Sample code:

payment:VRMCurrency payload = {
currencyCode: "USD",
name: "US Dollar"
};
payment:VRMCurrency result = check fo->createVRMCurrencies(payload);
getVRMCurrencies

Retrieves a single VRMCurrency by its key.

Parameters:

NameTypeRequiredDescription
currencyCodestringYesThe currency code key field, e.g. "USD".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetVRMCurrenciesQueriesNoOData query options: $expand, $select.

Returns: VRMCurrency|error

Sample code:

payment:VRMCurrency result = check fo->getVRMCurrencies("USD");
deleteVRMCurrencies

Deletes a VRMCurrency by its key.

Parameters:

NameTypeRequiredDescription
currencyCodestringYesThe currency code key field, e.g. "USD".
headersDeleteVRMCurrenciesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deleteVRMCurrencies("USD");
updateVRMCurrencies

Updates an existing VRMCurrency.

Parameters:

NameTypeRequiredDescription
currencyCodestringYesThe currency code key field, e.g. "USD".
payloadVRMCurrencyYesThe fields to update.
headersUpdateVRMCurrenciesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: VRMCurrency|error

Sample code:

payment:VRMCurrency payload = {
name: "United States Dollar"
};
payment:VRMCurrency result = check fo->updateVRMCurrencies("USD", payload);

VRM Languages

listVRMLanguages

Lists VRMLanguage (vendor registration and management language) records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListVRMLanguagesQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: VRMLanguagesCollection|error

Sample code:

payment:VRMLanguagesCollection result = check fo->listVRMLanguages();
createVRMLanguages

Creates a new VRMLanguage.

Parameters:

NameTypeRequiredDescription
payloadVRMLanguageYesThe VRMLanguage record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: VRMLanguage|error

Sample code:

payment:VRMLanguage payload = {
languageId: "en-us",
description: "English (United States)"
};
payment:VRMLanguage result = check fo->createVRMLanguages(payload);
getVRMLanguages

Retrieves a single VRMLanguage by its key.

Parameters:

NameTypeRequiredDescription
languageIdstringYesThe language id key field, e.g. "en-us".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetVRMLanguagesQueriesNoOData query options: $expand, $select.

Returns: VRMLanguage|error

Sample code:

payment:VRMLanguage result = check fo->getVRMLanguages("en-us");
deleteVRMLanguages

Deletes a VRMLanguage by its key.

Parameters:

NameTypeRequiredDescription
languageIdstringYesThe language id key field, e.g. "en-us".
headersDeleteVRMLanguagesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deleteVRMLanguages("en-us");
updateVRMLanguages

Updates an existing VRMLanguage.

Parameters:

NameTypeRequiredDescription
languageIdstringYesThe language id key field, e.g. "en-us".
payloadVRMLanguageYesThe fields to update.
headersUpdateVRMLanguagesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: VRMLanguage|error

Sample code:

payment:VRMLanguage payload = {
description: "English (US)"
};
payment:VRMLanguage result = check fo->updateVRMLanguages("en-us", payload);

VRM Parameters

listVRMParameters

Lists VRMParameter (vendor registration and management module parameter) records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListVRMParametersQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: VRMParametersCollection|error

Sample code:

payment:VRMParametersCollection result = check fo->listVRMParameters();
createVRMParameters

Creates a new VRMParameter.

Parameters:

NameTypeRequiredDescription
payloadVRMParameterYesThe VRMParameter record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: VRMParameter|error

Sample code:

payment:VRMParameter payload = {
dataAreaId: "USMF",
vendorAccountNumberSequenceCode: "Vend_1",
isVendorAccountNumberSequenceManual: "No",
mandatoryTaxGroup: "Yes"
};
payment:VRMParameter result = check fo->createVRMParameters(payload);
getVRMParameters

Retrieves a single VRMParameter by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
'keyintYesThe entity key value, e.g. 1.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetVRMParametersQueriesNoOData query options: $expand, $select.

Returns: VRMParameter|error

Sample code:

payment:VRMParameter result = check fo->getVRMParameters("USMF", 1);
deleteVRMParameters

Deletes a VRMParameter by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
'keyintYesThe entity key value, e.g. 1.
headersDeleteVRMParametersHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deleteVRMParameters("USMF", 1);
updateVRMParameters

Updates an existing VRMParameter.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
'keyintYesThe entity key value, e.g. 1.
payloadVRMParameterYesThe fields to update.
headersUpdateVRMParametersHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: VRMParameter|error

Sample code:

payment:VRMParameter payload = {
mandatoryTaxGroup: "No"
};
payment:VRMParameter result = check fo->updateVRMParameters("USMF", 1, payload);

VRM People

listVRMPeople

Lists VRMPerson (vendor registration and management contact) records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListVRMPeopleQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: VRMPeopleCollection|error

Sample code:

payment:VRMPeopleCollection result = check fo->listVRMPeople();
createVRMPeople

Creates a new VRMPerson.

Parameters:

NameTypeRequiredDescription
payloadVRMPersonYesThe VRMPerson record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: VRMPerson|error

Sample code:

payment:VRMPerson payload = {
partyNumber: "VRM-000123",
firstName: "Jordan",
lastName: "Lee",
primaryContactEmail: "[email protected]",
languageId: "en-us"
};
payment:VRMPerson result = check fo->createVRMPeople(payload);
getVRMPeople

Retrieves a single VRMPerson by its key.

Parameters:

NameTypeRequiredDescription
partyNumberstringYesThe party number key field, e.g. "VRM-000123".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetVRMPeopleQueriesNoOData query options: $expand, $select.

Returns: VRMPerson|error

Sample code:

payment:VRMPerson result = check fo->getVRMPeople("VRM-000123");
deleteVRMPeople

Deletes a VRMPerson by its key.

Parameters:

NameTypeRequiredDescription
partyNumberstringYesThe party number key field, e.g. "VRM-000123".
headersDeleteVRMPeopleHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deleteVRMPeople("VRM-000123");
updateVRMPeople

Updates an existing VRMPerson.

Parameters:

NameTypeRequiredDescription
partyNumberstringYesThe party number key field, e.g. "VRM-000123".
payloadVRMPersonYesThe fields to update.
headersUpdateVRMPeopleHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: VRMPerson|error

Sample code:

payment:VRMPerson payload = {
primaryContactEmail: "[email protected]"
};
payment:VRMPerson result = check fo->updateVRMPeople("VRM-000123", payload);

VRM Tax Groups

listVRMTaxGroups

Lists VRMTaxGroup (vendor registration and management tax group) records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListVRMTaxGroupsQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: VRMTaxGroupsCollection|error

Sample code:

payment:VRMTaxGroupsCollection result = check fo->listVRMTaxGroups();
createVRMTaxGroups

Creates a new VRMTaxGroup.

Parameters:

NameTypeRequiredDescription
payloadVRMTaxGroupYesThe VRMTaxGroup record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: VRMTaxGroup|error

Sample code:

payment:VRMTaxGroup payload = {
dataAreaId: "USMF",
taxGroupCode: "TG-STD",
description: "Standard tax group"
};
payment:VRMTaxGroup result = check fo->createVRMTaxGroups(payload);
getVRMTaxGroups

Retrieves a single VRMTaxGroup by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
taxGroupCodestringYesThe tax group code key field, e.g. "TG-STD".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetVRMTaxGroupsQueriesNoOData query options: $expand, $select.

Returns: VRMTaxGroup|error

Sample code:

payment:VRMTaxGroup result = check fo->getVRMTaxGroups("USMF", "TG-STD");
deleteVRMTaxGroups

Deletes a VRMTaxGroup by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
taxGroupCodestringYesThe tax group code key field, e.g. "TG-STD".
headersDeleteVRMTaxGroupsHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deleteVRMTaxGroups("USMF", "TG-STD");
updateVRMTaxGroups

Updates an existing VRMTaxGroup.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
taxGroupCodestringYesThe tax group code key field, e.g. "TG-STD".
payloadVRMTaxGroupYesThe fields to update.
headersUpdateVRMTaxGroupsHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: VRMTaxGroup|error

Sample code:

payment:VRMTaxGroup payload = {
description: "Standard tax group - revised"
};
payment:VRMTaxGroup result = check fo->updateVRMTaxGroups("USMF", "TG-STD", payload);

Voucher Types

listVoucherTypes

Lists VoucherType records, with optional OData query support.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesListVoucherTypesQueriesNoOData query options: $skip, $top, $filter, $orderby, $expand, cross-company, $count, $select.

Returns: VoucherTypesCollection|error

Sample code:

payment:VoucherTypesCollection result = check fo->listVoucherTypes();
createVoucherTypes

Creates a new VoucherType.

Parameters:

NameTypeRequiredDescription
payloadVoucherTypeYesThe VoucherType record to create.
headersmap<string|string[]>NoOptional HTTP headers to include in the request.

Returns: VoucherType|error

Sample code:

payment:VoucherType payload = {
dataAreaId: "USMF",
voucherType: "GenJrn",
description: "General journal voucher",
journalName: "GenJrn",
isDefaultType: "Yes"
};
payment:VoucherType result = check fo->createVoucherTypes(payload);
getVoucherTypes

Retrieves a single VoucherType by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
voucherTypestringYesThe voucher type key field, e.g. "GenJrn".
headersmap<string|string[]>NoOptional HTTP headers to include in the request.
queriesGetVoucherTypesQueriesNoOData query options: $expand, $select.

Returns: VoucherType|error

Sample code:

payment:VoucherType result = check fo->getVoucherTypes("USMF", "GenJrn");
deleteVoucherTypes

Deletes a VoucherType by its key.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
voucherTypestringYesThe voucher type key field, e.g. "GenJrn".
headersDeleteVoucherTypesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: error?

Sample code:

check fo->deleteVoucherTypes("USMF", "GenJrn");
updateVoucherTypes

Updates an existing VoucherType.

Parameters:

NameTypeRequiredDescription
dataAreaIdstringYesThe company data area identifier, e.g. "USMF".
voucherTypestringYesThe voucher type key field, e.g. "GenJrn".
payloadVoucherTypeYesThe fields to update.
headersUpdateVoucherTypesHeadersNoOptional headers, including ifMatch (ETag for optimistic concurrency).

Returns: VoucherType|error

Sample code:

payment:VoucherType payload = {
description: "General journal voucher - revised"
};
payment:VoucherType result = check fo->updateVoucherTypes("USMF", "GenJrn", payload);