Payments Infrastructure

Describe  your  business
in  plain English.

Papilio provisions your payments backend, entity schema, and flow engine from a single description. No infrastructure code. No payments engineering team.

01 — Schema generation

Your business logic,
instantly structured.

Describe any business in natural language. Papilio generates a production-ready entity schema and payment flows in seconds.

Describe your business
Generated schema
{
  "entities": {
    "tenant": {
      "fields": {
        "name":           { "type": "string", "required": true },
        "email":          { "type": "string", "required": true },
        "mandate_status": { "type": "enum",
          "values": ["pending", "active", "failed"] }
      }
    },
    "property": {
      "fields": {
        "address":     { "type": "string", "required": true },
        "weekly_rent": { "type": "number", "required": true }
      }
    }
  },
  "flows": {
    "collect_rent": {
      "trigger": "schedule:weekly:MON:08:00",
      "steps": [
        { "action": "collect_payment",
          "from": "tenant.mandate_id" },
        { "action": "disburse",
          "to": "landlord.bank_account" },
        { "action": "export",
          "integration": "xero" }
      ]
    }
  }
}
~3s schema generation
12+ entity field types
0 lines of config to write
02 — Flow engine

Visual flows or plain English — your choice.

Collect Payment collect_payment Create Invoice Record create_entity Check threshold condition: amount ≥ $100 Export to Xero export · integration:xero 01 02 03 04 + Add step drag to connect
10 step types 3 payment rails Any integration Conditional branching
03 — How it works

Everything a payments team
would build. Already built.

Schema from language
Describe your entities and relationships in plain English. Papilio generates a typed, validated schema ready for production.
entity.schema.generate()
Payment collection
Direct debit mandates, card charges, and ACH — all configured from your flow definition. No Stripe dashboard required.
collect_payment · mandate
Scheduled flows
Trigger payment flows on any schedule — weekly, monthly, on a specific day. Cron-like syntax, human-readable config.
schedule:monthly:1:00:00
Accounting integrations
Export invoices, receipts, and transaction records to Xero automatically as part of your payment flow. No manual reconciliation.
export · integration:xero
Conditional logic
Branch your flows based on entity fields, payment outcomes, or thresholds. Build complex retry and escalation logic with no code.
condition · if: amount ≥ 50
Webhook notifications
Notify customers, trigger downstream systems, and log events as steps in your flow. Works with any endpoint.
webhook · notify_customer
Private Beta · Limited spots

Ready to ship your payments backend
in an afternoon?

No infrastructure. No migrations. Just describe your business and Papilio does the rest.

Entity Schema

Your data model.
Described, not coded.

Define your entities, fields, and relationships in plain English. Papilio generates a strictly typed schema — string, number, boolean, date, enum, reference — and provisions your data backend instantly. No migrations. No ORM. No schema design sessions.

Strict field types enforced at provision time
Relationships with foreign key validation
Enum fields with allowed value constraints
Reference fields that link entities together
Every field has a description — powers the NL query layer
schema.json
{
  "entities": {
    "customer": {
      "description": "A paying subscriber",
      "payment_role": "initiator",
      "fields": {
        "name": {
          "type": "string",
          "required": true,
          "description": "Full legal name"
        },
        "email": {
          "type": "string",
          "required": true
        },
        "monthly_fee": {
          "type": "number",
          "required": true,
          "description": "Subscription fee in NZD"
        },
        "status": {
          "type": "enum",
          "values": ["active", "paused", "cancelled"]
        },
        "plan_id": {
          "type": "ref",
          "entity": "plan",
          "description": "The plan this customer is on"
        }
      }
    }
  }
}
Flow Engine

From a single payment
to a full business process.

Flows are directed step graphs. Each step is a typed action — collect money, create a record, call a webhook, export to Xero, branch on a condition. Chain them in any order.

Collect Payment
collect_payment

Debit a bank mandate or charge a card. GoCardless, Stripe, or Akahu.

Disburse
disburse

Send money to any bank account or Stripe connected account. Fees split automatically.

Create Record
create_entity

Insert a new entity record mid-flow. Fields populated from step context.

Update Record
update_entity

Modify entity fields as a flow step. Update balances, statuses, timestamps.

Branch on Condition
condition

Evaluate an expression and route to different steps. If balance > 50, pay out.

Call Webhook
webhook

POST a signed payload to any URL. Notify your backend on any step completion.

Export
export

Send data to Xero, MYOB, or any integration. Triggered as a flow step.

Wait
wait

Pause a flow for a defined duration before the next step executes.

Example Flow
Collect rent · Disburse to landlord · Export to Xero
collect_paymenttenant.mandate_id
disburselandlord
create_entitypayment_record
exportxero
completeflow done

Every step puts its output into shared context. disburse.amount is available to every subsequent step.

endpoints
GET/v1/{tenantId}/{entity}List entities with filter
GET/v1/{tenantId}/{entity}/{id}Get single entity
POST/v1/{tenantId}/{entity}Create entity record
POST/v1/{tenantId}/flows/{id}/executeExecute a flow
GET/v1/{tenantId}/paymentsList payments
GET/v1/{tenantId}/payments/{id}Get payment detail
POST/v1/{tenantId}/payments/{id}/retryRetry failed payment
POST/v1/{tenantId}/queryQuery in any mode
API Surface

Eight endpoints.
Every business.

Papilio exposes the same eight endpoints to every tenant regardless of their configuration. Your entity schema, your flows, your data — all accessible through a consistent, versioned API. No custom endpoints to build. No documentation to maintain.

Tenant-scoped — your data is never accessible to other tenants
JWT and API key authentication
Sandbox and production environments
Webhook delivery on every event
SDK available in TypeScript
// TypeScript SDK
const papilio = new Papilio({
  tenantId: 'pap_tenant_001',
  apiKey:   process.env.PAPILIO_API_KEY,
})

const tenants = await papilio
  .get('tenant', { status: 'active' })

await papilio.flows
  .execute('collect_rent', tenantId)
Query Layer

Ask questions.
Get answers.

The Papilio query interface accepts plain English, structured filters, or raw pipelines. One endpoint, three modes. Your data, however you want to ask for it.

Query
find all payments that failed in the last 14 days
Results 5 results · 12ms
running query...
TenantAmountStateDate
tnt_sarah_c$450.00failedMar 10
tnt_james_w$380.00failedMar 10
tnt_mike_t$520.00failedMar 10
tnt_emma_d$425.00failedMar 11
tnt_priya_p$490.00failedMar 11
Structured Query
papilio.query({
  entity: 'payment',
  filter: {
    state:      'failed',
    created_at: { $gte: '2025-03-01' }
  },
  sort:  { created_at: -1 },
  limit: 50
})
Raw Pipeline requires config flag
papilio.query.raw([
  { $match: {
      tenant_id: 'pap_001',
      state:     'failed'
  }},
  { $group: {
      _id:   '$entity_id',
      total: { $sum: '$amount' }
  }},
  { $sort: { total: -1 }}
])
Try these
MCP First

Your IDE becomes
your operations centre.

Papilio ships with a Model Context Protocol server. Connect it to Kiro, Cursor, or Claude and query your live data, trigger flows, debug failures, and onboard customers — all in natural language without leaving your editor.

18 tools across entities, payments, flows, and query
Write operations require explicit confirmation — no accidental flow execution
Sandbox and production aware
Install in one command: npm install -g @papilio/mcp
// .cursor/mcp.json
{
  "mcpServers": {
    "papilio": {
      "command": "papilio-mcp",
      "env": {
        "PAPILIO_API_KEY": "pk_test_xxx"
      }
    }
  }
}
Kiro — Papilio MCP
Developer
Which tenants failed to pay rent this week and haven't been retried yet?
Papilio
Found 3 tenants with failed payments and no retry scheduled:
Sarah Chen     $450  failed Mar 10
James Wilson   $380  failed Mar 10
Mike Thompson $520  failed Mar 11
Developer
Retry all three and notify me when done.
Papilio
I'll retry payments for all 3 tenants. Confirm?

One platform. Three ways to use it.

From solo founders to engineering teams.

Standalone product

Use the Papilio dashboard as your entire interface. Configure entities, build flows, manage records, query data. No code required. The platform runs autonomously.

No code Dashboard only Autonomous
Embedded infrastructure

Build your product on top of Papilio. Use the dashboard for configuration, the SDK for integration. Your users never know Papilio exists.

SDK REST API TypeScript
Built for Compliance

Your audit trail comes
with the infrastructure.

Every financial event in Papilio is immutable and append-only. Payment state transitions, flow executions, entity changes, config updates — all timestamped and queryable. Fintechs building on Papilio walk into AML audits with the hardest part already done.

100%
Immutable event log
Every
State transition recorded
Zero
Audit trail setup required
SOC 2
Architecture ready

SOC 2 Type I certification in progress.

MCP · SDK · Dashboard

Three ways to use Papilio.
One way to get started.

Join the founders and developers already building on Papilio's private beta. We'll reach out within 24 hours.