Billing
Payment gateway webhook
Receives payment gateway 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/flutterwaveSDK setup
Create a client instance. No authentication is required for this endpoint.
import { Configuration, BillingApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const billing = new BillingApi(configuration);import { Configuration, BillingApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const billing = new BillingApi(configuration);Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const { data: result } = await billing.handleFlutterwaveWebhook(
{
event: "pixel override",
data: "application bypass"
}
);const { data: result } = await billing.handleFlutterwaveWebhook(
{
event: "pixel override",
data: "application bypass"
}
);Playground
liveTest 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
Authentication
Public — No Auth Required
Request Body
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": {}
}
}Responses
200Webhook received
json
{
"received": true
}{
"received": true
}400Invalid or missing event
json
{
"error": "program back up"
}{
"error": "program back up"
}500—
Errors
| Code | Meaning |
|---|---|
400 | Invalid or missing event |
500 | — |