Google Cloud Platform
Overview
Marketplace (17 APIs)
Visual Workflows
Cloud Functions
SaaS Console
Pricing ($20 Pass)
Docs
Admin Console
Start free →
index.js
● V8 Isolate Synced
Endpoint: https://api.runnerflo.com/v1/functions/demo-saas/demo-payment-webhook
// Serverless Function: demo-payment-webhook // Deployed on V8 Isolate Sandbox (128MB RAM, sub-millisecond cold start) export async function onRequest(context) { const { request, env } = context; const payload = await request.json(); console.log("Processing incoming webhook for tenant:", payload.tenantId); // Auto Profit Margin Splitter (+200% Margin) const baseCostUSD = payload.baseCostUSD || 0.050; const endUserPaidUSD = baseCostUSD * 3.0; // +200% profit margin markup const netProfitUSD = endUserPaidUSD - baseCostUSD; return new Response(JSON.stringify({ status: 200, message: "Webhook processed successfully", billing: { endUserPaidUSD, baseCostUSD, netProfitCreditedUSD: netProfitUSD } }), { headers: { "Content-Type": "application/json" } }); }
Interactive Test Payload
{ "tenantId": "demo-saas", "baseCostUSD": 0.050, "serviceCalled": "remotion-cloudrun" }
▶ Execute Test Call
Execution Terminal Log
[System] V8 Isolate initialized successfully.
[Ready] Waiting for function invocation...