Skip to main content

Solana Quickstart

This guide will help you quickly integrate Solana-based cryptocurrency payments into your application using WhiskyPay.

Prerequisites

  • A React application
  • Node.js 16+ installed
  • npm or yarn package manager
  • WhiskyPay merchant account (register at pay.whiskypeak.com)

Step 1: Installation

Install the WhiskyPay SDK package:

Step 2: Basic Integration

Add the WhiskyPay payment flow to your React application:

Step 3: Configure Your Merchant Account

Before testing, make sure you’ve:
  1. Registered at pay.whiskypeak.com
  2. Connected your Solana wallet (where payments will be received)
  3. Set up your merchant profile (name, logo, callback URL)
  4. Obtained your saasId from the dashboard

Step 4: Customize The Payment Modal

The PaymentModal component accepts the following props: Example with custom styling:

Step 5: Handle Payment Notifications

When a payment is completed, WhiskyPay will:
  1. Call your webhook URL (specified in your merchant dashboard)
  2. Send email confirmations to both you and your customer
  3. Redirect the customer to your specified redirect URL
Create a webhook endpoint to receive payment notifications:

Step 6: Testing

To test your integration:
  1. Use a real Solana wallet with testnet or devnet SOL
  2. Set RPC_URL to a testnet or devnet endpoint during testing:
  3. Make a test payment to verify the entire flow
  4. Check that your webhook receives the payment notification

Step 7: Going to Production

Before going live:
  1. Update your RPC_URL to use a production endpoint:
    Or even better, use a paid RPC provider for reliability
  2. Update your webhook endpoint to handle production payments
  3. Set up monitoring for your webhook endpoint
  4. Test the entire flow in a staging environment

Implementation with Next.js

For Next.js applications, here’s a complete example:

Next Steps