WACM.in Logo
Back to API Docs

Automation & Payments REST Reference

Flowmaker & Commerce APIs

Create, validate, AI-generate, publish, and inspect visual WhatsApp automation flows under /api/v1/flowmaker, and manage Razorpay & Stripe payment links, orders, subscriptions, refunds, and webhook events under /api/v1/commerce.

Flowmaker Visual Automation API (/api/v1/flowmaker)

Authenticate with Authorization: Bearer YOUR_SANCTUM_TOKEN. Supports full draft vs. published graph separation (publish: true | false), structural graph validation, AI natural-language flow generation, and step-by-step execution history. Also available via WACM MCP v0.5.0.

GET
/api/v1/flowmaker/flows

List automation flows with node/edge counts, trigger types, active status, and has_unpublished_changes

GET
/api/v1/flowmaker/flows/{id}

Get full flow definition including nodes, edges, settings, and raw_flow_data

GET
/api/v1/flowmaker/flows/show

Get flow definition by ?flow_id= query parameter

POST
/api/v1/flowmaker/flows

Create a new flow with structural validation and draft/publish control

PUT
/api/v1/flowmaker/flows/{id}

Update flow graph or metadata (supports publish: true/false)

POST
/api/v1/flowmaker/flows/{id}/toggle-active

Activate or pause a flow with pre-flight graph validation

POST
/api/v1/flowmaker/flows/{id}/duplicate

Clone an existing flow as an inactive draft copy

POST
/api/v1/flowmaker/flows/{id}/discard-draft

Discard unpublished draft edits and revert to the last published version

DELETE
/api/v1/flowmaker/flows/{id}

Delete a flow and its execution history

POST
/api/v1/flowmaker/flows/validate

Dry-run structural validation of nodes and edges without saving

POST
/api/v1/flowmaker/flows/ai-generate

Generate a complete Flowmaker graph from a natural-language prompt

GET
/api/v1/flowmaker/node-types

List all supported trigger, message, logic, integration, and CRM node types

GET
/api/v1/flowmaker/history

List step-by-step flow execution logs (flow_id, contact_id, status, node_type)

DELETE
/api/v1/flowmaker/history

Clear flow execution history logs

POST /api/v1/flowmaker/flows/ai-generate
{
  "prompt": "When a customer messages pricing or quote, ask for their company name, create a CRM enquiry, and reply with our brochure.",
  "flow_name": "Inbound Quote Qualifier",
  "auto_create": false
}

Commerce & Payment Gateways API (/api/v1/commerce)

Inspect Razorpay and Stripe gateway status, list transactions, generate payment links (with optional automatic WhatsApp dispatch), inspect subscriptions and refunds, and retry failed payment webhook events.

GET
/api/v1/commerce/settings

Inspect Razorpay and Stripe gateway configuration status and webhook URLs (secrets redacted)

GET
/api/v1/commerce/payments

List payment transactions (filters: gateway, status, contact_id, search)

GET
/api/v1/commerce/payments/{id}

Get payment transaction details with line items and refunds

GET
/api/v1/commerce/payment-links

List Razorpay and Stripe payment links

POST
/api/v1/commerce/payment-links

Create a Razorpay or Stripe payment link and optionally send via WhatsApp

GET
/api/v1/commerce/orders

List commerce gateway orders

GET
/api/v1/commerce/subscriptions

List recurring subscriptions

GET
/api/v1/commerce/subscriptions/{id}

Get subscription details by ID

GET
/api/v1/commerce/refunds

List payment refunds

GET
/api/v1/commerce/events

List payment gateway webhook events

POST
/api/v1/commerce/events/{id}/retry

Retry processing of a failed payment gateway webhook event

POST /api/v1/commerce/payment-links
{
  "amount": 1499,
  "currency": "INR",
  "description": "Annual Pro Plan Renewal",
  "gateway": "razorpay",
  "customer_name": "Param Mehta",
  "customer_phone": "+919876543210",
  "send_whatsapp": true,
  "expires_in_minutes": 1440
}

Visual Node Reference & Dashboard Guide

Explore all Flowmaker trigger match modes (Exact, Contains, Starts With, Ends With, Regex), multi-condition AND/OR branching with 11 operators, native WhatsApp Flows, Jump-to-Flow handoffs, and CRM pipeline automation nodes in the Flowmaker User Guide.