You can expect the below object when you register a webhook for the following events:
- payment_link.create
Raw sample
{
"description": "12pcs Chocolate Box",
"capacity": null,
"active": true,
"return_url": null,
"failure_return_url": null,
"send_customer_receipt": true,
"custom_data": {},
"amount_currency": "AED",
"platform": "client",
"prefilled_customer": {},
"title": "Chocolate Box - Small",
"external_id": null,
"name": "Chocolate Box - Small",
"enable_tabby": true,
"is_widget": true,
"id": "MB-LINK-2B3C4D5E6F",
"amount": 3000,
"processing_fee_percentage": 0,
"processing_fee_amount": null,
"enable_message": true,
"enable_tips": false,
"enable_quantity": false,
"payment_methods": [
"card",
"wallet"
],
"rules": {
"allowed": []
},
"enable_customer_details": false,
"payment_url": "https://sandbox.dev.business.mamopay.com/widget/pay/acme-chocolates-3c4d5e",
"save_card": "optional",
"status": "active",
"link_type": "modal",
"max_amount": null,
"hold_and_charge_later": false,
"internal_note": null,
"lang": "en",
"expiration_date": null,
"terms_and_conditions_url": null,
"payouts_share": null,
"created_at": "2023-12-28-16-21-24",
"event_type": "payment_link.create",
"subscription": null
}Field descriptions
| Field | Type | Description |
|---|---|---|
| description | String | Payment link description |
| capacity | Number | Payment link capacity. null means unlimited |
| active | Boolean | Whether the link is active |
| status | String | Effective state of the link: active, inactive or expired |
| return_url | String | The URL that the customer will be redirected to after a successful payment |
| failure_return_url | String | The URL that the customer will be redirected to after a failed payment |
| send_customer_receipt | Boolean | Whether customer receipts are sent |
| custom_data | Dictionary | Custom Data sent in the request |
| amount_currency | String | Currency of the payments |
| platform | String | Platform where the payment link was generated |
| title | String | Payment link title |
| prefilled_customer | Dictionary | Prefilled customer details (first_name - last_name - email - phone_number). Only the keys that were sent are present |
| external_id | String | External ID sent in the request |
| hold_and_charge_later | Boolean | Whether payments are held and captured later |
| internal_note | String | Your internal note for the link |
| lang | String | Checkout language (en - ar) |
| expiration_date | String | Date after which the link stops accepting payments, or null |
| name | String | Payment link name (same as title) |
| enable_tabby | Boolean | Whether Tabby is offered |
| is_widget | Boolean | Whether the link is a modal, inline or permanent link |
| link_type | String | Type of link (standalone - modal - inline) |
| id | String | Payment Link ID |
| amount | Number | Amount of the Payment Link |
| max_amount | Number | Maximum amount the customer can enter when the link has no fixed amount, or null |
| processing_fee_percentage | Number | Processing fee percentage sent in the request |
| processing_fee_amount | Number | Fixed processing fee amount, or null when none is set |
| enable_message | Boolean | Whether the customer can add a note |
| enable_tips | Boolean | Whether the tips option is shown |
| enable_quantity | Boolean | Whether the customer can choose a quantity |
| payment_methods | List<String> | List of allowed payment methods (card - wallet) |
| rules | Object | Payment link rules: {"allowed": [{"type", "list", "decline_message"}]}. allowed is empty when no rules are set; never null |
| enable_customer_details | Boolean | Whether the customers can enter their details |
| payment_url | String | The URL to redirect your customer to complete the payment. Do not strictly validate this URL's exact format or hostname — it is not guaranteed to remain static. Whitelist *.mamopay.com subdomains instead of pinning a specific hostname. |
| save_card | String | Whether the card is saved (off - optional - required - required_without_checkbox) |
| terms_and_conditions_url | String | Terms and conditions URL, or null |
| payouts_share | Dictionary | Split configured on the link (recipient_id-percentage_to_recipient-amount_to_recipient-recipient_pays_fees-release_date), or null |
| created_at | String (Format: YYYY-MM-DD-HH-MM-SS) | The creation time of the Payment Link |
| event_type | String | Webhook event type |
| subscription | Dictionary | Subscription details in case of subscriptions (identifier-frequency_interval-end_date-payment_quantity-start_date-monthly_start_date-frequency-weekly_start_day), or null |