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
Field | Type | Description |
---|---|---|
status | String | Status of the payment (confirmation_required -captured -refund_initiated -processing -failed -refunded ) |
id | String | Mamo Charge ID |
amount | Number | Amount |
amount_currency | String | Currency |
refund_amount | Number | Refund Amount (for a refund charge) |
refund_status | String | Refund Status (for a refund charge) |
custom_data | Dictionary | Custom Data sent upon creation |
created_date | String (Format: YYYY-MM-DD-HH-MM-SS) | Charge creation time |
subscription_id | String | Subscription ID (in case of a subscription payment) |
settlement_amount | String | Settlement Amount |
settlement_currency | String | Settlement Currency |
settlement_date | String (Format: YYYY-MM-DD) | Settlement Date |
customer_details | Dictionary | Customer Details (name -email -phone_number -comment ) |
external_id | String | External ID if sent |
payment_method | String | Payment Method (card_id -type -card_holder_name -card_last4 -origin ) |
settlement_fee | String | Settlement Fee |
settlement_vat | String | Settlement VAT |
payment_link_id | String | ID of payment link used |
payment_link_url | String | Payment Link Used |
error_code | String | Error Code (In case of failure) |
error_message | String | Error Message (In case of failure) |
next_payment_date | String | Next Payment Date (In case of failure) |
event_type | String | Corresponding Webhook Event |