Hi Mike_James
I sent them your reply; this is their response. It provides more API detail but puts the onus directly back onto the third party developers, abrogating all responsibility for their change which seems a cop out to me. We are the ones left out of pocket, and all they want us to do is change each invoice manually:
Thank you for your respose.
The "onlinepaymentmethod" field in the MYOB Business API's sales invoice endpoint is unrelated to the surcharge settings for invoices. This field is specifically used to control whether online payment options (e.g., All or None) are enabled on an invoice. If not explicitly set in the API request payload, the default value of "All" is applied, meaning all online payment methods will be activated.
Purpose of the "onlinepaymentmethod" Field:
- This field determines whether online payment methods, such as card payments, are enabled for an invoice. When left unspecified, it defaults to "All," enabling all online payment options.
Surcharge Settings:
- The application of surcharges, such as charging customers a payment surcharge, operates independently of the "onlinepaymentmethod" field. These settings are controlled by internal business logic (e.g., merchant preferences or integrations within the MYOB system) and are not configurable through the Public API.
For example, recurring transactions and default merchant settings influence surcharges, but such configurations are not accessible within the API.
API Limitations:
- As correctly noted by developers, the "onlinepaymentmethod" field does not manage surcharge-related settings. There are currently no API parameters or toggles available for directly controlling surcharge applications.
Internal Logic and Behavior:
- Fields like "CanApplySurcharge" are managed by internal systems such as Huxley core and are not exposed through the Public API endpoints.
While the "onlinepaymentmethod" field is an essential part of the sales invoice endpoint, it does not control surcharge settings. For developers needing greater control over surcharges through the API, it is recommended to reach out to the MYOB API support team to explore potential enhancements or solutions.
As a workaround, you can open the imported invoice in MYOB and manually select the "customer pays the surcharge" option before sending it to your customer.
I hope this helps, We will now proceed to close this case.