Developer Documentation
Powerful payment infrastructure with intelligent routing, automatic failover, and multi-provider support. Create payment links and track transactions with just a few API calls.
Automatic provider selection and failover for maximum approval rates.
Bank-grade encryption, PCI DSS compliant infrastructure.
Clean REST API with comprehensive documentation.
Accept cards, Open Banking, and more through a single API.
First step: Get your authentication credentials
sk_test_*TEST MODE• Use for development and testing
• Routes to DEMO provider (no real money)
• Safe to use in staging environments
sk_live_*LIVE MODE• Use for production payments
• Routes to real payment providers
• Processes actual transactions
FLUXPAY_API_KEY=sk_live_your_key_hereUse any HTTP client to integrate with FluxPay
# No installation needed - cURL is pre-installed on most systems
# Your API key from Dashboard → Settings → API Keys
# Test mode: sk_test_* | Live mode: sk_live_*Understanding parameters and payment flow
amountnumberPayment amount in decimal format (e.g., 99.99).
Used to determine traffic routing (FTD/STD/REST segmentation).
currencystringCurrency code (USD, EUR, GBP, CAD, AUD, etc.).
Must be supported by at least one of your assigned payment providers.
customer.emailstringCustomer email address.
Used for payment receipts and customer identification.
customer.firstNamestringCustomer first name.
Required by payment providers for compliance and fraud prevention.
customer.lastNamestringCustomer last name.
Required by payment providers for compliance and fraud prevention.
descriptionstringPayment description.
Helps you and your customer identify the payment purpose.
customer.phonestringCustomer phone number.
Pre-fills the phone field on the payment form.
customer.billingobjectBilling address object.
Pre-fills billing address fields on the payment form.
Fields: address, city, state, country, postalCode
"billing": { "address": "123 Main St", "city": "NYC", "state": "NY", "country": "US", "postalCode": "10001" }languagestringPayment form language.
Sets the language for the payment form UI.
Supported: en (English), fr (French)
webhookUrlstring (optional)Custom webhook URL for this specific payment.
Important: Overrides your default webhook URL configured in the dashboard.
When to use:
⚠️ If not provided, uses the webhook URL from your dashboard settings.
metadataobject (optional)Custom data object attached to the payment.
Purpose: Store any custom information (order IDs, user IDs, etc.)
Returned in: Webhooks and API responses for easy correlation
Example use cases:
curl -X POST https://fluxpay.online/api/v1/payments \
-H "Authorization: Bearer sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"amount": 99.99,
"currency": "USD",
"customer": {
"email": "customer@example.com",
"firstName": "John",
"lastName": "Doe",
"phone": "+1-212-555-1234",
"billing": {
"address": "123 Main Street",
"city": "New York",
"state": "NY",
"country": "US",
"postalCode": "10001"
}
},
"description": "Order #1234",
"language": "fr",
"webhookUrl": "https://yoursite.com/webhooks/fluxpay",
"metadata": {
"orderId": "ORD-2024-001",
"userId": "user_12345"
}
}'
# Response:
# {
# "success": true,
# "payment": {
# "id": "pay_abc123",
# "status": "PENDING",
# "amount": 99.99,
# "currency": "USD",
# "paymentUrl": "https://fluxpay.online/payment/generic/pay_abc123",
# "customer": { ... },
# "createdAt": "2025-01-23T10:30:00Z"
# }
# }https://fluxpay.online/payment/generic/pay_abc123)Multiple ways for your customers to pay
Accept all major credit and debit cards with 3D Secure authentication support. Intelligent routing automatically selects the best provider for each transaction.
Instant bank-to-bank payments via Open Banking. Lower fees than cards with direct settlement to your account. Available in supported European markets.
paymentMethod field indicating which method was used (CREDIT_CARD or OPEN_BANKING).Every webhook notification includes a paymentMethod field so you can identify how the customer paid:
{
"event": "payment.completed",
"transactionId": "pay_abc123",
"amount": 99.99,
"currency": "EUR",
"status": "COMPLETED",
"paymentMethod": "OPEN_BANKING", // or "CREDIT_CARD"
"customerEmail": "customer@example.com",
...
}CREDIT_CARDCard payment (Visa, Mastercard, etc.)
OPEN_BANKINGDirect bank transfer via Open Banking
Receive real-time payment notifications
Set a default webhook URL in your dashboard that applies to all payments:
Override the default by including webhookUrl in your API request:
webhookUrl: "https://your-app.com/webhooks"Useful for routing different payment types to different endpoints.
payment.completedPayment successful - fulfill order and send confirmation
payment.failedPayment failed after all retry attempts - notify customer
payment.pendingPayment processing - update order status to "processing"
Failed webhooks are automatically retried:
• After 5 seconds
• After 30 seconds
• After 5 minutes
• Maximum 3 attempts
# WEBHOOK PAYLOAD EXAMPLE
# POST https://yoursite.com/webhooks/fluxpay
# Headers:
# Content-Type: application/json
# X-Webhook-Signature: <hmac_sha256_signature>
{
"event": "payment.completed",
"transactionId": "pay_abc123",
"amount": 99.99,
"currency": "USD",
"status": "COMPLETED",
"customerEmail": "customer@example.com",
"metadata": {
"orderId": "ORD-2024-001",
"userId": "user_12345"
},
"processedAt": "2025-01-23T10:35:00Z"
}
# YOUR WEBHOOK ENDPOINT MUST:
# 1. Verify the X-Webhook-Signature header (HMAC SHA256)
# 2. Process the event (fulfill order, send email, etc.)
# 3. Return 200 OK within 30 secondsRedirect customers back after payment completion
returnUrlstring (optional)General redirect URL for both success and failure. Customer is redirected here after any payment outcome.
successUrlstring (optional)Success-specific redirect.
Overrides returnUrl for successful payments only.
failureUrlstring (optional)Failure-specific redirect.
Overrides returnUrl for failed payments only.
When the customer is redirected, these query parameters are appended to your URL:
status- "success" or "failed"transaction_id- Unique transaction identifieramount- Payment amountcurrency- Currency code (USD, EUR, etc.)reference- External reference IDmetadata[key]- Your custom metadata fieldsTip: Always verify payment status via webhook or API query - do not rely solely on redirect URL parameters.
curl -X POST https://fluxpay.online/api/v1/payments \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 99.99,
"currency": "USD",
"customer": {
"email": "customer@example.com",
"firstName": "John",
"lastName": "Doe"
},
"description": "Order #1234",
"metadata": {
"orderId": "ORD-2024-001"
},
"returnUrl": "https://yoursite.com/payment/callback",
"successUrl": "https://yoursite.com/payment/success",
"failureUrl": "https://yoursite.com/payment/failure"
}'
# After payment, customer is redirected to:
# SUCCESS: https://yoursite.com/payment/success?status=success&transaction_id=...
# FAILURE: https://yoursite.com/payment/failure?status=failed&transaction_id=...Embed FluxPay checkout directly in your website
Redirect customer to FluxPay hosted page. Best for security and compliance. No iframe needed.
Embed payment page in a popup modal. Keeps customer on your site during checkout.
Embed payment form directly in your page layout. Seamless checkout experience.
<!-- OPTION 1: Inline iFrame -->
<iframe
src="https://fluxpay.online/payment/generic/pay_abc123"
width="100%"
height="600"
frameborder="0"
allow="payment"
style="border: none; border-radius: 12px;"
></iframe>
<!-- OPTION 2: Modal/Popup iFrame -->
<div id="payment-modal" style="
display: none;
position: fixed;
top: 0; left: 0;
width: 100vw; height: 100vh;
background: rgba(0,0,0,0.5);
z-index: 9999;
">
<div style="
position: absolute;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
width: 90%; max-width: 500px;
background: white;
border-radius: 16px;
overflow: hidden;
">
<iframe id="payment-iframe" width="100%" height="600" frameborder="0"></iframe>
</div>
</div>
<script>
function openPayment(paymentUrl) {
document.getElementById('payment-iframe').src = paymentUrl;
document.getElementById('payment-modal').style.display = 'block';
}
</script>// React Component for Embedded Payment
import { useState } from 'react';
function PaymentModal({ paymentUrl, onClose }) {
return (
<div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50">
<div className="bg-white rounded-2xl w-full max-w-lg overflow-hidden">
<div className="flex justify-between items-center p-4 border-b">
<h3 className="font-semibold">Complete Payment</h3>
<button onClick={onClose} className="text-gray-500 hover:text-gray-700">✕</button>
</div>
<iframe
src={paymentUrl}
className="w-full h-[600px] border-0"
allow="payment"
/>
</div>
</div>
);
}
// Usage in your checkout page
function CheckoutPage() {
const [paymentUrl, setPaymentUrl] = useState(null);
const handleCheckout = async () => {
const res = await fetch('/api/create-payment', { method: 'POST' });
const { paymentUrl } = await res.json();
setPaymentUrl(paymentUrl);
};
return (
<div>
<button onClick={handleCheckout}>Pay Now</button>
{paymentUrl && (
<PaymentModal
paymentUrl={paymentUrl}
onClose={() => setPaymentUrl(null)}
/>
)}
</div>
);
}fluxpay.online.Create your account, generate an API key, and start processing payments in minutes.