For Node-based backends and actions that require your secret key
A node package for MoonPay server-side functions. See the package .
First, import the MoonPay
class.
Set up the MoonPay
class with your secret key.
π§NEVER use your secret key in client side codeLoad your secret key from an environment variable instead.
Use the moonPay
instance to access our functions.
MoonPay URL utilities are namespaced under the .url
property.
If you include the walletAddress
or walletAddresses
query param, you'll need to sign the URL.
Or, return the signed URL, using the returnFullURL
option.
Or, you can verify that a URL is correctly signed.
You can also have us generate the full, signed URL, based on some input parameters.
Here's an example of an Express endpoint that signs a URL query param.
Then, make a GET
request to your endpoint from the client with a url
query param to get the signature.
Updated 3 months ago
Table of Contents
@moonpay/moonpay-node
Setup
Usage
Example