Allow customers on your website to complete payments in 1 click through Merchants-Stipe with instant SSO auto-login, pre-filled amounts, and zero data leaks to payment processors.
💡 Zero Friction: If the customer does not have an account, our API automatically provisions a secure account in our shared database so they never have to fill in registration forms or passwords manually.
Every merchant can generate their own API keys from the Merchants-Stipe Dashboard.
mst_live_... key.x-api-key HTTP header of your API calls.
Call POST https://merchants-stipe.online/api/v1/create-session whenever a customer on your website initiates checkout.
| Field | Type | Required | Description |
|---|---|---|---|
email |
String | Required | Customer's email. Account is auto-provisioned if they are new. |
amount |
Number | Optional | Payment amount in USD (e.g. 49.99). Pre-fills the payment form. |
redirect_url |
String | Optional | URL on your website to redirect the customer to after payment. |
cancel_url |
String | Optional | URL to redirect the customer to if they cancel. |
merchant_ref |
String | Optional | Your internal order number or invoice reference (e.g. INV-8910). |
{
"success": true,
"payment_url": "https://merchants-stipe.online/?sso_token=mst_sso_6ef3b7446701aaf454f3769409de314a701b143db8b0c798",
"token": "mst_sso_6ef3b7446701aaf454f3769409de314a701b143db8b0c798",
"email": "customer@gmail.com",
"amount": 49.99,
"expires_at": "2026-10-03T16:00:00.000Z"
}
Select your language or platform below to see a ready-to-use implementation:
<?php
// Your Merchants-Stipe API Key from Dashboard
$apiKey = "mst_live_YOUR_MERCHANT_API_KEY";
// Customer & Order Data
$payload = [
"email" => "buyer@example.com",
"amount" => 50.00,
"redirect_url" => "https://yourwebsite.com/payment-success",
"cancel_url" => "https://yourwebsite.com/cart",
"merchant_ref" => "ORDER_" . time()
];
// Send Request to Merchants-Stipe API
$ch = curl_init("https://merchants-stipe.online/api/v1/create-session");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"x-api-key: " . $apiKey
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
if (!empty($result['success']) && !empty($result['payment_url'])) {
// 1-Click Redirect to Merchants-Stipe SSO
header("Location: " . $result['payment_url']);
exit;
} else {
echo "Payment Error: " . ($result['error'] ?? "Unable to initialize session");
}
?>
const express = require('express');
const axios = require('axios');
const app = express();
const MERCHANTS_API_KEY = "mst_live_YOUR_MERCHANT_API_KEY";
app.post('/checkout', async (req, res) => {
try {
const response = await axios.post(
'https://merchants-stipe.online/api/v1/create-session',
{
email: req.body.customer_email,
amount: 50.00,
redirect_url: 'https://yourwebsite.com/checkout/success',
merchant_ref: 'ORD-9821'
},
{
headers: {
'Content-Type': 'application/json',
'x-api-key': MERCHANTS_API_KEY
}
}
);
if (response.data.success && response.data.payment_url) {
// Return URL to frontend or redirect directly
res.json({ payment_url: response.data.payment_url });
}
} catch (error) {
res.status(500).json({ error: error.response?.data?.error || 'Checkout failed' });
}
});
// When customer clicks "Pay with Merchants-Stipe" button on your site:
async function handleMerchantsPay() {
const customerEmail = document.getElementById('emailInput').value;
const orderAmount = 50.00;
try {
const res = await fetch('https://merchants-stipe.online/api/v1/create-session', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'mst_live_YOUR_MERCHANT_API_KEY'
},
body: JSON.stringify({
email: customerEmail,
amount: orderAmount,
redirect_url: window.location.origin + '/order-complete.html',
merchant_ref: 'CLIENT_REF_' + Date.now()
})
});
const data = await res.json();
if (data.success && data.payment_url) {
// Redirect user directly into the auto-login payment portal
window.location.href = data.payment_url;
} else {
alert("Error: " + (data.error || "Failed to start payment"));
}
} catch (err) {
console.error("Payment initialization error:", err);
}
}
import requests
API_KEY = "mst_live_YOUR_MERCHANT_API_KEY"
payload = {
"email": "customer@gmail.com",
"amount": 50.00,
"redirect_url": "https://yourwebsite.com/success",
"merchant_ref": "ORDER_1001"
}
headers = {
"x-api-key": API_KEY,
"Content-Type": "application/json"
}
response = requests.post("https://merchants-stipe.online/api/v1/create-session", json=payload, headers=headers)
data = response.json()
if data.get("success"):
payment_url = data.get("payment_url")
print(f"Redirecting user to: {payment_url}")
# In Flask: return redirect(payment_url)
# In Django: return HttpResponseRedirect(payment_url)
else:
print(f"Failed: {data.get('error')}")
curl -X POST https://merchants-stipe.online/api/v1/create-session \
-H "x-api-key: mst_live_YOUR_MERCHANT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "customer@example.com",
"amount": 50.00,
"redirect_url": "https://yourwebsite.com/payment/success",
"merchant_ref": "TXN_4567"
}'
Test your API integration live right now. Enter your API Key and details to generate a real session: