Create webhook

Registers a URL to receive webhook events, such as payment, subscription, payout, and dispute updates. Pick the events in enabled_events; the table on that field lists every event and its payload.

Before saving, Mamo sends a test POST with the body {"ping":"pong"} to your url (with your auth_header, if you set one). Your endpoint must answer with a 2xx status. Otherwise the call fails with 422 and Webhook is unreachable.

🚧

Calling this again with an existing URL

If a webhook with the same url already exists, this call updates it instead of creating a new one: the enabled_events you send are added to its current events, and its auth_header is replaced with the one you send (or cleared if you leave it out). No new signing_secret is returned. To replace the event list instead, use Update webhook.

[Optional] HMAC verification

When this call creates a new webhook, the response includes a signing_secret. Mamo uses it to sign every delivery with an HMAC-SHA256 Mamo-Signature header.

❗

The signing secret is returned only once

It isn't included in the List webhooks or Update webhook responses, or when you call this endpoint again with the URL of an existing webhook. Store it securely. If you lose it, delete the webhook and create it again.

See Webhook delivery for how to verify the signature.

[Optional] Verify Mamo source IP

Every webhook delivery comes from one of these fixed IP addresses. Allowlist them on your firewall or check the request's source IP in your handler, then reject anything else.

EnvironmentSource IP
Live35.240.141.245/32
Sandbox34.87.150.144/32

Use this alongside the Mamo-Signature and auth_header checks, not instead of them. If your server sits behind a load balancer or proxy, check the original client IP it forwards (for example in X-Forwarded-For), not the proxy's own address.

Recipes
✅
Accept a payment and confirm it with a webhook
Open Recipe
Body Params
uri
required
Defaults to https://your-server.example.com/mamo/webhook

The URL that receives the webhook notifications

enabled_events
array of strings
required
Defaults to payment.failed,payment.succeeded,payment.refund_initiated,payment.refunded,payment.refund_failed,subscription.failed,subscription.succeeded,payment_link.create

Event types to send to this endpoint. For every event, when it fires and its payload, see Webhook events.

See Webhook delivery for retry policy and request verification.

enabled_events*
string
length ≥ 1
Defaults to authentication header

A secret value of your choice. Mamo sends it as the Authorization header on every webhook delivery to this URL. Leading and trailing spaces and anything inside < > are removed, so don't use angle brackets in the value. Check it in your handler and reject requests that don't match, so only Mamo can trigger your webhook. Example: set it to Bearer followed by a random secret (for example Bearer 9f2c7a4e1b8d) and compare the incoming Authorization header against it.

Headers
string

A unique key, such as a UUID, that makes it safe to retry this request. Reuse the same key when you retry. See Idempotency.

Responses

404

Invalid request

429

Too many requests. You sent more than 100 requests in 30 seconds from one IP address. This response has no JSON body. See Rate limits.

500

Unexpected error

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json