PaymentRefunded
v1.0.0

Fired when a payment has been successfully refunded.

Properties

id* :

The ID of the created refund.

pspRefundId* :

The ID of the created refund from the payment provider.

userId* :

The ID of the subscriber who has got refunded.

name* :

The name of the subscriber who has got refunded.

email* :

The email of the subscriber who has got refunded.

phoneNumber* :

The phone number of the subscriber who has got refunded.

userBalanace* :

Current subscription user balance.

amount* :

Total amount of the refund.

vat* :

Vat value of the total refund.

kitchen* :

Kitchen that the subscriber is subscribed to.

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
- naps
- bnpl

originalPaymentInvoiceId* :

The invoice id for the original transaction.

clientReferenceId* :

The client reference id for the original transaction.

paymentProvider* :

Name of the Payment Service Provider used.

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.

reason* :

Reason of the refund.

notes* :

Any extra notes related the refund.

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 refund.

createdAt* :

The date when the payment provider refunded the payment.

flowchart LR l-Payment_Service[Payment Service]:::producer-->PaymentRefunded[PaymentRefunded]:::event classDef event stroke:#1dd69f,stroke-width: 4px; classDef producer stroke:#75d7b6,stroke-width: 2px; classDef consumer stroke:#818cf8,stroke-width: 2px; PaymentRefunded[PaymentRefunded]:::event-->r-API_Service[API Service]:::consumer click l-Payment_Service href "/services/Payment Service" "Go to Payment Service" _self click r-API_Service href "/services/API Service" "Go to API Service" _self click PaymentRefunded href "/events/PaymentRefunded" "Go to PaymentRefunded" _self
PaymentRefunded Schema (yml)
openapi: 3.0.0
info:
  version: "1.0.0"
  title: PaymentRefunded
paths: {}
components:
  schemas:
    PaymentRefunded:
      type: object
      required:
        - metadata
        - data
      properties:
        data:
          "$ref": "#/components/schemas/Data"
        metadata:
          "$ref": "#/components/schemas/Metadata"
    Data:
      type: object
      required:
        - id
        - pspRefundId
        - userId
        - name
        - email
        - phoneNumber
        - userBalance
        - amount
        - vat
        - kitchen
        - brand
        - currency
        - paymentMethod
        - originalPaymentInvoiceId
        - clientReferenceId
        - paymentProvider
        - uniqueReferenceId
        - reason
        - notes
        - metadata
        - actor
        - createdAt
      properties:
        id:
          type: string
        pspRefundId:
          type: string
        userId:
          type: string
        name:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        userBalance:
          type: number
        amount:
          type: number
        vat:
          type: number
        kitchen:
          type: string
        brand:
          type: string
        currency:
          type: string
        paymentMethod:
          type: string
        originalPaymentInvoiceId:
          type: string
        clientReferenceId:
          type: string
        paymentProvider:
          type: string
        uniqueReferenceId:
          type: string
        reason:
          type: string
        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