Skip to main content

Monero API Reference

This document provides a comprehensive reference for the Monero payment integration in WhiskyPay.

MoneroPaymentComponent

React component for accepting Monero payments.

Props

Usage Example

MoneroPayment Class

Core class for programmatic Monero payment handling.

Constructor

MoneroPaymentConfig

Methods

createInvoice

Creates a new Monero invoice.
CreateInvoiceOptions
Returns

checkInvoice

Checks the status of an invoice.
Parameters
Returns: InvoiceInfo

isPaymentComplete

Checks if a payment has been completed.
Parameters
Returns
Boolean indicating if payment is complete.

waitForPayment

Waits for a payment to complete with a timeout.
Parameters

Gateway API Endpoints

These endpoints are exposed by the Monero payment gateway.

POST /api/monero/new

Creates a new Monero invoice.

Query Parameters

Response

GET /api/monero/info

Gets information about an existing invoice.

Query Parameters

Response

Webhook Events

When a payment status changes, a webhook notification is sent to your configured endpoint.

Webhook Payload

Signature Verification

Always verify webhook signatures to prevent fraud:

Error Handling

The Monero SDK and API will return standard error responses with appropriate HTTP status codes and error messages. Common errors include:
  • 400 Bad Request: Invalid parameters
  • 401 Unauthorized: Missing or invalid API key
  • 404 Not Found: Invoice not found
  • 500 Internal Server Error: Server-side error
Example error response:

Security Best Practices

API Key Protection

Store your API key securely:

Address Validation

Always validate Monero addresses:

Testing

Testing Payments

For testing, you can:
  1. Use the Monero testnet instead of mainnet
  2. Set up a development gateway with lower confirmation requirements
  3. Use small amounts (0.001 XMR) for testing

Mocking Payments

For development, you can mock payment responses:

Rate Limits

The Monero payment API has the following rate limits:
  • Create Invoice: 10 requests per minute
  • Check Invoice: 60 requests per minute
  • Webhook Delivery: Maximum 3 retry attempts

Support and Troubleshooting

For issues with the Monero integration, contact support at support@whiskypeak.com with:
  1. Your merchant ID
  2. The invoice ID(s) in question
  3. Error messages received
  4. Steps to reproduce the issue
Common solutions to frequent problems:
  • “Invalid API Key”: Verify your API key in dashboard settings
  • “Invoice Not Found”: Check the invoice ID format (16 characters)
  • “Gateway Unreachable”: Ensure your server can reach the gateway URL
  • “Payment Not Detected”: The Monero network may be experiencing delays