Webhook endpoints

Update a webhook endpoint

PATCH/api/v1/webhooks/{id}

Points the endpoint at a new URL, switches it on or off, replaces the events it receives, changes the brands it is limited to, moves it to another API version, or any mix of these. A field you leave out keeps its value. subscribedEvents and brandIds replace the whole list; an empty brandIds removes the brand limit. A new URL is checked like a new endpoint's, and the signing secret stays the same. A new apiVersion applies to events queued after the change.

Authorization

bearerAuth
AuthorizationBearer <token>

An access token from POST /api/v1/oauth/token, sent as Authorization: Bearer <token>.

In: header

Path Parameters

id*string

The webhook endpoint's ID.

Formatuuid

Header Parameters

FlexMalipo-Version?"2026-11-06"

The API version to use for this request, a date such as 2026-11-06. Without it the request uses your default version for the mode of your key. An unknown version answers 400 api_version_invalid.

Value in

  • "2026-11-06"
Idempotency-Key?string

A unique key you choose for this request: 1 to 255 visible ASCII characters, no spaces. A UUID works well. Never put personal data in it. If a request times out, send it again with the same key and the same body to get the first response back, with the header Idempotent-Replayed: true. A key is kept for 24 hours. Sending the same key with another body answers 400 idempotency_key_reused.

Match^[\x21-\x7E]+$
Length1 <= length <= 255

Request Body

application/json

Changes to a webhook endpoint. A field you leave out keeps its value. Give at least one.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://api-malipo.flex.co.tz/api/v1/webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Authorization: Bearer <token>" \  -H "FlexMalipo-Version: 2026-11-06" \  -H "Idempotency-Key: 5f1c1e0a-3b7e-4c8e-9d1a-2f6b8a4c7e11" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "3d2b8e4f-6a1c-4f7e-9b0d-1c2e3f4a5b6c",  "livemode": false,  "url": "https://shop.example.com/flex-malipo/webhooks",  "description": "Order updates",  "subscribedEvents": [    "payment.succeeded",    "payment.failed"  ],  "enabled": true,  "secret": "whsec_9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",  "previousSecretExpiresAt": "2026-09-29T09:15:30Z",  "createdAt": "2026-09-28T09:15:30Z",  "updatedAt": "2026-09-28T09:15:30Z",  "apiVersion": "2026-11-06",  "brandIds": [    "6b9e2f4a-1c3d-4e5f-8a7b-9c0d1e2f3a4b"  ]}