Example
Last updated
Last updated
Below we describe two common payment scenarios:
Bob is a developer with no knowledge of blockchain technology, but is adept in current decentralized payment solutions and is developing an application in which he wants to accept payments in tokens/crypto-currencies.
Bob has a very specific payment scheme in mind, which involves, different subscription models which are valid for different durations and have different amounts.
Bob calls the OPOCH business API with appropriate parameters that explain his payment scheme, a contract is deployed for Bob based on these parameters.
When user Alice uses Bob's services she deposits her payment to Bob's contract using the OPOCH_STACK. Copy of meta_data of the payment is stored in a centralised solution or IPFS which Bob can use for querying or analytics.
Bob verifies the payment using the API/SDK provided by OPOCH and based on which kind subscription Alice chose Bob enables the service just like in the centralized world.
Alice is browsing Bob's business application. She likes a product and decides to purchase it.
Alice clicks on Payment button and is prompted on her Opoch application for approval of payment.
Alice approves payment and her payment request passes through Opoch for conversion to the specified token, using Opoch DEX, or she purchases the tokens using fiat-to-crypto, required by Bob.
After conversion Bob is paid the token in his BSM and Alice's USM is updated with the payment done.
Bob can now withdraw the amount to his wallet from the contract when he wishes.