Comprehensive documentation for integrating cryptocurrency payments into your applications
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.
All API requests require authentication using your API key. You can generate and manage your API keys in the MrProFixer Pay Developer Dashboard.
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"
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 a new payment invoice for cryptocurrency payments.
| 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 |
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"
}
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"
}
}'
Retrieve payment details and status by payment ID or reference ID.
| 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: 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.
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"
}
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"}'
The MrProFixer Pay API uses conventional HTTP response codes to indicate success or failure of API requests. In general:
| 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 |
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
}
}
Below are examples of how to interact with the MrProFixer Pay Payment API in various programming languages.
// 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);
}
};
// 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;
}
};
MrProFixer Pay provides official modules for popular billing and automation platforms. These modules simplify integration and provide native functionality within your existing systems.
Official MrProFixer Pay payment gateway module for WHMCS. Automates invoice payments with cryptocurrency.
Official MrProFixer Pay payment integration for DHRU Fusion. Enables crypto payments for your telecom business.
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.