This documentation explains everything required to integrate
Paymora Payment Gateway into any website, software, or mobile app,
using any programming language.
Golden Rule:
Payment success is confirmed ONLY via webhook.
Redirect URLs are UI-only and must NEVER update database records.
1. Prerequisites
Public HTTPS backend server
Database (orders, payments, balance)
Webhook endpoint reachable from internet
Secure storage for secrets
2. Credentials Provided by Paymora
client_id
webhook_secret
webhook_url (your backend)
Authorized domain
Never expose webhook_secret in frontend or client-side JavaScript.
3. Hosted Payment Page
Redirect user to the following URL to start payment:
https://pay.winx99.space/gateway/pay.php
Required Parameters
client_id
order_id (unique, backend-generated)
amount (final payable amount)
success_url (UI only)
fail_url (UI only)
Do NOT call this URL using AJAX. Always redirect the browser.
You are a senior payment gateway integration engineer and security expert.
I want to integrate Paymora Payment Gateway into my system.
Payment URL:
https://pay.winx99.space/gateway/pay.php
Webhook:
POST https://mydomain.com/webhook/paymora
Webhook Payload:
{
"txn_id": "string",
"order_id": "string",
"amount": number,
"status": "approved | declined | expired"
}
Security Rules:
- Verify HMAC SHA256 signature using webhook_secret
- Header: X-Genext-Signature
- Use RAW payload
- Process ONLY approved payments
- Implement idempotency
- Never trust redirect URLs
- Never trust frontend amount
Flow Requirements:
1. Create order
2. Calculate final amount
3. Save payable_amount
4. Redirect user to Paymora
5. Receive webhook
6. Verify signature
7. Match amount
8. Save txn_id
9. Save paid_amount
10. Credit balance
11. Lock record
Explain end-to-end integration.
Provide code examples.
Highlight common mistakes.
Do not simplify security.