Skip to main content
The direct integration method gives you explicit control over which payment method the customer sees. Instead of landing on a Payzah-hosted selection page, the customer is taken straight to the K-Net or Credit Card flow — eliminating an extra step in your checkout. You specify the payment method via the payment_type field, and the response contains a direct_url that you use to redirect the customer. Endpoint: POST /ws/paymentgateway/index Refer to the API Overview for the base URLs and required authentication headers before making this request.

Payment Type Values

payment_typePayment Method
"1"Direct K-Net — routes the customer to the K-Net payment portal
"2"Direct Credit Card — routes the customer to the credit card entry form
Credit Card direct integration requires the credit card permission to be enabled on your Payzah account. If it is not enabled, the API returns error code 10015. Contact Payzah support to enable this feature.

Request Parameters

trackid
string
required
Your unique identifier for this transaction. Alphanumeric only — no special characters. Maximum 255 characters. You will use this value later to check the payment status.
amount
string
required
The transaction amount as a plain decimal number (e.g. "11.250"). Do not include currency symbols, commas, or any other formatting characters. Maximum 10 characters.
currency
string
required
The ISO 4217 numeric currency code (e.g. "414" for Kuwaiti Dinar). Maximum 3 characters.
success_url
string
required
The URL Payzah redirects the customer to after a successful payment. Maximum 255 characters.
error_url
string
required
The URL Payzah redirects the customer to if the payment fails or is cancelled. Maximum 255 characters.
payment_type
string
required
The payment method to use directly:
  • "1" — K-Net
  • "2" — Credit Card
language
string
The language displayed on the payment page. Accepted values: "ENG" (English) or "ARA" (Arabic). Maximum 3 characters. Defaults to "ENG" when omitted.
kfast_id
number
K-Net faster checkout customer ID, if your customer is enrolled in K-Net’s fast-checkout program. Applicable when payment_type is "1". Maximum 8 characters.
customer_name
string
Customer’s full name, used for internal tracking and reconciliation. Maximum 255 characters.
customer_phone
string
Customer’s phone number, used for tracking. Maximum 255 characters.
customer_email
string
Customer’s email address, used for tracking. Maximum 255 characters.
udf1
string
User-defined field 1. Store any custom data you need alongside this transaction. No special characters. Maximum 255 characters.
udf2
string
User-defined field 2. No special characters. Maximum 255 characters.
udf3
string
User-defined field 3. No special characters. Maximum 255 characters.
udf4
string
User-defined field 4. No special characters. Maximum 255 characters.
udf5
string
User-defined field 5. No special characters. Maximum 255 characters.

Multivendor / Deep-Linking Fields

If your platform settles payments across multiple sub-merchants, include the fields below to specify delivery costs and commission rules. These fields are optional for standard single-vendor integrations.

Sample Requests

cURL
curl --request POST \
  --url https://development.payzah.net/ws/paymentgateway/index \
  --header 'Content-Type: application/json' \
  --header "Authorization: $(echo -n 'your_private_key_here' | base64)" \
  --data '{
    "trackid": "ORDER-3001",
    "amount": "5.500",
    "currency": "414",
    "success_url": "https://yourstore.com/success",
    "error_url": "https://yourstore.com/error",
    "payment_type": "1",
    "language": "ENG",
    "customer_name": "Fatima Al-Sabah",
    "customer_email": "[email protected]"
  }'
Request Body
{
  "trackid": "ORDER-3001",
  "amount": "5.500",
  "currency": "414",
  "success_url": "https://yourstore.com/success",
  "error_url": "https://yourstore.com/error",
  "payment_type": "1",
  "language": "ENG",
  "customer_name": "Fatima Al-Sabah",
  "customer_email": "[email protected]"
}

Response Fields

Success Response

status
boolean
true when the payment session was created successfully.
data
object
Contains the URLs and identifiers needed to complete the payment flow.

Error Response

status
boolean
false when the request failed.
message
string
A human-readable description of the error.
code
string
A numeric error code. See the Response Codes reference for the full list.

Sample Responses

Success
{
  "status": true,
  "data": {
    "PaymentUrl": "https://development.payzah.net/pgaction",
    "PaymentID": "2019070115360420",
    "transit_url": "",
    "direct_url": "https://development.payzah.net/pgaction?PaymentID=202409271806248183"
  }
}
Error
{
  "status": false,
  "message": "Invalid token passed. Please contact administrator",
  "code": "10014"
}
After a successful response, redirect your customer to the direct_url immediately. This URL is session-specific and expires — do not cache it or delay the redirect. Payzah will redirect the customer to your success_url or error_url once the payment is complete or if it fails.