> ## Documentation Index
> Fetch the complete documentation index at: https://beta-developers.mizaniyapay.dz/llms.txt
> Use this file to discover all available pages before exploring further.

# Mizaniya Pay VTPE: Payment Integration API for Partners

> Mizaniya Pay VTPE is a Virtual Terminal Payment Engine that partners integrate with by building a Product Information API endpoint and a webhook receiver for payment events.

Mizaniya Pay VTPE is a Virtual Terminal Payment Engine that enables partner businesses to accept payments through the Mizaniya Pay platform. As a partner developer, you build two integration components: a Product Information API endpoint that VTPE calls to retrieve payment details, and a Webhook Endpoint that receives payment state change events from VTPE.

## Architecture Overview

When a customer initiates a payment on the VTPE platform, the flow works as follows:

1. VTPE calls your Product Information API to retrieve payment details using a business reference.
2. Your API returns the amount, currency, and payment details to display to the customer.
3. VTPE processes the payment through its platform.
4. VTPE sends webhook events to your Webhook Endpoint as the payment state changes.

This inverted architecture means you host the Product Information API while VTPE hosts the payment processing and webhook delivery infrastructure.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Implement your first VTPE integration step by step in minutes.
  </Card>

  <Card title="Integration Overview" icon="sitemap" href="/concepts/integration-overview">
    Learn how the Product Information API and webhooks work together.
  </Card>

  <Card title="Product Information API" icon="code" href="/api-reference/payments/get-payment">
    Explore the GET endpoint schema and response formats.
  </Card>

  <Card title="Webhook Events" icon="bolt" href="/concepts/webhooks">
    Understand payment event types and how to handle them securely.
  </Card>
</CardGroup>

## Onboarding Steps

Get integrated with Mizaniya Pay VTPE by completing these four onboarding steps.

<Steps>
  <Step title="Create a Partner Account">
    Register at the [Partner Portal](https://partner.mizaniyapay.dz/) to get access to the VTPE platform. Once your account is approved, you will receive your API Secret and HMAC Secret.
  </Step>

  <Step title="Receive API credentials from Mizaniya Pay">
    After account approval, you receive an API Secret for authentication and an HMAC Secret for webhook signature verification.
  </Step>

  <Step title="Configure your integration">
    Provide your API URL and Webhook URL to Mizaniya Pay. The API URL is the endpoint VTPE calls to retrieve payment details. The Webhook URL is the endpoint that receives payment events.
  </Step>

  <Step title="Implement the Product Information API endpoint">
    Build a `GET` endpoint at `{API_URL}/{reference}` that returns payment information, including `total_amount`, `currency`, and optional `amount_detail` and `details` arrays.
  </Step>

  <Step title="Implement the webhook handler and verify signatures">
    Build a `POST` endpoint at your Webhook URL that parses the event envelope, handles relevant payment events, and verifies the HMAC signature on every request.
  </Step>
</Steps>
