EverSafePay – Payment Gateway API
EverSafePay allows merchants to securely create payment orders and redirect customers to a hosted checkout page.
Base URL: https://eversafepay.com/v1
Create Order API
POST https://eversafepay.com/v1/create_order
Headers
Content-Type: application/x-www-form-urlencoded
Required Parameters
| Parameter | Description |
|---|---|
| client_id | Merchant Client ID |
| secret_key | Merchant Secret Key |
| amount | Transaction Amount |
| company | Company / Merchant Name |
| description | Order Description |
| first_name | Customer First Name |
| last_name | Customer Last Name |
| Customer Email | |
| phone | Customer Phone |
Success Response
{
"isError": false,
"message": "Order created successfully",
"data": {
"order_id": "ORD123456",
"payment_url": "https://gateway.com/pay?token=XXXX"
}
}
Backend Integrations
PHP (Core)
$data = [
"client_id"=>"CID",
"secret_key"=>"SECRET",
"amount"=>"100",
"company"=>"MK Studio",
"description"=>"Website Payment",
"first_name"=>"Asha",
"last_name"=>"Patel",
"email"=>"asha@mail.com",
"phone"=>"9999999999"
];
$ch = curl_init("https://eversafepay.com/v1/create_order");
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,http_build_query($data));
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
echo curl_exec($ch);
Node.js
axios.post(API,new URLSearchParams(payload))
.then(r=>console.log(r.data));
Express.js
app.post('/pay', async(req,res)=>{
const r = await axios.post(API,new URLSearchParams(req.body));
res.json(r.data);
});
Python
requests.post(API,data=payload).json()
Go
http.PostForm(API, data)
Rust
client.post(API).form(&payload).send().await?
Java
HttpClient.newHttpClient().send(request, BodyHandlers.ofString());
Kotlin
client.newCall(request).execute()
Swift
URLSession.shared.dataTask(with: request)
Frontend Integrations
HTML + JS
fetch('/api/create-order')
.then(r=>r.json())
.then(d=>location.href=d.data.payment_url);
React
window.location.href = payment_url;
Next.js
res.redirect(payment_url)
Vue.js
window.location = payment_url
Flutter
launch(paymentUrl);
React Native
Linking.openURL(paymentUrl);
Callback Documentation
order_id=ORD123
amount=100
status=SUCCESS
code=200
message=Transaction success
PHP Callback
file_put_contents("callback.log",json_encode($_POST),FILE_APPEND);
echo "OK";
Security Guidelines
- Never expose secret_key
- Server-side requests only
- HTTPS mandatory
- Validate callbacks
- Log every transaction
Support
Email: support@eversafepay.com
Tickets: Merchant Support Portal