Operation Notification

This webhook is a valuable feature offered by Ottu that enables merchants to stay up-to-date with transactional activity. With this feature, Ottu can trigger a call to a designated webhook URL whenever a specific operation such as capture, refund, void, or cancel is performed, providing real-time transactional data. By receiving the relevant information, merchants can promptly respond to events and ensure the accuracy of their records.

Note that Operation Notifications configuration can be checked at Webhooks configuration document. This documentation provides information on how to set up and configure the webhook URL for receiving the notifications, as well as how to manage and troubleshoot any issues that may arise during the configuration process.

{
   "amount":"14.00",
   "initiator":{
      "email":"initiator@example.com",
      "id":83,
      "username":"initiator"
   },
   "is_sandbox":false,
   "operation":null,
   "pg_code":"mpgs-ksa",
   "pg_response":{
      "It will contain the raw pg response sent by the pg to Ottu."
   },
   "reference_number":"stageDV37C",
   "result":"success",
   "source":"input",
   "success":true,
   "timestamp_utc":"2022-09-07 06:21:46",
   "txn":{
      "amount":"14.00",
      "currency_code":"SAR",
      "customer_email":"customer@example.com",
      "extra":{
         "flight-number":"1234",
         "full_name":"customer"
      },
      "order_no":"",
      "reference_number":"LEQCJ",
      "state":"voided"
      }
}

amount string

The merchant should always check if the amount he received from Ottu is the amount of the order, to avoid user changing the cart amount in between

initiator dict

Payment operation creator details, it will be populated only if the operation was triggered from the dashboard or using API with Basic Authentication and not API-Key Authentication.

If true, sandbox environment used for this PG settings.

Choice from "purchase","authorize". Depending on how the PG is being selected.

pg_code string

It is being generated according to user payment gateway code choice from pg_codes list

It will contain the raw payment gateway response sent by the payment gateway to Ottu.

It is a unique identifier, assigned by Ottu to any parent payment transaction.

result string

Since it states if the operation was success or not, and webhook operations are not triggered if the operation has failed, so It is a Fixed value: success.

source string

can be input or pg: Input means it was triggered by Ottu side via API or dashboard. PG means it was triggered by bank PG dashboard and Ottu was informed via webhook. Note: Not all PGs are informing Ottu when operations are happening on their side, so Ottu might not be aware of all operations on all PGs, only on those which are offering webhook feature.

timestamp_utc format YYYY-MM-DD / HH:MM:SS

Time and date of operation creation.

txn dict

A dictionary will be generated including a short summary of the child payment transaction which was created

1️ amount string

Requested amount of the payment operation

2️ currency_code string

The currency code of the payment operation. More details https://en.wikipedia.org/wiki/ISO_4217 3 letters code

3️ customer_email string

Email address of the customer.

4️ extra dict

The extra information for the payment details, which the merchant has sent it in key value form. For example:

"flight-number": "1234",
"full_name": "customer

5️ order_no string

Merchant unique identifier for the transaction. ABC123_1, ABC123_2, Max length: 128.

It is a unique identifier, assigned by Ottu to any child payment transaction , namely the payment attempt.

7️ state string

Payment operation state.