Resubmission

Resubmission is a merchant-initiated transaction used to retry a transaction when the initial attempt fails due to insufficient funds. Such failures typically return error codes 116 or 51. Once sufficient funds are available, the merchant can trigger a resubmission of the transaction. Resubmission is applicable for Purchase and Auth transaction for Recurring and Installment order type.

HTTP Request Method: POST
Resource (URI): https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/outlets/{{outletId}}/orders/{{orderId}}/payments/{{paymentId}}/purchases/{{purchaseId}}/resubmission

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/vnd.ni-payment.v2+json
Acceptapplication/vnd.ni-payment.v2+json

Example response (body):

{
  "_id": "urn:order:35721023-b5b6-4d9c-8ef9-a3902790827e",
  "_links": {
    "self": {
      "href": "https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/orders/35721023-b5b6-4d9c-8ef9-a3902790827e"
    },
    "tenant-brand": {
      "href": "http://config-service/config/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/configs/tenant-brand"
    },
    "merchant-brand": {
      "href": "http://config-service/config/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/configs/merchant-brand"
    }
  },
  "type": "SINGLE",
  "merchantDefinedData": {},
  "action": "PURCHASE",
  "amount": {
    "currencyCode": "SAR",
    "value": 10000
  },
  "language": "en",
  "merchantAttributes": {
    "cancelUrl": "https://alsuite.local/order/order/list/1/1",
    "redirectUrl": "http://alsuite.local/order/order/46/verify",
    "paymentAttempts": "1",
    "maskPaymentInfo": "false",
    "skip3DS": "true"
  },
  "emailAddress": "[email protected]",
  "reference": "35721023-b5b6-4d9c-8ef9-a3902790827e",
  "outletId": "63ecfe89-f7b3-4a06-9e12-d218d772020d",
  "createDateTime": "2025-06-24T10:14:45.721684560Z",
  "paymentMethods": {
    "card": [
      "VISA",
      "MASTERCARD",
      "MADA"
    ]
  },
  "billingAddress": {
    "firstName": "Roshan",
    "lastName": "N",
    "address1": "Test2",
    "city": "Pune",
    "postalCode": "563123",
    "countryCode": "IN"
  },
  "shippingAddress": {
    "firstName": "Roshan",
    "lastName": "N",
    "address2": "Test2",
    "city": "Pune",
    "postalCode": "563123",
    "countryCode": "IN"
  },
  "referrer": "urn:Ecom:3e1faa76-89d0-4360-9ca4-2d3efd33a00d",
  "merchantDetails": {
    "reference": "0b4dd17c-ec44-4f30-bef0-7890d91da22d",
    "name": "WestZone7812",
    "companyUrl": "",
    "email": "",
    "mobile": ""
  },
  "reauthorizationDetails": {
    "parentOrderId": "3e1faa76-89d0-4360-9ca4-2d3efd33a00d"
  },
  "isSplitPayment": false,
  "isSaudiPaymentEnabled": true,
  "formattedOrderSummary": {},
  "formattedAmount": "SAR 100",
  "formattedOriginalAmount": "",
  "_embedded": {
    "payment": [
      {
        "_id": "urn:payment:fe3b673d-0048-469f-b688-b217c474f57b",
        "_links": {
          "self": {
            "href": "https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/orders/35721023-b5b6-4d9c-8ef9-a3902790827e/payments/fe3b673d-0048-469f-b688-b217c474f57b"
          },
          "cnp:cancel": {
            "href": "https://api-gateway.sandbox.ksa.ngenius-payments.com/transactions/outlets/63ecfe89-f7b3-4a06-9e12-d218d772020d/orders/35721023-b5b6-4d9c-8ef9-a3902790827e/payments/fe3b673d-0048-469f-b688-b217c474f57b/cancel"
          },
          "curies": [
            {
              "name": "cnp",
              "href": "https://api-gateway.sandbox.ksa.ngenius-payments.com/docs/rels/{rel}",
              "templated": true
            }
          ]
        },
        "reference": "fe3b673d-0048-469f-b688-b217c474f57b",
        "paymentMethod": {
          "expiry": "2026-10",
          "cardholderName": "Mustakim",
          "name": "MADA",
          "pan": "483011******5585"
        },
        "savedCard": {
          "maskedPan": "483011******5585",
          "expiry": "2026-10",
          "cardholderName": "Mustakim",
          "scheme": "MADA",
          "cardToken": "ZGE1YTEwMDAtNGIxMi00YzM2LWJkOTUtNDg5YzRjZmRhNTA1",
          "recaptureCsc": true
        },
        "state": "PURCHASED",
        "amount": {
          "currencyCode": "SAR",
          "value": 10000
        },
        "updateDateTime": "2025-06-24T10:14:46.992156501Z",
        "outletId": "63ecfe89-f7b3-4a06-9e12-d218d772020d",
        "orderReference": "35721023-b5b6-4d9c-8ef9-a3902790827e",
        "originIp": "106.213.80.91",
        "purchaseData": {
          "id": "3aa9939c-2c99-42d6-948a-bd209cb3006a",
          "displayVoid": true,
          "displayRefund": false
        },
        "authResponse": {
          "authorizationCode": "123456",
          "success": true,
          "resultCode": "00",
          "resultMessage": "Successful approval/completion or that VIP PIN verification is valid",
          "mid": "202506060001",
          "systemAuditTraceNumber": "000267",
          "rrn": "517510000267"
        },
        "mid": "202506060001"
      }
    ]
  }
}

Response attributes:

AttributeDescriptionExample
referenceOrder reference[UUID]
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).