Unscheduled payments via API

Unscheduled payments are supported for both Purchase and Auth actions. Once the initial unscheduled transaction is successful, the merchant can initiate subsequent transactions at any time via the order details page on the N-Genius Portal or through the Subsequent Transaction API

HTTP Request Method: POST
Resource (URI): https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/outlets/[your-outlet-reference]/orders

Headers:

Add these headers to your request (note that you should replace 'access_token' with the access token value we received from the Request an access token step).

HeaderValue
AuthorizationBearer access_token
Content-Typeapplication/application/vnd.ni-payment.v2+json
Acceptapplication/application/vnd.ni-payment.v2+json

Body:

Add the following JSON information to the form/body content of your request.

AttributeDescriptionExample
actionPayment processing method'PURCHASE', 'AUTH'
typeType of payment requested'UNSCHEDULED'
emailAddressCustomer email address[email protected]
amountamount data blockN/A
amount.currencyCodeOrder currency'SAR'
amount.valueRecurring amount1000 ( = 10.00 SAR)

Example request (body):

{
    "action":"PURCHASE",
    "type": "UNSCHEDULED",
    "emailAddress": "[email protected]",
    "amount": {
      "currencyCode":"SAR",
      "value":1500
    }
}

Example response (body):

{
  "reference": "3ddf7897-3ace-402f-bdae-0297c631db84",
  "amount": {
    "currencyCode": "SAR",
    "value": 1500
  },
  "action": "PURCHASE",
  "type": "UNSCHEDULED",
  "paymentMethods": {
    "card": [
      "MADA",
      "VISA",
      "MASTERCARD"
    ]
  },
  "_links": {
    "cnp:payment-link": {
      "href": "https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/orders/3ddf7897-3ace-402f-bdae-0297c631db84/payment-link"
    },
    "payment-authorization": {
      "href": "https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/paymentAuthorization"
    },
    "self": {
      "href": "https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/orders/3ddf7897-3ace-402f-bdae-0297c631db84"
    },
    "tenant-brand": {
      "href": "http://config-service/config/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/configs/tenant-brand"
    },
    "payment": {
      "href": "https://paypage.infradev.ksa.ngenius-payments.com/?code=237dc8e90d3cee18"
    },
    "merchant-brand": {
      "href": "http://config-service/config/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/configs/merchant-brand"
    }
  },
  "_embedded": {
    "payment": [
      {
        "_id": "urn:payment:f3815f2b-2a71-4f96-848d-f33daa7f2c8e",
        "_links": {
          "cnp:capture": {
            "href": "https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/orders/3ddf7897-3ace-402f-bdae-0297c631db84/payments/f3815f2b-2a71-4f96-848d-f33daa7f2c8e/captures"
          },
          "self": {
            "href": "https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/orders/3ddf7897-3ace-402f-bdae-0297c631db84/payments/f3815f2b-2a71-4f96-848d-f33daa7f2c8e"
          },
          "payment:card": {
            "href": "https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/orders/3ddf7897-3ace-402f-bdae-0297c631db84/payments/f3815f2b-2a71-4f96-848d-f33daa7f2c8e/card"
          },
          "payment:saved-card": {
            "href": "https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/orders/3ddf7897-3ace-402f-bdae-0297c631db84/payments/f3815f2b-2a71-4f96-848d-f33daa7f2c8e/saved-card"
          },
          "curies": [
            {
              "name": "cnp",
              "href": "http://transaction-service/docs/rels/{rel}",
              "templated": true
            }
          ]
        },
        "reference": "f3815f2b-2a71-4f96-848d-f33daa7f2c8e",
        "state": "STARTED",
        "amount": {
          "currencyCode": "SAR",
          "value": 1500
        },
        "updateDateTime": "2025-06-20T08:56:10.328184942Z",
        "outletId": "63ecfe89-f7b3-4a06-9e12-d218d772020d",
        "orderReference": "3ddf7897-3ace-402f-bdae-0297c631db84"
      }
    ]
  }
}

Response attributes:

AttributeDescriptionExample
referenceOrder reference[UUID]
frequencyThe agreed frequency/interval of the recurring payment'MONTHLY', 'DAILY'
outletIdThe reference of the outlet which accepted the payment[UUID]

However, should you wish to interrogate the order further, you may use the 'orderReference' attribute to query the order in more detail (see Retrieve order status for more information on how to do this).

© Network International LLC. All Rights Reserved.