🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@moonpay/moonpay-js

Package Overview
Dependencies
Maintainers
5
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@moonpay/moonpay-js

The MoonPay javascript SDK enables you to integrate the MoonPay widget so you can facilitate crypto purchases within your platform.

latest
npmnpm
Version
0.7.6
Version published
Weekly downloads
5.9K
-33.15%
Maintainers
5
Weekly downloads
 
Created
Source

@moonpay/moonpay-js

The MoonPay Web SDK enables you to integrate the MoonPay widget so you can facilitate crypto purchases within your platform.

Documentation

For detailed integration instructions and further documentation, please visit our Documentation Site.

Installation

To install the package, use npm or yarn:

npm install --save @moonpay/moonpay-js

or

yarn add @moonpay/moonpay-js

Prerequisites

Before using this package, make sure you have the following:

  • An active MoonPay account.
  • Your MoonPay API key.

Usage

  • Import the loadMoonPay function.
import { loadMoonPay } from '@moonpay/moonpay-js';
  • Call the loadMoonPay function to get the constructor for the MoonPayWebSdk.
const moonPay = await loadMoonPay();

const widget = moonPay({
  flow: 'buy',
  environment: 'sandbox',
  params: {
    apiKey: 'pk_test_123',
  },
  variant: 'overlay',
});
  • Call the show method on your instance
widget.show();

FAQs

Package last updated on 13 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts