> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payzah.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Choose a Payzah Integration Method: Transit vs Direct

> Compare Payzah's Transit Payment Page and Direct Integration to choose the right approach for your checkout experience and development resources.

Payzah gives you two integration methods so you can match the checkout experience to your business needs without over-engineering. If speed-to-market matters most, the Transit Payment Page gets you live in hours. If you need full control over every pixel and payment flow, Direct Integration is the right choice.

## Side-by-Side Comparison

|                          | Transit Payment Page                  | Direct Integration                                        |
| ------------------------ | ------------------------------------- | --------------------------------------------------------- |
| **Setup Complexity**     | Low — minimal code required           | Higher — each payment method configured separately        |
| **Time to Launch**       | Fast                                  | Longer, proportional to customization                     |
| **UI Control**           | Payzah-hosted, branded with your logo | Fully custom — you own the interface                      |
| **Payment Methods**      | All methods on one page               | K-Net, Credit Card, and Apple Pay integrated individually |
| **Ongoing Maintenance**  | Payzah handles updates and security   | You manage the integration                                |
| **Best For**             | Quick launches, standard checkouts    | Branded experiences, complex payment flows                |
| **`payment_type` value** | `"3"`                                 | `"1"` (K-Net) or `"2"` (Credit Card)                      |

***

## Transit Payment Page

The Transit Payment Page is a fully hosted checkout solution managed by Payzah. You initialize a payment session via the API, then redirect your customer to the returned URL — Payzah handles everything from there.

<Note>
  Use `payment_type: "3"` in your initialization request to activate the Transit Payment Page flow. The API response will include a `transit_url` to which you redirect the customer.
</Note>

### Key Features

<CardGroup cols={2}>
  <Card title="Quick Integration" icon="bolt">
    Minimal development effort required. Redirect your customer and let Payzah handle the rest.
  </Card>

  <Card title="All Payment Methods in One Page" icon="layer-group">
    K-Net, VISA, MasterCard, and Apple Pay (credit and debit) are all available on the single hosted checkout page.
  </Card>

  <Card title="Branded With Your Logo" icon="image">
    Your merchant logo and business details are displayed on the payment page, maintaining customer trust.
  </Card>

  <Card title="Minimal Maintenance" icon="shield-check">
    Payzah manages all page updates, security patches, and compliance changes — you never need to update the checkout UI.
  </Card>
</CardGroup>

### How It Works

<Steps>
  <Step title="Initialize the Payment">
    Send a POST request to the Payzah API with `payment_type` set to `"3"` along with your order details.

    ```json theme={null}
    {
      "payment_type": "3",
      "amount": "10.500",
      "order_id": "ORD-00123",
      "currency": "KWD"
    }
    ```
  </Step>

  <Step title="Receive the Transit URL">
    The API responds with a `transit_url` pointing to your customer's hosted payment session.

    ```json theme={null}
    {
      "transit_url": "https://checkout.payzah.com/transit/abc123xyz"
    }
    ```
  </Step>

  <Step title="Redirect the Customer">
    Redirect your customer's browser to the `transit_url`. They complete payment on the Payzah-hosted page and are returned to your site upon completion.
  </Step>
</Steps>

<ResponseField name="transit_url" type="string">
  The fully qualified URL of the hosted payment page for this transaction. Redirect the customer's browser to this URL to begin checkout.
</ResponseField>

### When to Use Transit Payment Page

Choose the Transit Payment Page when:

* You want to launch quickly without building a custom checkout UI
* Your checkout requirements are straightforward and don't need deep customization
* You prefer Payzah to own the maintenance and security of the payment interface
* You want to offer all payment methods (K-Net, VISA, MasterCard, Apple Pay) without separate integrations

***

## Direct Integration

Direct Integration gives you full control over the checkout experience. You integrate each payment method individually, building and owning every part of the payment UI while using Payzah's API to process transactions.

<Note>
  Use `payment_type: "1"` for K-Net or `payment_type: "2"` for Credit Card (VISA/MasterCard/Apple Pay) in your initialization request. The API response will include a `direct_url` to which you redirect the customer for that specific payment method.
</Note>

### Key Features

<CardGroup cols={2}>
  <Card title="Custom Integration" icon="sliders">
    Integrate K-Net, Credit Cards, and Apple Pay individually, exactly as your application requires.
  </Card>

  <Card title="Full UI Control" icon="pen-ruler">
    You design and own the payment interface — match it precisely to your website's look, feel, and workflow.
  </Card>

  <Card title="Detailed Configuration" icon="gear">
    Handle specific payment scenarios, conditional flows, and edge cases that a generic hosted page cannot accommodate.
  </Card>

  <Card title="Tailored Checkout" icon="paintbrush">
    Deliver a seamless, on-brand checkout that feels native to your platform rather than a redirect to a third-party page.
  </Card>
</CardGroup>

### How It Works

<Tabs>
  <Tab title="K-Net">
    <Steps>
      <Step title="Initialize a K-Net Payment">
        Send a POST request with `payment_type` set to `"1"`.

        ```json theme={null}
        {
          "payment_type": "1",
          "amount": "10.500",
          "order_id": "ORD-00124",
          "currency": "KWD"
        }
        ```
      </Step>

      <Step title="Receive the Direct URL">
        The API responds with a `direct_url` for the K-Net payment flow.

        ```json theme={null}
        {
          "direct_url": "https://checkout.payzah.com/direct/knet/def456uvw"
        }
        ```
      </Step>

      <Step title="Redirect the Customer">
        Redirect your customer to the `direct_url` to complete K-Net authentication and payment.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Credit Card / Apple Pay">
    <Steps>
      <Step title="Initialize a Credit Card Payment">
        Send a POST request with `payment_type` set to `"2"`.

        ```json theme={null}
        {
          "payment_type": "2",
          "amount": "10.500",
          "order_id": "ORD-00125",
          "currency": "KWD"
        }
        ```
      </Step>

      <Step title="Receive the Direct URL">
        The API responds with a `direct_url` for the Credit Card / Apple Pay flow.

        ```json theme={null}
        {
          "direct_url": "https://checkout.payzah.com/direct/card/ghi789rst"
        }
        ```
      </Step>

      <Step title="Redirect the Customer">
        Redirect your customer to the `direct_url` to complete their VISA, MasterCard, or Apple Pay transaction.
      </Step>
    </Steps>
  </Tab>
</Tabs>

<ResponseField name="direct_url" type="string">
  The URL for the specific payment method flow selected by `payment_type`. Redirect the customer's browser to this URL to initiate the direct payment process.
</ResponseField>

### `payment_type` Reference

<ParamField body="payment_type" type="string" required>
  Determines the payment flow and the type of URL returned in the response.

  * `"1"` — K-Net direct flow; response contains `direct_url`
  * `"2"` — Credit Card (VISA, MasterCard, Apple Pay) direct flow; response contains `direct_url`
  * `"3"` — Transit Payment Page (all methods); response contains `transit_url`
</ParamField>

### When to Use Direct Integration

Choose Direct Integration when:

* You need your checkout UI to match your brand or application design system precisely
* You want to present specific payment methods conditionally based on customer context
* You require fine-grained control over the payment flow, error handling, and post-payment logic
* You have the development resources to build and maintain individual payment method integrations

***

## Quick Decision Guide

<Tip>
  **Not sure which to pick?** Start with the Transit Payment Page. You can always migrate to Direct Integration later once you have a clearer picture of your customization requirements.
</Tip>

| I want to…                                | Recommended Method   |
| ----------------------------------------- | -------------------- |
| Launch as quickly as possible             | Transit Payment Page |
| Show all payment methods on one page      | Transit Payment Page |
| Match my site's exact design              | Direct Integration   |
| Control each payment method separately    | Direct Integration   |
| Minimize long-term maintenance            | Transit Payment Page |
| Handle complex, conditional payment flows | Direct Integration   |

## Next Steps

<CardGroup cols={2}>
  <Card title="Transit Payment Page Guide" icon="bolt" href="/guides/transit-payment-page">
    Full implementation reference for the hosted Transit Payment Page integration.
  </Card>

  <Card title="Direct Integration Guide" icon="sliders" href="/guides/direct-integration">
    Step-by-step guide to integrating K-Net, Credit Cards, and Apple Pay directly.
  </Card>
</CardGroup>
