MrProFixer Pay Payment API

Comprehensive documentation for integrating cryptocurrency payments into your applications

Introduction

The MrProFixer Pay Payment API provides a seamless way to integrate cryptocurrency payments into your applications. Our RESTful API allows you to create payment invoices, check payment status, and receive notifications when payments are completed.

Base URL

https://MrProFixer Pay.com/api/payment

All API requests must be made over HTTPS. Calls made over plain HTTP will fail.

Key Features

  • Support for multiple cryptocurrencies (USDT, BTC, ETH, and more)
  • Real-time payment status updates via webhooks
  • Secure API key authentication
  • Detailed documentation with code examples

Authentication

All API requests require authentication using your API key. You can generate and manage your API keys in the MrProFixer Pay Developer Dashboard.

Authentication Method

Include your API key in the X-API-KEY header with all requests.

curl -X GET https://MrProFixer Pay.com/api/payment/create \
-H "X-API-KEY: your_api_key_here"

Keep your API keys secure

Do not share your API keys or commit them to version control. For client-side implementations, consider using our JavaScript SDK which handles authentication securely.

Create Payment

Create a new payment invoice for cryptocurrency payments.

POST
https://MrProFixer Pay.com/api/payment/create

Request Parameters

Parameter Type Required Description
amount number Yes Payment amount (must be greater than 0)
customer_name string Yes Name of the customer
customer_email string Yes Email address of the customer
currency string No Currency code (default: USDT). Others not Supported.
additional_id string No Your custom identifier for this payment
callback_url string No URL for payment status webhooks
redirect_url string No URL to redirect after payment completion
network string No Keep Empty.
metadata object No Additional data to attach to the payment

Response

Successful responses include a payment object with the following fields:

{
  "id": "pay_abc123def456",
  "object": "payment",
  "amount": 100.5,
  "amount_received": 0,
  "currency": "USDT",
  "reference_id": "order_12345",
  "customer_name": "John Doe",
  "customer_email": "john@example.com",
  "status": "pending",
  "payment_address": "TXYZ...abc123",
  "payment_url": "https://pay.MrProFixer Pay.com/pay_abc123def456",
  "network": "",
  "metadata": {
    "order_id": "12345",
    "product": "Premium Plan"
  },
  "created_at": "2025-05-17T21:11:49Z",
  "expires_at": "2025-05-17T21:41:49Z"
}

Status Values

  • pending - Payment not yet received
  • processing - Payment received, confirming
  • completed - Payment confirmed
  • failed - Payment failed or expired

Response Fields

  • payment_address - Crypto address to send payment to
  • payment_url - URL for customer to complete payment
  • expires_at - ISO 8601 timestamp when payment expires

Example Request

curl -X POST https://MrProFixer Pay.com/api/payment/create \
-H "Content-Type: application/json" \
-H "X-API-KEY: sk_test_abc123" \
-d '{
  "amount": 100.50,
  "customer_name": "John Doe",
  "customer_email": "john@example.com",
  "currency": "USDT",
  "reference_id": "order_12345",
  "callback_url": "https://yourwebhook.com/payments",
  "redirect_url": "https://yourstore.com/thank-you",
  "network": "TRC20",
  "metadata": {
    "order_id": "12345",
    "product": "Premium Plan"
  }
}'

Check Payment

Retrieve payment details and status by payment ID or reference ID.

GET
https://MrProFixer Pay.com/api/payment/ascertain

Request Parameters

Parameter Location Type Description
id URL string Payment ID (e.g., pay_abc123def456)
altid Query string Your custom reference ID (alternative to payment ID)

Payment ID vs Reference ID

Payment ID: System-generated unique identifier (e.g., pay_abc123def456). Always available.

Reference ID: Your custom identifier provided when creating the payment. Optional but useful for integration with your existing systems.

Response

Returns the full payment object with current status and details:

{
  "id": "pay_abc123def456",
  "object": "payment",
  "amount": 100.5,
  "amount_received": 100.500456,
  "currency": "USDT",
  "reference_id": "order_12345",
  "customer_name": "John Doe",
  "customer_email": "john@example.com",
  "status": "completed",
  "payment_address": "TXYZ...abc123",
  "payment_url": "https://pay.MrProFixer Pay.com/pay_abc123def456",
  "network": "TRC20",
  "transaction_hash": "abc123...xyz789",
  "metadata": {
    "order_id": "12345",
    "product": "Premium Plan"
  },
  "created_at": "2025-05-17T21:11:49Z",
  "paid_at": "2025-05-17T21:15:22Z",
  "expires_at": "2025-05-17T21:41:49Z"
}

Example Requests

Using Payment ID (GET request):

curl -X GET "https://MrProFixer Pay.com/api/payment/ascertain?payment_id=pm_123456" \
-H "Content-Type: application/json" \
-H "X-API-KEY: sk_test_abc123" \
-d '{"invoiceid": "inv-23***"}'

Using Reference ID / Invoice ID (POST request with 'altid'):

curl -X POST https://MrProFixer Pay.com/api/payment/ascertain \
-H "Content-Type: application/json" \
-H "X-API-KEY: sk_test_abc123" \
-d '{"altid": "customid"}'

Error Handling

The MrProFixer Pay API uses conventional HTTP response codes to indicate success or failure of API requests. In general:

  • 2xx - Success
  • 4xx - Client errors (invalid request, authentication, etc.)
  • 5xx - Server errors
Code Status Description
200 OK Request succeeded
201 Created Resource created successfully
400 Bad Request Invalid request parameters
401 Unauthorized Invalid or missing API key
403 Forbidden Insufficient permissions
404 Not Found Resource not found
429 Too Many Requests Rate limit exceeded
500 Server Error Internal server error

Error Response Format

All error responses follow the same format:

{
  "error": {
    "code": "invalid_request",
    "message": "Amount must be greater than 0",
    "param": "amount",
    "type": "invalid_request_error",
    "status_code": 400
  }
}

Common Error Types

  • invalid_request_error - Invalid request parameters
  • authentication_error - Authentication failed
  • api_error - API processing error
  • rate_limit_error - Too many requests

Code Examples

Below are examples of how to interact with the MrProFixer Pay Payment API in various programming languages.

Create Payment

// Using Fetch API
const createPayment = async () => {
  const apiKey = 'your_api_key_here';
  const url = 'https://MrProFixer Pay.com/api/payment/create';
  
  const data = {
    amount: 100.50,
    customer_name: 'John Doe',
    customer_email: 'john@example.com',
    currency: 'USDT',
    additional_id: 'order_12345',
    callback_url: 'https://yourwebhook.com/payments',
    metadata: {
      order_id: '12345',
      product: 'Premium Plan'
    }
  };
  
  try {
    const response = await fetch(url, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-API-KEY': apiKey
      },
      body: JSON.stringify(data)
    });
    
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
    
    const payment = await response.json();
    console.log('Payment created:', payment);
    // Redirect user to payment URL
    window.location.href = payment.payment_url;
  } catch (error) {
    console.error('Error creating payment:', error);
  }
};

Check Payment Status

// Using Fetch API - GET request with payment_id parameter
const checkPayment = async (paymentId) => {
  const apiKey = 'your_api_key_here';
  const url = `https://MrProFixer Pay.com/api/payment/ascertain?payment_id=${paymentId}`;
  
  try {
    const response = await fetch(url, {
      method: 'GET',
      headers: {
        'X-API-KEY': apiKey
      }
    });
    
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
    
    const payment = await response.json();
    console.log('Payment status:', payment.status);
    return payment;
  } catch (error) {
    console.error('Error checking payment:', error);
    throw error;
  }
};

// Example usage with payment ID
checkPayment('pay_abc123def456')
  .then(payment => {
    if (payment.status === 'completed') {
      // Handle completed payment
    }
  });

// Alternative using POST request with altid
const checkPaymentByReference = async (referenceId) => {
  const apiKey = 'your_api_key_here';
  const url = 'https://MrProFixer Pay.com/api/payment/ascertain';
  
  try {
    const response = await fetch(url, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-API-KEY': apiKey
      },
      body: JSON.stringify({ altid: referenceId })
    });
    
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
    
    return await response.json();
  } catch (error) {
    console.error('Error checking payment:', error);
    throw error;
  }
};

Addon Modules

MrProFixer Pay provides official modules for popular billing and automation platforms. These modules simplify integration and provide native functionality within your existing systems.

WHMCS Logo

WHMCS Module

Official MrProFixer Pay payment gateway module for WHMCS. Automates invoice payments with cryptocurrency.

  • Automatic invoice payments with USDT
  • Real-time payment status updates
  • Supports WHMCS 8.x and newer
v1.0.0 • 4,287 downloads
DHRU Fusion Logo

DHRU Fusion Module

Official MrProFixer Pay payment integration for DHRU Fusion. Enables crypto payments for your telecom business.

  • Seamless integration with DHRU Fusion API
  • Automatic balance top-ups with USDT
  • Transaction history and reporting
v1.0.0 • 2,156 downloads

Need a module for another platform?

We're constantly adding new integrations. If you need a module for a platform not listed here, contact our support team to discuss custom development options.