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
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
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.
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.string
required
The ISO 4217 numeric currency code (e.g.
"414" for Kuwaiti Dinar). Maximum 3 characters.string
required
The URL Payzah redirects the customer to after a successful payment. Maximum 255 characters.
string
required
The URL Payzah redirects the customer to if the payment fails or is cancelled. Maximum 255 characters.
string
required
The payment method to use directly:
"1"— K-Net"2"— Credit Card
string
The language displayed on the payment page. Accepted values:
"ENG" (English) or "ARA" (Arabic). Maximum 3 characters. Defaults to "ENG" when omitted.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.string
Customer’s full name, used for internal tracking and reconciliation. Maximum 255 characters.
string
Customer’s phone number, used for tracking. Optional — you may omit the field entirely or send an empty value.If you do send a value, it must satisfy all of the following, or the request will be rejected:
Valid:
96512345678, 12345678Invalid: +96512345678, 965-1234-5678, 0965123456, 1234567string
Customer’s email address, used for tracking. Maximum 255 characters.
string
User-defined field 1. Store any custom data you need alongside this transaction. No special characters. Maximum 255 characters.
string
User-defined field 2. No special characters. Maximum 255 characters.
string
User-defined field 3. No special characters. Maximum 255 characters.
string
User-defined field 4. No special characters. Maximum 255 characters.
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
- K-Net (payment_type=1)
- Credit Card (payment_type=2)
cURL
Request Body
Response Fields
Success Response
boolean
true when the payment session was created successfully.object
Contains the URLs and identifiers needed to complete the payment flow.
Error Response
boolean
false when the request failed.string
A human-readable description of the error.
string
A numeric error code. See the Response Codes reference for the full list.
Sample Responses
Success
Error
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.
