TransactionCreated
v1.0.0

Fired when a transaction has been successfully created on Payment Service This event comes after firing CreateTransaction Event

Properties

id* :

The ID of the created transaction.

type* :

Type of the transaction. Value can be one of below.

- CREDIT
- DEBIT

source* :

Source of the transaction. Value can be one of below.

- PAYMENT
- REFUND
- MANUAL_ADDITION
- MANUAL_DEDUCTION

action* :

The action or the reason for this transaction, for exampele:

- CREATE_SUBSCRIPTION
- PURCHASE_ADD_ONS
- COMPLEMENTARY_CARD
- CX_GIFTS

amount* :

Amount collected for the transaction.

vat* :

Vat collected for the transaction.

userId* :

The ID of the subscriber who has done the payment.

brand* :

Brand used in the transaction. Value can be one of below.

- CALO
- MEALO

currency* :

Currency used in the transaction. Value can be one of below.

- BHD
- SAR
- AED
- KWD
- QAR
- OMR

paymentMethod* :

Payment method used. Value can be one of the below.

- cash
- cc
- benefit
- mada
- applePay
- knet

notes* :

Any extra details related the transaction.

uniqueReferenceId* :

A unique string to reference the Transaction. This can be a Invoice ID, Subscription ID, Subscription type, User action or similar. This value is generated and passed from the service/user that has initiated the transaction, that can be later used to reconcile the tranasction with your internal systems.

updatePaymentBalance* :

A boolean that indicates whether this transaction affects the user's balance or not

metadata* :

Set of key-value pairs that can be set by initiator service/user. This can be useful for storing additional information about the object in a structured format.

actor* :

The person who inititaed this transaction

createdAt* :

The date when the transaction has been created.

flowchart LR l-Payment_Service[Payment Service]:::producer-->TransactionCreated[TransactionCreated]:::event classDef event stroke:#4aaabe,stroke-width: 4px; classDef producer stroke:#75d7b6,stroke-width: 2px; classDef consumer stroke:#818cf8,stroke-width: 2px; TransactionCreated[TransactionCreated]:::event-->r-unknown[unknown]:::consumer click l-Payment_Service href "/services/Payment Service" "Go to Payment Service" _self click r-unknown href "/services/unknown" "Go to unknown" _self click TransactionCreated href "/events/TransactionCreated" "Go to TransactionCreated" _self
TransactionCreated Schema (yml)
openapi: 3.0.0
info:
  version: "1.0.0"
  title: TransactionCreated
paths: {}
components:
  schemas:
    TransactionCreated:
      type: object
      required:
        - metadata
        - data
      properties:
        data:
          "$ref": "#/components/schemas/Data"
        metadata:
          "$ref": "#/components/schemas/Metadata"
    Data:
      type: object
      required:
        - id
        - type
        - source
        - action
        - userBalance
        - amount
        - vat
        - userId
        - name
        - email
        - phoneNumber
        - kitchen
        - brand
        - currency
        - paymentMethod
        - invoiceId
        - uniqueReferenceId
        - updatePaymentBalance
        - actor
        - createdAt
      properties:
        id:
          type: string
        type:
          type: string
        source:
          type: string
        action:
          type: string
        userBalance:
          type: number
        amount:
          type: number
        vat:
          type: number
        userId:
          type: string
        name:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        kitchen:
          type: string
        brand:
          type: string
        currency:
          type: string
        paymentMethod:
          type: string
        invoiceId:
          type: string
        referenceInvoiceId:
          type: string
        paymentProvider:
          type: string
        uniqueReferenceId:
          type: string
        updatePaymentBalance:
          type: boolean
        notes:
          type: string
        metadata:
          type: object
        actor:
          type: string
        createdAt:
          type: string
    Metadata:
      type: object
      required:
        - serviceFunction
        - version
      properties:
        serviceFunction:
          type: string
        version:
          type: string
Edit this pageLast updated on 2024/4/2