You can expect the below object when you register a webhook for the following events:

  • charge.failed
  • charge.succeeded
  • charge.refund_initiated
  • charge.refunded
  • charge.refund_failed
  • charge.card_verified

Raw sample

{
  "status": "captured",
  "id": "MPB-CHRG-D65B203ABD",
  "amount": 33.99,
  "amount_currency": "AED",
  "refund_amount": 0,
  "refund_status": "No refund",
  "custom_data": {},
  "created_date": "2023-12-25-14-38-53",
  "subscription_id": null,
  "settlement_amount": "31.99",
  "settlement_currency": "AED",
  "settlement_date": "2024-01-01",
  "customer_details": {
    "name": "",
    "email": "[email protected]",
    "phone_number": "-",
    "comment": "-"
  },
  "payment_method": {
    "card_id": null,
    "type": "CREDIT VISA",
    "card_holder_name": "John Doe",
    "card_last4": "1111",
    "origin": "International card"
  },
  "settlement_fee": "AED 1.90",
  "settlement_vat": "AED 0.10",
  "payment_link_id": "MB-LINK-1EC52247EE",
  "payment_link_url": "https://staging.business.mamopay.com/pay/mamosandbox-8acfdf",
  "external_id": null,
  "error_code": null,
  "error_message": null,
  "next_payment_date": null,
  "event_type": "charge.succeeded"
}

Field Descriptions

FieldTypeDescription
statusStringStatus of the payment (confirmation_required-captured-refund_initiated-processing-failed-refunded)
idStringMamo Charge ID
amountNumberAmount
amount_currencyStringCurrency
refund_amountNumberRefund Amount (for a refund charge)
refund_statusStringRefund Status (for a refund charge)
custom_dataDictionaryCustom Data sent upon creation
created_dateString (Format: YYYY-MM-DD-HH-MM-SS)Charge creation time
subscription_idStringSubscription ID (in case of a subscription payment)
settlement_amountStringSettlement Amount
settlement_currencyStringSettlement Currency
settlement_dateString (Format: YYYY-MM-DD)Settlement Date
customer_detailsDictionaryCustomer Details (name-email-phone_number-comment)
external_idStringExternal ID if sent
payment_methodStringPayment Method (card_id-type-card_holder_name-card_last4-origin)
settlement_feeStringSettlement Fee
settlement_vatStringSettlement VAT
payment_link_idStringID of payment link used
payment_link_urlStringPayment Link Used
error_codeStringError Code (In case of failure)
error_messageStringError Message (In case of failure)
next_payment_dateStringNext Payment Date (In case of failure)
event_typeStringCorresponding Webhook Event