MyxenPay Documentation

Complete guides and API reference for integrating MyxenPay into your applications

Quick Start Guide

Get started with MyxenPay in just a few minutes. This guide will walk you through the basic integration steps.

🔑

1. Get API Keys

Create an account and generate your API keys from the merchant dashboard.

Get API Keys
📦

2. Install SDK

Install the MyxenPay SDK for your preferred programming language.

npm install @myxenpay/sdk
💻

3. Make Your First Request

Start accepting payments with just a few lines of code.

const payment = await myxenpay.createPayment({
  amount: 100,
  currency: 'USD'
});
Pro Tip: Test your integration using our sandbox environment before going live.

Authentication

MyxenPay uses API keys to authenticate requests. You can manage your API keys from the merchant dashboard.

API Key Usage

Include your API key in the Authorization header of all requests:

Authorization: Bearer sk_live_your_api_key_here
Important: Never expose your secret API keys in client-side code. Always keep them secure on your server.

Key Types

Key Type Prefix Usage
Publishable pk_ Client-side applications
Secret sk_ Server-side applications
Test test_ Sandbox environment

Payments API

Process payments, check status, and manage transactions through our REST API.

Create a Payment

POST /v1/payments

Create a new payment request and get a payment URL for your customer.

Request Body

Parameter Type Required Description
amount integer Yes Amount in smallest currency unit (e.g., cents for USD)
currency string Yes Currency code (USD, EUR, SOL, USDC, etc.)
description string No Payment description shown to customer
metadata object No Additional metadata for your reference

Example Request

curl -X POST https://api.myxenpay.finance/v1/payments \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1000,
    "currency": "USD",
    "description": "Premium Subscription",
    "metadata": {
      "order_id": "12345"
    }
  }'

Example Response

{
  "id": "pay_123456789",
  "status": "pending",
  "amount": 1000,
  "currency": "USD",
  "payment_url": "https://pay.myxenpay.finance/pay_123456789",
  "expires_at": "2024-01-15T14:30:00Z"
}

Webhooks

Receive real-time notifications about payment events in your application.

Setting Up Webhooks

Configure your webhook endpoint in the merchant dashboard to receive events:

  1. Go to your merchant dashboard
  2. Navigate to Settings → Webhooks
  3. Add your webhook URL
  4. Select the events you want to receive

Webhook Events

Event Type Description
payment.completed Payment successfully completed
payment.failed Payment failed or was canceled
payment.pending Payment is pending confirmation
payout.processed Payout has been processed
Best Practice: Always verify webhook signatures to ensure they come from MyxenPay.

Frequently Asked Questions

How long do payments take to confirm?

Solana payments typically confirm within 1-2 seconds. Other cryptocurrencies may take longer depending on network conditions.

What currencies do you support?

We support USD, EUR, SOL, USDC, USDT, and MYXEN tokens. More currencies are being added regularly.

Is there a sandbox environment for testing?

Yes! Use the test API keys from your dashboard to test integrations without moving real funds.

How do I handle refunds?

Refunds can be processed through the merchant dashboard or via the API. Contact support for assistance with complex refund scenarios.