Cancel an abandoned order

Cancelling an abandoned order can be useful if you wish to directly control how orders that are abandoned, either by you or your payer, are reported back to you in the gateway portal or reports. In such cases, you may choose to cancel (and close) an outstanding order instead of simply leaving the abandoned order open.

📘

You can only cancel orders before payment information is provided.

In cases where the payer has already provided their payment information, you should use the Reversing an authorized payment function to cancel the authorization and close the order, or the Refund a Capture function if the payment has already been sent for settlement.

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

Headers:

HeaderKey
AuthorizationBearer [access_token]
Content-Typeapplication/vnd.ni-payment.v2+json
Acceptapplication/vnd.ni-payment.v2+json

📘

No request body required

Please note that, for order cancellation requests, no request body is required.

Example Response (body):

{
    "_id": "urn:order:37958965-8638-4f0d-b1b3-5f058fcfbc6d",
    "_links": {
        "self": {
            "href": "https://api-gateway.sandbox.ngenius-payments.com/transactions/outlets/670bfc06-63d6-472b-af75-ad0207ac44f5/orders/37958965-8638-4f0d-b1b3-5f058fcfbc6d"
        },
        "tenant-brand": {
            "href": "http://config-service/config/outlets/670bfc06-63d6-472b-af75-ad0207ac44f5/configs/tenant-brand"
        },
        "merchant-brand": {
            "href": "http://config-service/config/outlets/670bfc06-63d6-472b-af75-ad0207ac44f5/configs/merchant-brand"
        }
    },
    "type": "SINGLE",
    "merchantDefinedData": {},
    "action": "AUTH",
    "amount": {
        "currencyCode": "AED",
        "value": 7654321
    },
    "language": "en",
    "merchantAttributes": {},
    "reference": "37958965-8638-4f0d-b1b3-5f058fcfbc6d",
    "outletId": "670bfc06-63d6-472b-af75-ad0207ac44f5",
    "createDateTime": "2025-04-25T11:55:31.301937298Z",
    "paymentMethods": {
        "card": [
            "MASTERCARD",
            "VISA"
        ],
        "wallet": [
            "SAMSUNG_PAY"
        ]
    },
    "referrer": "urn:Ecom:37958965-8638-4f0d-b1b3-5f058fcfbc6d",
    "merchantDetails": {
        "reference": "84f95da6-1898-4799-bd36-25df22207e13",
        "name": "Squeaky Chair Productions",
        "companyUrl": "https://network.ae",
        "email": "[email protected]",
        "mobile": ""
    },
    "isSplitPayment": false,
    "formattedOrderSummary": {},
    "formattedAmount": "د.إ.‏ 76,543.21",
    "formattedOriginalAmount": "",
    "_embedded": {
        "payment": [
            {
                "_id": "urn:payment:dcd5fdd2-6e63-46c1-abe0-e1e929051bb6",
                "reference": "dcd5fdd2-6e63-46c1-abe0-e1e929051bb6",
                "state": "CANCELLED",
                "amount": {
                    "currencyCode": "AED",
                    "value": 7654321
                },
                "updateDateTime": "2025-04-25T11:55:31.301937298Z",
                "outletId": "670bfc06-63d6-472b-af75-ad0207ac44f5",
                "orderReference": "37958965-8638-4f0d-b1b3-5f058fcfbc6d"
            }
        ]
    }
}

Check your order history. You'll see a " Closed" message next to the Cancelled Order. Please see the screenshot below.

Cancelled Order

Cancelled Order