Moonpay Payment Module
Configuration
-
Log into the admin panel
-
Go to Stores -> Configuration
-
Go to Sales -> Payment Methods
-
Expand Moonpay
-
Set up the following fields:
- Enabled - Yes
- Title - Method name you wish to be displayed in checkout
- New Order Status - order status after payment is completed
- Payment from Applicable Countries - whether the method should be available to selected countries
- Payment from Specific Countries - countries in which the payment method should be available
- Test mode - this settings allows you to use Moonpay in test mode
- Publishable key - public key available in Moonpay dashboard (Developers tab)
- Secret key - private key available in Moonpay dashboard (Developers tab)
- Bitcoin Address - BTC wallet address to receive the payments
-
Save configuration
-
Create a webhook:
- Log into Moonpay dashboard
- Go to Developers tab
- Go to Webhooks tab
- Click "Add Endpoint" (on the right)
- Type in the address: https://your_store_url/rest/default/V1/moonpay/transaction/save
- Check "Transaction created"
- Save the webhook
-
Get the Webhook key
- Log into Moonpay dashboard
- Go to Developers tab
- Copy the Webhook key
-
Configure the Webhook key
- Go to Magento admin panel
- Go to Stores > Configuration
- Go to Sales > Payment Methods
- Expand Moonpay section
- Fill in Webhook Key field with the key you just created in the Moonpay dashboard
Additional information
- Minimum order amount is $20
- Maximum order amount is $12000
- Maximum order amount in test mode is $200
- While redirecting to Moonpay, following data is sent:
- cryptocurrency code (BTC)
- currency code (USD)
- configured BTC wallet address
- order amount in USD
- customer e-mail address
- customer ID from Magento
- configured public API key
- confirmation that the amount transferred has been blocked
- Order status is updated every 5 minutes via cron.
- In test mode public and private key differ from the production ones. Before switching mode, make sure the correct one is set in Moonpay dashboard.