Create payment session
Creates a payment session. The response contains a sessionUrl that is used to redirect the customer to the payment page — you can use it as the src attribute in a link or iframe.
Request
- Base URL: https://test-api.kashier.io
- URL: https://test-api.kashier.io/v3/payment/sessions
- Auth: API key in header Authorization and API key in header api-key
Request body
When the payment session expires. Must be a future ISO 8601 timestamp.
Maximum number of payment attempts.
Payment type, e.g. credit.
Order amount, e.g., 100.
Order currency, e.g., EGP.
Unique order identifier. (The docs' body table names this field orderId, but request and response examples use order.)
Merchant account number or merchant ID, e.g., MID-123-123.
Mode of operation, test or live, e.g., mode="test". (Documented in the body table but not present in the docs' request example.)
Order description; must be less than 120 characters.
Defines allowed payment methods. Default: card, bank_installments, wallet, bnpl. If you want to display only a specific provider (for example, Valu or QNB), you can do so by specifying it within array brackets alongside its payment method. For example: bnpl[valu], bank_installments[qnb], and so on.
To determine which method you want PaymentUI to open on. By default PaymentUI opens on card method. defaultMethod accepts the pattern "method,provider/abbreviation". Example: for the installment method use bank_installments; to open PaymentUI on certain installment plans of NBE bank use bank_installments,NBE.
merchantRedirect should be URI encoded: urlencode(https://www.your_website.com/redirect)
Pass an endpoint to receive server-to-server notifications. Your application only needs a page that accepts unauthenticated POST requests; the event object is sent as JSON in the request body.
The redirection method after payment. Default method is get, ex: redirectMethod="post"
To choose to redirect after first payment failure or not. Its value is TRUE or FALSE; default value is TRUE.
Used in case of making payments on behalf of your Connected Account by passing the Sub Merchant/Connected Account Merchant Id, e.g. connectedAccount="MID-452-644".
Defines the type of Kashier origin. Default: external.
Specifies branding color using a hex or rgba value. Default: rgba(45, 164, 78, 0.9).
Specifies the display language of the I-frame. Options: ar or en.
Background color of the payment iframe, e.g. #FFFFFF.
TRUE: Authorize first, then capture/release. FALSE: Direct capture without authorization.
Defines if card information is saved. Options: optional or forced.
Whether to retrieve the customer's saved cards on the payment page.
Must be MOTO or ECOMMERCE when using a token or saving a card for repeat payments.
TRUE: Enables 3DS for saved card payments. FALSE: Disables 3DS.
Add any additional information about this payment. This could include special instructions, or context for the recipient.
Response
Payment session created. sessionUrl redirects the customer to the payment page.
Where a payment session currently is. A session starts CREATED, becomes OPENED when the customer lands on the payment page, PENDING while an attempt is in flight, and then settles into one of the final states. ABANDONED is what Abandon a payment session sets; EXPIRED is what the session reaches on its own at expireAt.
The payment parameters the session was created with (echoed back, plus hash/store info).
The URL that will be used to redirect the customer to the payment page. You can use it as the src attribute in a link or iframe.
Changes
No recorded changes to this operation across all 1 revision of this API.