Developers
Everything you need to integrate MoonPays into your application.
Our developer-friendly APIs and SDKs make it easy to integrate payments into your application. Get started in minutes with our comprehensive documentation and guides.
// Install the MoonPays SDK
npm install @moonpays/sdk
// Initialize the client
import { MoonPays } from '@moonpays/sdk';
const moonpays = new MoonPays({
apiKey: 'your_api_key',
environment: 'production' // or 'sandbox' for testing
});
// Create a payment
const payment = await moonpays.payments.create({
amount: 1999,
currency: 'USD',
description: 'Order #1234',
customer: {
email: 'customer@example.com'
}
});
// Redirect to checkout
window.location.href = payment.checkoutUrl;