Call ModernTax.create(clientId, options) to launch the ModernTax dialog. You can find your Client ID in the API Keys page of your ModernTax dashboard (https://app.moderntax.io/api-keys).
The onSuccess callback will be triggered once the taxpayer has successfully connected their IRS account to ModernTax by logging in to their IRS account. Use the returned taxpayerId to make API requests.
onSuccess: (taxpayerId) => console.log(
"saving tax payer id " + taxpayerId + " from ModernTax"
The ModernTax dialog can be launched from a button with a click handler:
<button id="moderntax">Connect Your IRS Account</button>