Repository navigation
Setup a Payment
To set up a payment using mnp, you have several options based on your specific requirements:
This is the recommended way to set up a payment for enhanced privacy.
$ mnp payment new
Bdxcxb5WkE84HuNyzoZvTPincGgPkZFXKfeQkpwSHew1cWwNcBXN4bY9YXY9dAHfibRBCrX92JwzmASMXsfrRnQqMo3ubLB$ mnp payment list
0 "A13iyF9bN7ReDPWW7FZoqd1Nwvhfh2UbAMBR4UeGPi1aWpERgmE3ChMeJZJ2RnkMueHdL7XXwdkQJ5As8XRhTKAhSwjahXd"
1 "Bdxcxb5WkE84HuNyzoZvTPincGgPkZFXKfeQkpwSHew1cWwNcBXN4bY9YXY9dAHfibRBCrX92JwzmASMXsfrRnQqMo3ubLB"$ mnp payment subaddr 1
Bdxcxb5WkE84HuNyzoZvTPincGgPkZFXKfeQkpwSHew1cWwNcBXN4bY9YXY9dAHfibRBCrX92JwzmASMXsfrRnQqMo3ubLBReturns the subaddress at index 1.
$ mnp payment new --amount 65000
# OR
$ mnp payment subaddr 1 --amount 650000
monero:Bdxcxb5WkE84HuNyzoZvTPincGgPkZFXKfeQkpwSHew1cWwNcBXN4bY9YXY9dAHfibRBCrX92JwzmASMXsfrRnQqMo3ubLB?tx_amount=0.000000650000Returns a Monero URI string.
For scenarios requiring order matching, such as retail transactions or invoicing, use a Payment ID. This is often required for tax regulations and invoice numbering.
Generate a unique 16-hex character payment ID using tools like OpenSSL:
# Create a random paymentid (16 hex character)
$ mypaymentId=$(openssl rand -hex 8)
$ echo $mypaymentId
e02c381aa2227436Returns a random 16-hex character payment ID.
Use the generated payment ID to create an integrated address, combining it with your primary address:
# Create an integrated address.
$ echo $mypaymentId | mnp payment
AAkPz3y5yNweDPWW7FZoqd1 ... 5kqxkfnou78gMMegReturns an integrated address with the provided payment ID, enabling efficient tracking of payments.
If a specific amount needs to be included in the payment, you can do so using the --amount option:
$ echo "$mypaymentId" | mnp payment --amount 50000
monero:AAkPz3y5yNweDPWW7FZoqd1Nwvhfh2UbAMBR4UeGPi1aWpERgmE3ChMeJZJ2RnkMueHdL7XXwdkQJ5As8XRhTKAhfT5kqxkfnou78gMMeg?tx_amount=0.000000050000Returns a Monero URI string.
To facilitate easy payment by customers using mobile Monero wallets, you can generate a QR code from the payment URI.
Ensure you have a QR code generator installed on your system. You can install qrencode using:
sudo apt-get install qrencodeUse qrencode to generate a QR code from the Monero URI string:
mnp payment subaddr 1 | tr -d '\n' | qrencode -t UTF8Monerujo has some problems with \n terminated strings, so it is better to remove them.
These methods provide flexible options for setting up payments using mnp. Every output of mnp payment can be used to create an QR-Code.
sucks less