π Wallet Implementation
Overview
Coinflow identifies every end-user making a purchase with a wallet. You can think of the wallet as a unique customer ID that helps us identify the customer. Merchants whose end-users donβt have crypto wallets can use the below code snippets to generate a wallet and pass it to Coinflow.
Generate Wallet Public Keys
Some Coinflow endpoints will require you to pass a wallet public key in the x-coinflow-auth-wallet header. The CoinflowPurchase component will also require you to pass a wallet object. The below snippets are examples of how you can generate a wallet public key from a unique customer id. The unique customer id should be identified by you, the merchant. Examples of what you can use here are: a UUID you use internally to identify the end-user or the end-userβs email address.
Public Keys on EVM Chains
How to generate pubkeyfor EVM chains:
Public Keys on Solana
How to generate pubkeyfor Solana:
Generate Solana Wallet Objects
Generate A Solana Wallet From Email Address
Merchants implementing CoinflowPurchase can use the following code snippet to generate a Solana wallet object from an end-userβs email address and pass it into the wallet prop. This feature is supported in React, Vue, and Angular for Coinflow package version 10.2.10 or later.
Generate a Solana Wallet Object From User Id
Merchants integrating CoinflowPurchase can utilize the code snippet below to generate a Solana wallet object using a user ID of your choice. This userId can be any string you use to identify your customer, and the returned wallet object should be passed into the wallet prop. This functionality is available in React, Vue, and Angular with Coinflow package version 10.2.10 or later.

