The Smarter Way
Search…
⌃K

Webhook payment

Overview

Payment events take place when the user tries to pay, then Ottu will trigger a call to the webhook_url to disclose the transactional data on the webhook_url.
{
"amount":"15.00",
"currency_code":"SAR",
"extra":{
"flight-number":"43667",
"full_name":"abc"
},
"gateway_account":"credit-card-test",
"gateway_name":"mpgs",
"gateway_response":{
"It will contain the raw pg response sent by the pg to Ottu"
},
"message":"Unable to redirect to the PG",
"reference_number":"stage45F3C",
"result":"error",
"session_id":"8eea795ead6d7cda7d12414bbae6a396adfe4758",
"signature":"ee4a6bb00a75c7541b67d26ebf60243ca5652ef2b459f57c84d5586040952e9c",
"state":"attempted",
"total_authorized_amount":"0.00",
"total_paid_amount":"0.00",
"total_refunded_amount":"0.00",
"total_voided_amount":"0.00"
}

amount string

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

currency_code string

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

extra dict

The extra information for the payment details, which the merchant has sent it in key value form. For example:
"extra":{
"flight-number":"43667",
"full_name":"abc"
},

gateway_account string

The payment gateway code, which is utilized to proceed the payment.

gateway_name string

The payment gateway, which is utilized to proceed the payment.

gateway_response dict

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

message string

Message sent by PG or set by Ottu to illustrate the status of the payment.
It is unique identifier, assigned by Ottu to any parent payment transaction, namely the payment attempt reference number.

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.

session_id string

It can be used to perform subsequent operations, like retrieve, acknowledge, refund, capture, and cancelation.

signature string

Ottu hash-signature to support the security and trustability, by hashing part of the payload parameters and sending hash-signature with every payload. This allows Ottu to ensure the data has not modified or cut within the payment transition process.

state string

It is one of the Payment transaction state. And could one of the below: created, pending, attempted, authorized, paid, failed, canceled, expired, invalided, or cod.