# Payment Notification

Payment webhooks are specific to payment events and are triggered on multiple occasions:

1. #### Post-Payment Completion

   Once a payer has completed the payment process and awaits redirection. To get notified for this event, the [webhook\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#webhook_url-string-optional) must either be sent via the [Checkout API ](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/checkout-api)when the payment transaction is created or set as the default [webhook\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/configuration#webhook-configuration) in the Ottu dashboard to apply for all transactions.
2. #### Automatic Inquiry by Ottu

   If a payment transaction has an associated [webhook\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#webhook_url-string-optional), it can be notified during the automatic inquiry process. This can happen immediately after the payer completes the payment process or later if the payment encounters an error. More details about the timings for automatic inquiry can be found [here](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/payment-status-inquiry#automatic-inquiry).
3. #### Manual Inquiry by Staff

   When a staff member initiates a manual inquiry from the Ottu dashboard.
4. #### Manual Notification by Staff

   When a staff manually triggers a notification to the [webhook\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#webhook_url-string-optional) from the Ottu dashboard.
5. #### Merchant-Initiated Inquiry

   When an [inquiry API](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/payment-status-inquiry#b-pbl-v2-inquiry) call is initiated by the merchant. Optionally, a notification can be sent to the [webhook\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#webhook_url-string-optional) associated with the payment transaction or to a new one specified during the inquiry API call.

## [**Setup**](#setup)

1. **Configuring URLs**:

* **Via Checkout API:** Provide the [webhook\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#webhook_url-string-optional) and an optional [redirect\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#redirect_url-string-optional) when calling the [Checkout API](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/checkout-api).
* **Using Plugin Config:** Set the `webhook_url` and `redirect_url` globally via the plugin config, applicable to either [E-Commerce](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/plugins#e-commerce) or [Payment reques](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/plugins#payment-request)t plugins. Even if these values are set globally, they can be overridden for specific transactions when using the `Checkout API`. For more details on this configuration, click [here](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/configuration/webhooks-configuration#webhook-plugin-configs).

2. **Endpoint Requirements:** \
   Ensure your endpoint adheres to all the stipulations outlined in the Webhook Overview. To review the requirements, click [here](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/webhooks/..#endpoint-requirements).
3. **Redirecting the Payer:**

* **Successful Redirect:** If you aim for the payer to be redirected back to your website post-payment, your endpoint should return an HTTP status of 200. Any other status will keep the payer on the Ottu payment details page.
* **Retaining on Ottu Page:** If you intentionally want the payer to remain on the Ottu page post-payment, return a status code of 201. Ottu will interpret this as a successful notification, and the payer won’t be redirected. Any other status will be deemed as a failed notification by Ottu.
* **Specific Redirects:** If you have a particular URL to which you wish to redirect the payer after the payment process, ensure you specify the [redirect\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#redirect_url-string-optional) during the payment setup. Ottu will use this URL to navigate the payer back to your platform or any designated page post-payment.

## [Parameters](#parameters)

#### [agreement](#agreement-object-conditional) *<mark style="color:blue;">`object`</mark>* *<mark style="color:blue;">`conditional`</mark>*

A pre-established contractual agreement with the customer making the payment, allowing the merchant to securely retain and later use their payment details for particular purposes. This might include agreements like regular payments for services such as mobile subscriptions, payments in installments for purchases, arrangements for one-time charges like account reloads, or adhering to common industry practices such as penalty fees for missed appointments

**Presence Condition:**

* The merchant should include it when creating the payment transaction, typically provided during the [first payment](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/auto-debit#first-payment) setup within the [auto-debit](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/auto-debit) initiation process.\
  It becomes a mandatory requirement when the [payment\_type](#payment_type-string-mandatory) is specified as "`auto_debit`".

<details>

<summary>agreement child parameters</summary>

#### [id](https://app.gitbook.com/o/QvpaILbKwb9WBfHGe5bZ/s/iUKrMb9zLt5ZzGPUYDsK/~/changes/527/developer/webhooks/payment-webhooks#id-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

A unique identifier for the agreement

#### [amount\_variability](https://app.gitbook.com/o/QvpaILbKwb9WBfHGe5bZ/s/iUKrMb9zLt5ZzGPUYDsK/~/changes/527/developer/webhooks/payment-webhooks#amount_variability-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

Presents if the payment amount can vary with each transaction.

#### [start\_date](https://app.gitbook.com/o/QvpaILbKwb9WBfHGe5bZ/s/iUKrMb9zLt5ZzGPUYDsK/~/changes/527/developer/webhooks/payment-webhooks#start_date-date-conditional) *<mark style="color:blue;">`date`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

&#x20;Agreement starting date.

#### [expiry\_date](https://app.gitbook.com/o/QvpaILbKwb9WBfHGe5bZ/s/iUKrMb9zLt5ZzGPUYDsK/~/changes/527/developer/webhooks/payment-webhooks#expiry_date-date-conditional) *<mark style="color:blue;">`date`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

The final date until which the agreement remains valid.

#### [max\_amount\_per\_cycle](https://app.gitbook.com/o/QvpaILbKwb9WBfHGe5bZ/s/iUKrMb9zLt5ZzGPUYDsK/~/changes/527/developer/webhooks/payment-webhooks#max_amount_per_cycle-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

The maximum debit amount for one billing cycle.

#### [cycle\_interval\_days](https://app.gitbook.com/o/QvpaILbKwb9WBfHGe5bZ/s/iUKrMb9zLt5ZzGPUYDsK/~/changes/527/developer/webhooks/payment-webhooks#cycle_interval_days-integer-conditional) *<mark style="color:blue;">`integer`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

The number of days between each recurring payment.

#### [total\_cycles](https://app.gitbook.com/o/QvpaILbKwb9WBfHGe5bZ/s/iUKrMb9zLt5ZzGPUYDsK/~/changes/527/developer/webhooks/payment-webhooks#total_cycles-integer-conditional) *<mark style="color:blue;">`integer`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

The total number of payment cycles within the agreement duration.

#### [frequency](https://app.gitbook.com/o/QvpaILbKwb9WBfHGe5bZ/s/iUKrMb9zLt5ZzGPUYDsK/~/changes/527/developer/webhooks/payment-webhooks#frequency-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

Represents how often the payment is to be processed.

#### [type](https://app.gitbook.com/o/QvpaILbKwb9WBfHGe5bZ/s/iUKrMb9zLt5ZzGPUYDsK/~/changes/527/developer/webhooks/payment-webhooks#type-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

This is event-driven, with "`recurring`" as an example.

#### [seller](https://app.gitbook.com/o/QvpaILbKwb9WBfHGe5bZ/s/iUKrMb9zLt5ZzGPUYDsK/~/changes/527/developer/webhooks/payment-webhooks#seller-object-conditional) *<mark style="color:blue;">`object`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

Seller information data including:&#x20;

* `"name": "string",`&#x20;
* `"short_name": "string",`
* `"category_code": "string"`

#### [extra\_params](https://app.gitbook.com/o/QvpaILbKwb9WBfHGe5bZ/s/iUKrMb9zLt5ZzGPUYDsK/~/changes/527/developer/webhooks/payment-webhooks#extra_params-object-conditional) *<mark style="color:blue;">`object`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

&#x20;Provides additional information for payment processing. \
It includes the parameter "`payment_processing_day`" which provide information about the day of the month or a specific date when payment processing should occur, offering more control over the timing of payments.

</details>

{% hint style="info" %}
In certain agreement types, the condition state becomes a required element. For further details on which parameters are mandatory for recurring agreements, please refer [here](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/auto-debit#importance-for-merchants).
{% endhint %}

#### [amount](#amount-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

Denotes the total sum of the payment transaction, which encompasses the cost of the procured items or services, excluding any supplementary fees or charges. See [amount](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#amount-string-required)

{% hint style="info" %}
The merchant should always check if the received amount from Ottu side is the amount of the order, to avoid user changing the cart amount in between.
{% endhint %}

#### [amount\_details](#amount_details-object-mandatory) *<mark style="color:blue;">`object`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

Payment transaction due amount details&#x20;

<details>

<summary>amount_details child parameters</summary>

#### [currency\_code](#currency_code-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

The specified currency represents the denomination of the transaction. Nevertheless, it doesn't necessarily mandate payment in this exact currency. Due to potential currency conversions or exchanges, the final charge may be in a different currency. See [currencies](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/currencies).\
3 letters

#### [amount](#amount-string-mandatory-1) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

Represents the total amount of the payment transaction, which includes the cost of the purchased items or services but excludes any additional fees or charges.

#### [total](#total-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

Denotes the comprehensive total of the payment transaction, incorporating both the principal amount and any associated fees. ([amount](#amount-string-mandatory)+[fee](#fee-string-mandatory))

#### [fee](#fee-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

It indicates the sum disbursed by the customer in their chosen currency for the payment. Note, this currency could vary from the currency used for the transaction.

</details>

#### [capture\_delivery\_address](#capture_delivery_address-bool-conditional) *<mark style="color:blue;">`bool`</mark>* *<mark style="color:blue;">`conditional`</mark>*

By enabling this, you will ask for user's address. If enabled, capture delivery coordinates should also be active.

**Presence Condition:**

* The merchant should add it when setting up the payment transaction.

#### [capture\_delivery\_location ](#capture_delivery_location-bool-conditional)*<mark style="color:blue;">`bool`</mark>* *<mark style="color:blue;">`conditional`</mark>*

By enabling this, you will ask for user's delivery location on a map.

**Presence Condition:**

* The merchant should provide it during the creation of the transaction.

#### [card\_acceptance\_criteria](#card_acceptance_criteria-object-conditional) *<mark style="color:blue;">`object`</mark>* *<mark style="color:blue;">`conditional`</mark>*

It outlines the rules for a card's payment eligibility\
See the request parameter [card\_acceptance\_criteria](#card_acceptance_criteria-object-optional) for more information.

**Presence condition:**

* Any child parameter provided with the [card\_acceptance\_criteria](#card_acceptance_criteria-object-optional) object in the request payload will be populated in the response as [card\_acceptance\_criteria](#card_acceptance_criteria-object-optional) child parameter.

<details>

<summary>card_acceptance_criteria  child parameters</summary>

#### [min\_expiry\_time](#min_expiry_time-string-optional) *<mark style="color:blue;">**`string`**</mark>* *<mark style="color:blue;">`optional`</mark>*

Specifies the minimum required validity period, in days, for a card to be eligible for payment. If set to 30 days, for example, cards set to expire within the next month would be declined. This ensures short-lived cards nearing their expiration date are filtered out, reducing chances of payment failures. When implementing, balance merchant's operational needs with customer convenience. Setting it too stringent might increase payment declines, while a lenient approach could risk future payment failures.

Additionally, it defaults to 30 days when the `payment_type` is `auto_debit`. If any other payment type is selected, no default value is set.

</details>

#### [currency\_code](#currency_code-string-mandatory-1) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

The currency code of the payment transaction \
For more details, <https://en.wikipedia.org/wiki/ISO_4217>\
3 letters code

<table><thead><tr><th>Billing address information</th><th data-hidden></th><th data-hidden></th></tr></thead><tbody><tr><td><p>Customer billing address data</p><p><br><strong>Presence Condition:</strong> </p><ul><li>The presence of each parameter is contingent on the provision of any selection of "customer billing address data" parameters during payment transaction creation.</li></ul></td><td></td><td></td></tr><tr><td><h4><a href="#customer_address_city-string-conditional">customer_address_city</a> <em><mark style="color:blue;"><code>string</code></mark></em> <em><mark style="color:blue;background-color:blue;"><code>conditional</code></mark></em></h4><p>The city where the customer is living and registered<br>Max length: 40</p></td><td></td><td></td></tr><tr><td><h4><a href="#customer_address_country-string-conditional">customer_address_country</a> <em><mark style="color:blue;"><code>string</code></mark></em> <em><mark style="color:blue;background-color:blue;"><code>conditional</code></mark></em></h4><p>The country where the customer is living and registered<br>Based on ISO 3166-1 Alpha-2 code<br>Validation will be performed against existing countries<br>Max length: 2</p></td><td></td><td></td></tr><tr><td><h4><a href="#customer_address_line1-string-conditional">customer_address_line1</a> <em><mark style="color:blue;"><code>string</code></mark></em> <em><mark style="color:blue;background-color:blue;"><code>conditional</code></mark></em></h4><p>Customer's street &#x26; house data<br>Max length: 255</p></td><td></td><td></td></tr><tr><td><h4><a href="#customer_address_line2-string-conditional">customer_address_line2</a> <em><mark style="color:blue;"><code>string</code></mark></em> <em><mark style="color:blue;background-color:blue;"><code>conditional</code></mark></em></h4><p>Additional data for accuracy purpose for <a href="#customer_address_line1-string-conditional">line1</a><br>Max length: 255</p></td><td></td><td></td></tr><tr><td><h4> <a href="#customer_address_postal_code-string-conditional">customer_address_postal_code</a> <em><mark style="color:blue;"><code>string</code></mark></em> <em><mark style="color:blue;background-color:blue;"><code>conditional</code></mark></em></h4><p>Postal code.<br>Max length 12 (it may have different length for different countries)</p></td><td></td><td></td></tr><tr><td><h4><a href="#customer_address_state-string-conditional">customer_address_state</a> <em><mark style="color:blue;"><code>string</code></mark></em> <em><mark style="color:blue;background-color:blue;"><code>conditional</code></mark></em></h4><p>State of the customer’s <a href="#customer_address_city-string-conditional">city</a> (sometimes the same as the <a href="#customer_address_city-string-conditional">city</a>)<br>Max length 40</p></td><td></td><td></td></tr></tbody></table>

#### [customer\_email](#customer_email-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;">`conditional`</mark>*

Where to pass the customer’s email address\
Have to be a valid email address\
Max length 128

**Presence Condition:**

* It needs to be included when generating the payment transaction.

#### [**customer\_first\_name**](#customer_first_name-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;">`conditional`</mark>*

For the customer's first name\
Max length 64

**Presence Condition:**

* The merchant should include it while making the payment of the transaction.

#### [**customer\_id**](#customer_id-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;">`conditional`</mark>*&#x20;

Customer ID is created by a merchant, and stored in the merchant database\
Max length 64

**Presence Condition:**

* The merchant should include it during initiating the payment transaction.

#### [**customer\_last\_name**](#customer_last_name-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;">`conditional`</mark>*

For the customer's last name\
Max length 64

**Presence Condition:**

* The merchant should include it while making the payment of the transaction.

#### [**customer\_phone**](#customer_phone-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;">`conditional`</mark>*

Where to pass the customer’s phone number\
Max length 32

**Presence Condition:**

* The merchant should include it when processing the payment for the transaction.

#### [extra](#extra-object-conditional) *<mark style="color:blue;">`object`</mark>* *<mark style="color:blue;">`conditional`</mark>*

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

**Presence Condition:**

* The presence of the element will depend on whether the merchant includes it during transaction creation by adding each element from the plugin field configuration.

For example:

```json
   "extra":{
      "flight-number":"43667",
      "full_name":"abc"
   },
```

#### [fee](#fee-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

It represents a markup amount on the original amount.\
Max length: 24\
Min value: 0.01

**Presence Condition:**

* The merchant should add it in the [currency configuration](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/currencies#currency-configuration) and include it during the transaction creation.

#### [gateway\_account](#gateway_account-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

The [code](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#pg_codes-array-required) of the payment gateway used to proceed the payment\
Max length 16

#### [gateway\_name](#gateway_name-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

The name of the [payment gateway](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-gateway) used to proceed the payment\
Max length 64

#### [gateway\_response](#gateway_response-object-conditional) *<mark style="color:blue;">`object`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

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

**Presence Condition:**

* It will only be present in response to the PG's callback request for the transaction.

#### [initiator](#initiator-object-conditional) *<mark style="color:blue;">`object`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

This object contains information about the user who created the transaction from Ottu side, specifically, the user who generated the payment URL

**Presence Condition:**

* It is present only when [Basic Authentication](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/authentication#basic-authentication) is used, because [API Key Authentication](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/authentication#api-key) is not associated with any user.
* Merchant includes the initiator ID in the payload when creating the transaction.

<details>

<summary>initiator  child parameters</summary>

#### [id](#id-integer-mandatory) *<mark style="color:blue;">`integer`</mark>* *<mark style="color:red;">`mandatory`</mark>*

It represents the unique identifier of the user who performs the operation.

#### [first\_name](#first_name-string-optional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;">`optional`</mark>*

It represents the first name  of the user who performs the operation.\
<= 32 characters

#### [last\_name](#last_name-string-optional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;">`optional`</mark>*

It represents the last name  of the user who performs the operation.\
<= 32 characters

#### [username](#username-string-optional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;">`mandatory`</mark>*

It represents the username of the user who performs the operation.\
Required. 150 characters or fewer. Letters, digits and @/./+/-/\_ only.

#### [email](#email-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;">`mandatory`</mark>*

The email address of the user who performs the operation.\
<= 254 characters

#### [phone](#phone-string-optional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;">`optional`</mark>*

It represents the phone number of the user who performs the operation.\
<= 128 characters

</details>

#### [is\_sandbox](#is_sandbox-bool-conditional) *<mark style="color:blue;">`bool`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

Whether the transaction was carried out in a sandbox environment.

**Presence Conditions:**

* It will only be present when PG's setting configured as sandbox

#### [message](#message-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

A message indicating the cause of a [payment attempt](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-tracking#payment-attempt) failure., which is directly related to the payment attempt itself\
Max length 255.

**Presence Condition:**

* It will only be present if a payment attempt records an error.

#### [order\_no](#order_no-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

It is a specific code that is assigned to a transaction by the merchant.\
By assigning a unique identifier to each transaction, the merchant can easily retrieve and review transaction details in the future, as well as identify any issues or discrepancies that may arise.\
such like : ABC123\_1, ABC123\_2\
Max length 128<br>

**Presence Condition:**

* It will be present only if `order_no` has been provided in the request payload.

#### [paid\_amount](#paid_amount-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

It is the amount that is credited to the merchant's bank account\
Max length: 24\
Min value: 0.01

**Presence Condition:**

* It will only be present if a capture action is being processed on the transaction and the paid amount is recorded.

#### [payment\_type ](#payment_type-string-mandatory)*<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

**Enum:** "`one_off`" , "`auto_debit`"\
Type of payment. Choose `one_off` for payments that occur only once without future commitments. Choose `auto_debit` for payments that are automatically deducted, such as recurring subscriptions, installments, or unscheduled auto-debits. for more information about auto-debit API, please refer to [Auto-Debit API documentation](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/auto-debit).<br>

If `auto_debit` is selected:

1. [agreement](#agreement-object-conditional) and [customer\_id](#customer_id-string-conditional) parameters will also be mandatory.
2. Only `PG codes` supporting [tokenization](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/tokenization) can be selected. As a side effect, the card used for the payment will be associated with the supplied `agreement.id`. This card will be locked, preventing the customer from deleting it from the system until an alternate card is chosen for `auto-debit` payments

#### [pg\_params](#pg_params-object-mandatory) *<mark style="color:blue;">`object`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

Ottu simplifies payment integration by standardizing inconsistent callback payloads from various payment gateways. Since transaction details like IDs, status codes, amounts, and timestamps vary in structure and labeling, merchants face challenges in processing this data reliably. Ottu extracts the essential details from any gateway’s payload and converts them into a unified `pg_params`object, ensuring a consistent format that simplifies transaction management and integration.

Each parameter in `pg_params` represents a specific transaction-related attribute, stored as an object containing:

* **value**: The actual data returned by the payment gateway.
* **verbose\_name\_ar**: The Arabic label for the parameter.
* **verbose\_name\_en**: The English label for the parameter.

<details>

<summary>pg_params  child parameters</summary>

#### [auth\_code ](#auth_code)

Authorization code assigned to the transaction.

#### [card\_details](#card_details)

A single string combining the card’s type, cardholder name, masked number, and expiration date as returned by the payment gateway.

#### [card\_expiry](#card_expiry)

The card’s expiration date in month/year format, as provided by the payment gateway.

#### [card\_number](#card_number)

Masked credit/debit card number used for the payment.

#### [card\_type ](#card_type)

Type of card used (e.g., Visa, MasterCard).

#### [payment\_id](#payment_id)

Unique identifier assigned to the payment by the gateway.

#### [pg\_message](#pg_message)

Message from the payment gateway regarding the transaction status.

#### [post\_date](#post_date)

The date when the transaction was processed or recorded.

#### [ref](#ref)

Reference ID used for transaction identification.

#### [result](#result)

The final transaction status (e.g., Approved, Declined).

#### [track\_id ](#track_id)

A tracking number for monitoring the transaction.

#### [transaction\_id](#transaction_id)

Unique identifier assigned to the transaction for reconciliation.

#### [card\_holder](#card_holder)

The name of the person to whom the card is issued.

#### [cardholder\_email](https://app.gitbook.com/o/zPYVxVRFHGcXaJwu5Lii/s/Tq4lCgHh9X4VXINxI3L9/~/changes/246/developer/webhooks/payment-notification#cardholder_email)

The email address associated with the cardholder.

#### [card\_expiry\_month](#card_expiry_month)

The month in which the payment card expires.

#### [card\_expiry\_year](#card_expiry_year)

The year in which the payment card expires.

#### [full\_card\_expiry](#full_card_expiry)

A combined field representing the card’s expiry month and year, typically formatted as MM/YY.

#### [card\_issuer](#card_issuer)

The financial institution or bank that issued the payment card.

#### [receipt\_no](#receipt_no)

A receipt number issued for the transaction, typically for reference purposes.

#### [transaction\_no](#transaction_no)

Another form of transaction identifier, possibly used for internal reference.

#### [decision](#decision)

The final decision on the transaction, such as approved or rejected.

#### [dcc\_payer\_amount](#dcc_payer_amount)

The amount in the payer’s currency under Dynamic Currency Conversion (DCC).

#### [dcc\_payer\_currency](#dcc_payer_currency)

The currency used by the payer under Dynamic Currency Conversion (DCC).

#### [dcc\_payer\_exchange\_rate](#dcc_payer_exchange_rate)

The exchange rate applied when converting the transaction amount to the payer’s currency under DCC.

#### [rrn](#rrn)

A unique reference number used to identify the transaction for retrieval or inquiries.

**Example:**

```json
"pg_params:{
    "auth_code":{
        "value":"A1B2C3",
        "verbose_name_ar":"رمز التفويض",
        "verbose_name_en":"Auth Code"
    },
    "card_type":{
        "value":"MasterCard",
        "verbose_name_ar":"نوع البطاقة",
        "verbose_name_en":"Card Type"
    },
    "card_expiry": {
        "value": "02/26",
        "verbose_name_ar": "تاريخ انتهاء البطاقة",
        "verbose_name_en": "Card Expiry"
    },
    "card_details": {
        "value": "MasterCard John Doe 4111 **** **** 1234 02/26",
        "verbose_name_ar": "تفاصيل البطاقة",
        "verbose_name_en": "Card Details"
    },
    "card_holder":{
        "value":"John Doe",
        "verbose_name_ar":"اسم حامل البطاقة",
        "verbose_name_en":"Card Holder"
    },
    "cardholder_email":{
        "value":"john.doe@example.com",
        "verbose_name_ar":"البريد الإلكتروني لحامل البطاقة",
        "verbose_name_en":"Cardholder Email"
    },
    "card_expiry_month":{
        "value":"02",
        "verbose_name_ar":"شهر انتهاء البطاقة",
        "verbose_name_en":"Card Expiry Month"
    },
    "card_expiry_year":{
        "value":"2026",
        "verbose_name_ar":"سنة انتهاء البطاقة",
        "verbose_name_en":"Card Expiry Year"
    },
    "full_card_expiry":{
        "value":"02/26",
        "verbose_name_ar":"تاريخ انتهاء البطاقة بالكامل",
        "verbose_name_en":"Full Card Expiry"
    },
    "card_number":{
        "value":"4111 **** **** 1234",
        "verbose_name_ar":"رقم البطاقة",
        "verbose_name_en":"Card Number"
    },
    "card_issuer":{
        "value":"ABC Bank",
        "verbose_name_ar":"جهة إصدار البطاقة",
        "verbose_name_en":"Card Issuer"
    },
    "ref":{
        "value":"REF-123456",
        "verbose_name_ar":"معرف المرجع",
        "verbose_name_en":"Reference ID"
    },
    "result":{
        "value":"Success",
        "verbose_name_ar":"النتيجة",
        "verbose_name_en":"Result"
    },
    "track_id":{
        "value":"TRK-98765",
        "verbose_name_ar":"رقم التتبع",
        "verbose_name_en":"Track ID"
    },
    "post_date":{
        "value":"2025-02-10",
        "verbose_name_ar":"تاريخ المعاملة",
        "verbose_name_en":"Post Date"
    },
    "transaction_id":{
        "value":"TXN-456789",
        "verbose_name_ar":"رقم العملية",
        "verbose_name_en":"Transaction ID"
    },
    "payment_id":{
        "value":"PAY-987654321",
        "verbose_name_ar":"رقم الدفع",
        "verbose_name_en":"Payment ID"
    },
    "pg_message":{
        "value":"Transaction Approved",
        "verbose_name_ar":"رسالة بوابة الدفع",
        "verbose_name_en":"PG Message"
    },
    "receipt_no":{
        "value":"RCPT-20250210-001",
        "verbose_name_ar":"رقم الإيصال",
        "verbose_name_en":"Receipt No"
    },
    "transaction_no":{
        "value":"TXNNO-987654",
        "verbose_name_ar":"رقم المعاملة",
        "verbose_name_en":"Transaction NO"
    },
    "decision":{
        "value":"Approved",
        "verbose_name_ar":"القرار",
        "verbose_name_en":"Decision"
    },
    "dcc_payer_amount":{
        "value":"100.00",
        "verbose_name_ar":"المبلغ بعملة الدافع (DCC)",
        "verbose_name_en":"DCC Payer Amount"
    },
    "dcc_payer_currency":{
        "value":"USD",
        "verbose_name_ar":"عملة الدافع (DCC)",
        "verbose_name_en":"DCC Payer Currency"
    },
    "dcc_payer_exchange_rate":{
        "value":"1.15",
        "verbose_name_ar":"سعر صرف الدافع (DCC)",
        "verbose_name_en":"DCC Payer Exchange Rate"
    },
    "rrn":{
        "value":"RRN-987654321",
        "verbose_name_ar":"رقم استرجاع المرجع",
        "verbose_name_en":"RRN - Retrieval Reference Number"
    }
}
```

</details>

#### [reference\_number](#reference_number-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

It is a unique identifier for the payment attempt, which can be used as a tracking identifier\
Max length 128

#### [refunded\_amount](#refunded_amount-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*&#x20;

The payment amount paid back from the merchant to the customer.\
Max length: 24\
Min value: 0.01

**Presence Condition:**

* It will only be present if a refund action is being processed on the transaction and the refunded amount is recorded.

#### [remaining\_amount](#remaining_amount-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*&#x20;

The amount remaining to be paid in the transaction. ([amount](#amount-string-required) – [settled amount](#settled_amount-string-conditional))\
Max length: 24\
Min value: 0.01

**Presence Condition:**

* It will only be sent if the editable amount option is turned on.

#### [result](#result-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

The result of the [payment transaction attempt](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-tracking/payment-transactions-states#payment-attempt). Possible values: `pending`, `success`, `failed`, `canceled`, `error`, `cod`. Check the [Attempt States](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-tracking/payment-transactions-states#attempt-states) section for more details.

#### [session\_id](#session_id-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

Ottu unique identifier which gets generated when the transaction is created.\
It can be used to perform subsequent operations, like [retrieve, acknowledge, refund, capture, and cancelation](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/operations).\
Max length 128

#### [settled\_amount](#settled_amount-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

**Is the amount with the same currency of the initiating amount,**

* **For editable amount:** It is the amount that the customer enters at the checkout page
* **For on-editable amount:** The settled amount is the same value as the original payment amount

**Presence Condition:**

* It will be present only if the transaction is `paid`, `authorized` or `cod`.

#### [signature](#signature-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

A cryptographic hash used to guarantee data integrity and authenticity during client-server exchanges. This hash ensures that the API payload has not been tampered with, and can only be verified by authorized parties.

#### &#x20;[timestamp\_utc](#timestamp_utc-date-time-mandatory) *<mark style="color:blue;">`date-time`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

It represents the timestamp at which Ottu processed the transaction.While this often corresponds to the payment time,it's important to note that it might not always be the case.Payments can be acknowledged at a later time,so this timestamp might not align precisely with the actual payment time.

#### [state](#state-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

It is one of the [Payment transaction state](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-tracking/payment-transactions-states#parent-states). And could one of the below: \
**created, pending, attempted, authorized, paid, failed, canceled, expired, invalided, or cod.**\
Max length 50

#### [transaction\_log\_id](#transaction_log_id-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

The ID of the transaction log associated with the transaction.\
Max length 32-bit String (2^31 - 1)

**Presence Condition:**

* It will be sent only if the transaction type is BULK as it's a bulk identifier.

#### [token](#token-object-conditional)  *<mark style="color:blue;">`object`</mark>* *<mark style="color:blue;">`conditional`</mark>*

Represents token details.

* **Presence Conditions:**

When user pays with a tokenized card, Ottu will include the token details in the response

<details>

<summary>token child parameters</summary>

#### [brand](#brand-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

The card brand (e.g., Visa, Mastercard) associated with the card. Display this information for customer reference.

#### [auto\_debit\_enabled](#auto_debit_enabled-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

Define if provided card token can be used to initiate auto debit requests.

#### [customer\_id](#customer_id-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

The unique identifier for the customer who owns the card\
Max length: 36

#### [cvv\_required](#cvv_required-bool-mandatory) *<mark style="color:blue;">`bool`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

Specifies if the card requires the submission of a CVV for transactions. A card without CVV requirement can be used for auto-debit or recurring payments

#### [expiry\_month](#expiry_month-string-mandatory) *<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

The card's expiration month. Provide this information for transaction processing and validation.\
Max length: 2

#### [expiry\_year](#expiry_yearstring-mandatory)*<mark style="color:blue;">`string`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

The card's expiration year. Provide this information for transaction processing and validation.\
Max length: 2

#### [is\_expired](#is_expired-bool-mandatory) *<mark style="color:blue;">`bool`</mark>* *<mark style="color:red;background-color:blue;">`mandatory`</mark>*

A boolean field indicating whether the card has expired. Use this information to determine if the card is valid for transactions and to notify the customer if necessary.

</details>

#### [transaction  ](#transaction-array-conditional)*<mark style="color:blue;">`array`</mark>* *<mark style="color:blue;">`conditional`</mark>*

Transactions resulted to the PG operations performed on the parent transaction\
See [child transaction sate](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-tracking#child-table-transaction)

**Presence Conditions:**

* It will be sent only if operations processed on transaction and resulted child transaction records.

<details>

<summary>transaction  child parameters</summary>

#### [amount](#amount-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

The amount of child transaction object represented in transactions Array\
Must be positive\
Max length: 24\
Min value: 0.01

#### [currency\_code](#currency_code-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

The code represents the used currency.\
3 letters

#### [order\_no](#order_no-stringconditional) *<mark style="color:blue;">`string`</mark><mark style="color:blue;background-color:blue;">`conditional`</mark>*

The order\_no of child transaction object represented in transactions Array

#### [session\_id](#session_id-stringconditional) *<mark style="color:blue;">`string`</mark><mark style="color:blue;background-color:blue;">`conditional`</mark>*

The unique session identifier of child transaction object represented in transactions Array

#### [state](#state-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

The state of a child transaction object represented in transactions Array

</details>

#### [voided\_amount](#voided_amount-string-conditional) *<mark style="color:blue;">`string`</mark>* *<mark style="color:blue;background-color:blue;">`conditional`</mark>*

The payment amount resulted by performing [void](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-gateway#available-operations) operation\
Max length: 24\
Min value: 0.01

**Presence Condition:**

* It will only appear if a void action is being performed on the transaction, and the voided amount is documented.

## [**Event Types**](#event-types)

Ottu notifies the [webhook\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#webhook_url-string-optional) for all payment event types, not just success. This includes statuses like `error`, `failed`, `pending`, `rejected`, etc. The payload provides enough context to identify the status of the event.&#x20;

{% hint style="info" %}
&#x20;Events like **Refund**, **Void**, or **Capture** are considered operation events and not payment events. If you’re looking for information on these, please refer to the [Operation Webhook page](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/webhooks/operation-notification).
{% endhint %}

## [Redirectional Diagram](#redirectional-diagram)

To ensure a smooth redirection of the payer back to the designated [redirect\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#redirect_url-string-optional), it is essential that the `redirect_url` is accurately provided during the payment setup. Additionally, the [webhook\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#webhook_url-string-optional) must respond with a status code of 200. This specific status code serves as a confirmation of successful interaction between the involved systems, ultimately guaranteeing the seamless progression of the redirection process as originally intended.

**Redirect behavior based on webhook\_url response:**\
-[ status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status)  200,  the customer will be redirected to [redirect\_url](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#redirect_url-string-optional).\
-[ status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status)  201,  the customer will be redirected to Ottu payment summary page.\
-[ status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status)  any other code, the customer will be redirected to Ottu payment summary page. For this particular case, Ottu can notify on the email, when Enable webhook notifications?  Activated

<figure><img src="https://content.gitbook.com/content/Tq4lCgHh9X4VXINxI3L9/blobs/iPncyR7f6fkzlDupKnFI/chr2%20(1).png" alt=""><figcaption></figcaption></figure>

## [Payload example (paid)](#payload-example-paid)

```json
{
  "amount": "11.000",
  "amount_details": {
    "amount": "11.000",
    "currency_code": "KWD",
    "exchange_rate": "1",
    "fee": 0,
    "total": "11.000"
  },
  "currency_code": "KWD",
  "gateway_account": "blank-kwd",
  "gateway_name": "kpay",
  "gateway_response": {},
  "initiator": {},
  "payment_type": "one_off",
  "pg_params": {
    "auth_code": {
      "value": "-",
      "verbose_name_ar": "رمز التفويض",
      "verbose_name_en": "Auth Code"
    },
    "card_details": {
      "value": "-",
      "verbose_name_ar": "تفاصيل البطاقة",
      "verbose_name_en": "Card Details"
    },
    "card_expiry": {
      "value": "-",
      "verbose_name_ar": "تاريخ انتهاء البطاقة",
      "verbose_name_en": "Card Expiry"
    },
    "card_expiry_month": {
      "value": "-",
      "verbose_name_ar": "شهر انتهاء البطاقة",
      "verbose_name_en": "Card Expiry Month"
    },
    "card_expiry_year": {
      "value": "-",
      "verbose_name_ar": "سنة انتهاء البطاقة",
      "verbose_name_en": "Card Expiry Year"
    },
    "card_holder": {
      "value": "-",
      "verbose_name_ar": "حامل البطاقة",
      "verbose_name_en": "Card Holder"
    },
    "card_issuer": {
      "value": "-",
      "verbose_name_ar": "مُصدر البطاقة",
      "verbose_name_en": "Card Issuer"
    },
    "card_number": {
      "value": "-",
      "verbose_name_ar": "رقم البطاقة",
      "verbose_name_en": "Card Number"
    },
    "card_type": {
      "value": "-",
      "verbose_name_ar": "نوع البطاقة",
      "verbose_name_en": "Card Type"
    },
    "cardholder_email": {
      "value": "-",
      "verbose_name_ar": "بريد حامل البطاقة",
      "verbose_name_en": "Cardholder Email"
    },
    "dcc_payer_amount": {
      "value": "-",
      "verbose_name_ar": "مبلغ الدفع (DCC)",
      "verbose_name_en": "Dcc Payer Amount"
    },
    "dcc_payer_currency": {
      "value": "-",
      "verbose_name_ar": "عملة الدفع (DCC)",
      "verbose_name_en": "Dcc Payer Currency"
    },
    "dcc_payer_exchange_rate": {
      "value": "-",
      "verbose_name_ar": "سعر صرف الدفع (DCC)",
      "verbose_name_en": "Dcc Payer Exchange Rate"
    },
    "decision": {
      "value": "-",
      "verbose_name_ar": "القرار",
      "verbose_name_en": "Decision"
    },
    "full_card_expiry": {
      "value": "-",
      "verbose_name_ar": "تاريخ انتهاء البطاقة الكامل",
      "verbose_name_en": "Full Card Expiry"
    },
    "payment_id": {
      "value": "-",
      "verbose_name_ar": "معرف الدفع",
      "verbose_name_en": "Payment Id"
    },
    "pg_message": {
      "value": "-",
      "verbose_name_ar": "رسالة بوابة الدفع",
      "verbose_name_en": "Pg Message"
    },
    "post_date": {
      "value": "-",
      "verbose_name_ar": "تاريخ المعاملة",
      "verbose_name_en": "Post Date"
    },
    "receipt_no": {
      "value": "-",
      "verbose_name_ar": "رقم الإيصال",
      "verbose_name_en": "Receipt No"
    },
    "ref": {
      "value": "-",
      "verbose_name_ar": "معرّف مرجعي",
      "verbose_name_en": "Ref"
    },
    "result": {
      "value": "-",
      "verbose_name_ar": "النتيجة",
      "verbose_name_en": "Result"
    },
    "rrn": {
      "value": "-",
      "verbose_name_ar": "رقم المرجع RRN",
      "verbose_name_en": "Rrn"
    },
    "track_id": {
      "value": "-",
      "verbose_name_ar": "معرّف التتبع",
      "verbose_name_en": "Track Id"
    },
    "transaction_id": {
      "value": "-",
      "verbose_name_ar": "رقم معاملة الدفع",
      "verbose_name_en": "Transaction Id"
    },
    "transaction_no": {
      "value": "-",
      "verbose_name_ar": "رقم العملية",
      "verbose_name_en": "Transaction No"
    }
  },
  "reference_number": "alpha-6A83R",
  "remaining_amount": "11.000",
  "result": "failed",
  "session_id": "*****",
  "signature": "*****",
  "state": "expired",
  "timestamp_utc": "2025-07-20 15:21:48"
}

```

## [Acknowledging a Payment](#acknowledging-a-payment)

When you receive a payment notification, it’s crucial to understand and acknowledge the payment’s status and details. Here’s how you can interpret the information:

#### **1. Payment Events Types**

There are several types of payment events you might encounter:

* **Payment:** This indicates a direct payment transaction.
* **Authorization:** This signifies a payment authorization, which might be captured later.
* **Cash (Offline):** This represents an offline payment, often referred to as Cash on Delivery (**COD**).

#### **2. Interpreting the** `result` fi**eld**

The [result](#result-string-mandatory) field is your primary indicator of the payment’s outcome:

* If the `result` is `success`, it means the payment was successful.
* If the `result` is `failed`, it indicates an unsuccessful payment attempt.
* For cash payments, the `result` field will be `cod`, indicating Cash on Delivery.

#### **3. Understanding the operation Field**

The operation field provides insight into the type of transaction:

* If the operation is `payment`, it indicates a direct payment.
* If the operation is `authorization`, it signifies a payment that’s been authorized but not yet captured.

#### **4. Verifying the Amount**

* The [amount](#amount-string-mandatory) field provides the value the customer has paid in the currency set during the payment setup.
* However, the actual amount captured by the [Payment Gateway](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-gateway) (PG) might differ. This can be due to additional fees, currency conversion, or other factors. To get the exact amount captured by the PG, refer to [amount\_details.amount](#amount_details-object-mandatory). The currency in which this amount is denominated can be found in [amount\_details.currency\_code](#currency_code-string-mandatory).
* In most scenarios, cross-referencing with the amount field should suffice. But if there are discrepancies or if you’ve set up fees or currency conversions, it’s advisable to verify with `amount_details`.

#### **5. Cash Payments**

For Cash on Delivery transactions, the [result](#result-string-mandatory) field will specifically be `cod`. This helps differentiate offline payments from online ones.

By understanding and interpreting these fields correctly, you can ensure accurate and timely acknowledgment of all your payments, be they online or offline.

**In Conclusion**, As you navigate the intricacies of Ottu’s payment webhooks, it’s paramount to ensure you’re well-acquainted with all the general guidelines. We strongly recommend reviewing our comprehensive [Webhooks page](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/webhooks) for a holistic understanding. Additionally, if you find yourself with questions or uncertainties, our [FAQ](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/webhooks/..#faq) section might already have the answers you seek. We’re committed to ensuring a seamless experience, and your thorough understanding of our systems is a crucial part of that journey.
