v1

latestOpenAPI 3.1.02026-07-26270268.6 KB

Create Session

post/payment-intent/api/v2/direct/session

Headers

deviceBrandstring

For instance Apple

deviceModelstring

For instance 14 Pro

deviceTypestring

For instance iPhone

languagestring

For instance en or ar

sdkVersionstring

For instance 1.0.0

OSVersionstring

For instance 18.0

Request body

amountnumber float required

The total amount value of the payment. This parameter is required, and the format is a double - a number with 2 digits after the decimal point. For example 19.99

currencystring required

The currency of the payment. This is a 3-digit alphabetic code, following the ISO 4217 currency code standard. For example: SAR

timestampstring

The timestamp of the moment at which the create session request has been initiated.

merchantReferenceIdstring

The unique identifier for the session given added by the merchant. Must be a valid UUID

signaturestring required

A parameter to ensure the security and authenticity of API communications. It involves generating a signature using the contents of the API request and secret keys, which is then sent along with the request.

paymentIntentIdstring

If you have previously generated a payment intent, you can use this parameter to link your order to the payment intent. This will process a payment for the specified payment intent.

paymentOperation'Pay' | 'PreAuthorize' | 'AuthorizeCapture'

The type of payment operation to be performed. This is an optional parameter - if not submitted, the Geidea gateway will process a 'Pay' operation by default.

cardOnFileboolean

Indicates whether to store the payment method for future use. If you pass 'true' in this field, Geidea will save the card and will return a tokenId in the callback after the order. This tokenId can be used later to process a payment for the same customer using the saved payment method.

language'en' | 'ar'

The language to be used on the checkout page.

callbackUrlstring

The URL where the payment gateway should send the callback after the transaction is completed. It must have a valid SSL certificate and start with 'https://'

subscriptionIdstring

The subscription Id for which the payment is initiated. Must be a valid GUID. Subscription ID (generated from the create subscription API) can be passed in the request to capture the card on file details during the first transaction and later Geidea will auto-debit the customers as per the set frequency and interval based on securely stored token.

returnUrlstring

A URL that can be used to redirect to a different page after the transaction has been completed

initiatedBy'Internet' | 'Merchant'

A value indicating whether the request is started from Customer(Internet) or Merchant.

tokenidstring

Tokenid that can be passed to create session for a CIT token payment or MIT unscheduled payment

hideWalletsstring[]

This parameter hides the device payment, and it should be passed correctly apple-pay / google-pay / samsung-pay

callbackHeaders'{"key":"value"}' json

Response

200

responseMessagestring
detailedResponseMessagestring
languagestring
responseCodestring
detailedResponseCodestring

Example response

{
  "session": {
    "id": "f1a0f785-7601-4d53-8f43-08dc33d8302c",
    "amount": 1850,
    "currency": "EGP",
    "callbackUrl": "https://webhook.site/8ef88a07-b575-40a4-9a27-f2e78edf931e",
    "expiryDate": "2024-03-04T14:28:52.0623131Z",
    "status": "Initiated",
    "merchantId": "4907f9f6-af43-434a-340a-08da8933ece3",
    "merchantPublicKey": "40225a89-be31-4f2e-a10a-27b2bbc4e3b3",
    "language": "en",
    "merchantReferenceId": "10",
    "paymentOperation": "Pay"
  },
  "responseMessage": "Success",
  "detailedResponseMessage": "The operation was successful",
  "language": "EN",
  "responseCode": "000",
  "detailedResponseCode": "000"
}
All 27 operations