Add Stakeholder
A dialog box for granting third-party access to an encrypted invoice created via Request Finance
The add-stakeholder
component allows Builders to quickly integrate the Request Finance Add Stakeholder widget into their applications.
The Request Finance Add Stakeholder widget provides a dialog box for end-users to grant third-party access to one of their encrypted payment requests created via Request Finance. Then, under the hood, Request Finance calls request.addStakeholders()
to add the third party as a stakeholder to the encrypted payment request.
The template comes in the form of a Web Component and a native Svelte component, provided by the @requestnetwork/add-stakeholder package. The Web Component can be used anywhere including, but not limited to, React, Next.js, Vue, Svelte, or as a browser script.
Installation
npm install @requestnetwork/add-stakeholder
Usage
Web Component in React, Next.js, or Vue
import '@requestnetwork/add-stakeholder'
export default function App() {
return (
<add-stakeholder builderKey="..." webhookUrl="..."/>
)
}
Native Svelte component
import { AddStakeholder } from '@requestnetwork/add-stakeholder'
<AddStakeholder builderKey="..." webhookUrl=".."/>
Web Component in Svelte
import '@requestnetwork/add-stakeholder'
<add-stakeholder builderKey="..." webhookUrl="..."/>
Web Component in Browser
<script src="./node_modules/add-stakeholder/dist/web-component.umd.cjs" defer></script>
<!-- or -->
<script src="//unpkg.com/@requestnetwork/add-stakeholder" defer></script>
<add-stakeholder builderKey="..." webhookUrl="..."/>
Last updated
Was this helpful?