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 Keys2. 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'
});
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
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
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:
- Go to your merchant dashboard
- Navigate to Settings → Webhooks
- Add your webhook URL
- 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 |
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.