Lifecycle of a Request
Last updated
Was this helpful?
Last updated
Was this helpful?
The typical lifecycle of a request is as follows:
The payer or payee signs the request which contains the payee, payer, currency, amount, payment details, and arbitrary content data.
The request can be optionally encrypted such that only the payee, payer, and approved 3rd parties can view the request contents.
The request is persisted in IPFS.
The IPFS Content-addressable ID (CID) is stored in a smart contract on Gnosis chain
The payee can optionally cancel the request or increase/decrease the expected amount.
The payer can optionally accept the request, indicating that they intend to pay it.
Both payee and payer can add 3rd party stakeholders if the request is encrypted.
The payer derives a paymentReference from the request contents.
The payer calls a function on the payment network smart contract, passing in the token address, to address, amount, and paymentReference.
An event is emitted containing the token address, to address, amount, and paymentReference.
The event is indexed by the payments subgraph
An app can retrieve the request contents from IPFS and calculate the balance based on events from the payments subgraph.
All of these steps are facilitated by the Request Network JavaScript SDK such that the developer needs only make a few function calls. See the to learn more.