Prerequisites
Before you begin, make sure you have:- A partner account at partner.mizaniyapay.dz
- Your API Secret for Bearer token authentication
- Your HMAC Secret for verifying webhook signatures
- An HTTPS-accessible server to host your endpoints
1
Create a Partner Account
Register at the Partner Portal. Once your account is approved by Mizaniya Pay, you will receive your API Secret and HMAC Secret. Store both values securely as environment variables before proceeding.
2
Configure Your Integration
Provide the following two URLs to Mizaniya Pay so VTPE knows where to route requests:
3
Implement the Product Information API
Expose a
GET endpoint at {API_URL}/{reference}. VTPE calls this before initiating any payment. Return the payment details or the appropriate error response.See Errors for the full list of error codes and when to return each one.
4
Implement the Webhook Handler
VTPE POSTs signed webhook events to your Webhook URL. Verify the signature, parse the
event and data fields, handle each event type, and return HTTP 200 with { "success": true }.5
Verify Signatures
VTPE signs every webhook using
HMAC-SHA256(rawBody + timestamp, HMAC_SECRET). The result is a plain hex string in the X-Signature header. Always verify this before processing any event.For the full verification guide with step-by-step instructions, see Webhook Security.6
Go Live
Before switching to production, complete this checklist:
- Switch to your production API Secret and HMAC Secret
- Confirm both your API URL and Webhook URL are HTTPS
- Test the full payment flow with Mizaniya Pay
- Verify signature verification is active (never skip in production)
Next Steps
- Review the API Reference for complete request and response fields.
- Read the Webhook Security guide for full HMAC signature verification details.
- Follow Best Practices to make your integration robust and production-ready.
