Webhook payment
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"
}
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.
The currency code of payment event.
More details https://en.wikipedia.org/wiki/ISO_4217
3 letters code.
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"
},
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.
Could be "success", "pending", "failed", "canceled", "error", and "cod". See payment transaction states.
It can be used to perform subsequent operations, like retrieve, acknowledge, refund, capture, and cancelation.
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.
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.
Last modified 2mo ago