Recurring Data Model

Data Model

Overview

The "Recurring Data Model" is a Data model type used in your webhook endpoint. This model provides information about any RecurringStatusChanged event.

Your webhook endpoint will receive a POST request from MyFatooah that contains an EventType parameter with a value of "5". It is used to notify your system of the Recurring status (Active, Uncompleted, Completed, Canceled, Draft). Detailed functionality of how to implement your webhook endpoint is explained in the Webhook section.

Now, we are going to declare the Recurring Data Model properties of your endpoint and its models along with each accepted parameter and possible value.


Request Model

Input ParameterTypeDescription
RecurringIdstring
RecurringStatusstringActive,
Uncompleted,
Completed,
Canceled,
Draft
NextPayDatestring
InvoiceIdnumber
InvoiceReferencestring
CreatedDatestring
TransactionStatusstringSUCCESS
FAILED
ReferenceId string
TrackIdstring
PaymentIdstring
AuthorizationIdstring
InvoiceValueInBaseCurrencystring
BaseCurrencystring

Sample Message

The below sample JSON message is sent by MyFatoorah to your endpoint.

{
   "EventType":5,
   "Event":"RecurringStatusChanged",
   "DateTime":"04032021211615",
   "CountryIsoCode":"KWT",
   "Data":{
      "RecurringId":"RECUR287",
      "RecurringStatus":"Completed",
      "NextPayDate":"2021-04-07T00:00:00",
      "InvoiceId":586170,
      "InvoiceReference":"2021000184",
      "CreatedDate":"04032021211555",
      "TransactionStatus":"SUCCESS",
      "ReferenceId":"106310001097",
      "TrackId":"04-03-2021_477336",
      "PaymentId":"100202106359084366",
      "AuthorizationId":"B68413",
      "InvoiceValueInBaseCurrency":"456.75",
      "BaseCurrency":"KWD"
   }
}

👍

Signature

To generate the signature of this model, you should order only the above parameters alphabetic with its values then encrypt it by the secret key.

The following will be a sample string used in generating the signature.

AuthorizationId=B68413,BaseCurrency=KWD,CreatedDate=04032021211555,InvoiceId=586170,InvoiceReference=2021000184,InvoiceValueInBaseCurrency=456.75,NextPayDate=2021-04-07T00:00:00,PaymentId=100202106359084366,RecurringId=RECUR287,RecurringStatus=Completed,ReferenceId=106310001097,TrackId=04-03-2021_477336,TransactionStatus=SUCCESS