At this time, being able to set up an Early Payment Discount under payment terms is currently unavailable in QuickBooks Online. Instead, you'll need to manually add the discount percentage on the sales forms.
Before doing so, you have to enable the Discount feature from the Account and Settings section.
Click the Gear icon on the top menu.
Choose Account and Settings.
Hit the Sales tab on the menu.
In the Sales form content section, tick the pencil ✏ icon to edit it.
Select the Discount checkbox to turn it on.
Press the Save button and then Done.
Once done, you can now use the discount field on your sales transaction by choosing the Discount percentage or value.
Please see the sample screenshot attached for reference: