billing

Flutterwave webhook

Receives Flutterwave webhook events (charge.completed, payment.successful). No auth; verified by verif-hash header. - Subscription billing: meta without isPaymentProcessing triggers verifyPaymentAndCreateSubscription (mudbase_xxx refs). - Payment processing: meta.isPaymentProcessing === true triggers fiat payment record (mudbase_fiat_xxx refs); org share goes to org subaccount, platform fee to main or configured subaccounts.

POST/api/billing/webhooks/flutterwave

Authentication

Public — No Auth Required

Request Body

Flutterwave webhook payload (event and data with id, tx_ref, amount, currency, status, customer, meta for subscription or payment-processing).

json
{
  "event": "bus input",
  "data": {
    "id": 474.91,
    "tx_ref": "interface synthesize",
    "flw_ref": "microchip calculate",
    "amount": 637.81,
    "currency": "SSP",
    "status": "driver copy",
    "customer": {
      "email": "koby60@northwind.dev",
      "name": "Thomas Harvey"
    },
    "meta": {}
  }
}
{
  "event": "bus input",
  "data": {
    "id": 474.91,
    "tx_ref": "interface synthesize",
    "flw_ref": "microchip calculate",
    "amount": 637.81,
    "currency": "SSP",
    "status": "driver copy",
    "customer": {
      "email": "koby60@northwind.dev",
      "name": "Thomas Harvey"
    },
    "meta": {}
  }
}

SDK setup

Create a client instance. No authentication is required for this endpoint.

import { MudbaseClient } from "mudbase";

const client = new MudbaseClient();
import { MudbaseClient } from "mudbase";

const client = new MudbaseClient();

Example request

Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.

const result = await client.billing.handleFlutterwaveWebhook({
  event: "bandwidth navigate",
  data: "application override"
});
const result = await client.billing.handleFlutterwaveWebhook({
  event: "bandwidth navigate",
  data: "application override"
});

Try It Live

Test this endpoint with your own credentials. Your requests will be sent to the live API.

No Request Yet

Send a request to see the full inspector

Responses

200Webhook received
json
{
  "received": true
}
{
  "received": true
}
400Invalid or missing event
json
{
  "error": "program back up"
}
{
  "error": "program back up"
}
401Authentication required or invalid token.
403Access denied or insufficient permissions.
500Internal server error.

Errors

CodeMeaning
400Invalid or missing event
401Authentication required or invalid token.
403Access denied or insufficient permissions.
500Internal server error.
Edit this page on GitHub