Skip to main content

Introduction

Welcome to the Uplef API documentation. This guide will help you integrate payment processing into your applications.

What is Uplef?​

Uplef is a payment gateway aggregator that allows you to accept payments through multiple payment methods including Crypto and Cards. We handle the complexity of integrating with multiple payment providers so you can focus on building your product.

Key Features​

  • Multiple Payment Methods - Accept Crypto, Cards, and more
  • Real-time Webhooks - Get instant payment status updates
  • Secure API - Industry-standard security with API key authentication
  • Easy Integration - Simple REST API with comprehensive documentation
  • Smart Routing - Automatically route payments to the best gateway

How It Works​

sequenceDiagram
participant M as Your Server
participant P as Uplef API
participant C as Customer
participant PP as Payment Page

M->>P: 1. Create Order (amount, customer)
P-->>M: Order ID + Payment Page URL
M->>C: 2. Redirect to Payment Page
C->>PP: 3. Select Payment Method
PP->>P: 4. Process Payment
P-->>PP: Payment Result
PP->>C: 5. Redirect to Success/Failure URL
P->>M: 6. Webhook Notification

Quick Integration​

Step 1: Get API Keys​

  1. Sign up for a merchant account
  2. Complete KYC verification
  3. Generate API keys from Settings → API Keys

Step 2: Create an Order​

curl -X POST https://api.uplef.com/api/v1/orders \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"currency": "USD",
"customer": {
"email": "customer@example.com"
}
}'

Step 3: Redirect Customer​

Use the paymentPageUrl from the response to redirect your customer:

window.location.href = response.data.paymentPageUrl;

Step 4: Handle Webhook​

Set up a webhook endpoint to receive payment notifications:

app.post('/webhooks/uplef', (req, res) => {
const { event, data } = req.body;

if (event === 'payment.success') {
// Update your order status
console.log('Payment successful:', data.orderId);
}

res.status(200).send('OK');
});

Next Steps​

Need Help?​