How Transit Integration Works
Send the Initialization Request with payment_type 3
From your server, send a
Headers
Below is a complete sample initialization request body:
POST request to the Payzah initialization endpoint with payment_type set to "3". This single value covers all supported payment methods, including Apple Pay.Endpoints| Environment | URL |
|---|---|
| Test | https://development.payzah.net/ws/paymentgateway/index |
| Production | https://payzah.net/production770/ws/paymentgateway/index |
| Header | Value |
|---|---|
Content-Type | application/json |
Authorization | base64_encode($privateKey) |
Read the transit_url from the Response
When your initialization request succeeds, Payzah returns a JSON response with Extract and store the
status: true. The transit_url field contains the URL you will redirect your customer to. The direct_url field will be empty for Transit integrations.Success Response
transit_url and PaymentID values. You will need PaymentID to correlate Payzah’s callback with your order records.If
status is false, do not redirect the customer. Log the error response, surface a friendly message to your customer, and allow them to retry or choose another payment method.Redirect Your Customer to the Transit URL
Immediately redirect your customer’s browser to the
transit_url value returned in the previous step. Payzah’s hosted payment page will load and present all available payment options — K-Net, VISA, MasterCard, and Apple Pay — in a single branded interface.PHP Redirect
Express.js Redirect
Handle the Success and Error Redirects
After your customer completes or abandons payment, Payzah redirects them back to either your
At your
success_url or error_url. These URLs receive the transaction result as query parameters.Key parameters returned to your URLs| Parameter | Description |
|---|---|
payzahReferenceCode | Payzah’s unique reference for this transaction |
trackId | The trackid you sent in the initialization request |
knetPaymentId | Unique ID assigned by the payment gateway |
transactionNumber | Unique transaction identifier |
trackingNumber | Track ID echoed from your request |
paymentDate | Date the payment was processed |
paymentStatus | Final transaction status (see below) |
udf1–udf5 | Any user-defined fields you included in the request |
success_url, verify that paymentStatus equals CAPTURED before fulfilling the order. Do not rely solely on the redirect to success_url as confirmation.Possible paymentStatus values| Status | Meaning |
|---|---|
CAPTURED | Funds captured — safe to fulfil the order |
VOIDED | Transaction was voided before capture |
NOT CAPTURED | Authorised but not captured |
CANCELED | Customer cancelled on the payment page |
DENIED BY RISK | Blocked by risk rules |
HOST TIMEOUT | Gateway timed out — confirm status before acting |
Why Use the Transit Payment Page?
The Transit Payment Page is the recommended integration path for most merchants because Payzah manages the full payment interface on your behalf.| Feature | Detail |
|---|---|
Single payment_type | Use "3" for all methods — K-Net, VISA, MasterCard, and Apple Pay |
| Branded experience | The page displays your merchant logo automatically |
| Payzah-managed security | PCI DSS compliance, TLS, and fraud controls handled by Payzah |
| No UI maintenance | Payment method updates and UI improvements are applied by Payzah |
If you need to send customers directly to a specific payment provider’s page without the intermediate Payzah-hosted step, see the Direct Integration guide instead.