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.
/api/billing/webhooks/flutterwaveAuthentication
Request Body
Flutterwave webhook payload (event and data with id, tx_ref, amount, currency, status, customer, meta for subscription or payment-processing).
{
"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
{
"received": true
}{
"received": true
}{
"error": "program back up"
}{
"error": "program back up"
}Errors
| Code | Meaning |
|---|---|
400 | Invalid or missing event |
401 | Authentication required or invalid token. |
403 | Access denied or insufficient permissions. |
500 | Internal server error. |