Download OpenAPI specification:
Credit-based dynamic pricing surface for Convilyn (pricing v2).
payment_openapi.yaml for backwards compatibility during transition).See docs/business/pricing/pricing-v2.md for rates and the three-layer
raw → insured → charged cost stack. Engineering contract:
backend-api/docs/pricing/PRICING_CONTRACT.md. Paddle integration specifics:
backend-api/docs/pricing/PADDLE_TOPUP_NOTES.md.
Idempotency-Key header on /workflow/commit and /credits/topup| workflowKind required | string (WorkflowKind) Enum: "goal_lane" "conversion" "forge" |
| specId required | string |
| inputsSummary | object Optional hints that improve quote accuracy without revealing PII — file_size_bytes, expected_token_count, expected_megapixels, expected_minutes_audio, etc. Server may ignore unknown fields. |
{- "workflowKind": "goal_lane",
- "specId": "goal_lane.business_report_summary",
- "inputsSummary": { }
}{- "costU": 0,
- "balanceU": 0,
- "freeCredits": 0,
- "sufficient": true,
- "minFloorU": 0,
- "topUp": {
- "minU": 5000000,
- "suggestedU": 20000000,
- "maxU": 500000000
}
}| Idempotency-Key required | string [ 8 .. 128 ] characters Caller-generated opaque key (8–128 chars; SHOULD be a UUIDv4). Replays return the original run_id without re-debiting. |
| workflowKind required | string (WorkflowKind) Enum: "goal_lane" "conversion" "forge" |
| specId required | string |
| quotedCostU required | integer Echo of the quote's costU; server re-validates within 20% tolerance |
| consentedOverage | boolean Default: false Required when balance is insufficient and overage consent is active |
| inputsSummary | object |
{- "workflowKind": "goal_lane",
- "specId": "string",
- "quotedCostU": 0,
- "consentedOverage": false,
- "inputsSummary": { }
}{- "runId": "78c33d18-170c-44d3-a227-b3194f134f73",
- "balanceAfterU": 0,
- "chargedU": 0,
- "overageTransactionId": "string"
}{- "balanceMicroU": 0,
- "balanceU": 0,
- "periodEnd": "2019-08-24T14:15:22Z",
- "lastGrantAt": "2019-08-24T14:15:22Z",
- "freeTierMonthSpentMicroU": 0,
- "overageConsentActive": true
}| cursor | string |
| limit | integer <= 200 Default: 50 |
| kind_filter | Array of strings (LedgerEntryKind) Items Enum: "credit_grant_subscription" "credit_grant_trial" "credit_grant_promo" "credit_grant_free_monthly" "credit_deduction_workflow" "credit_topup" "credit_refund" |
{- "entries": [
- {
- "id": "string",
- "kind": "credit_grant_subscription",
- "costMicroU": 0,
- "occurredAt": "2019-08-24T14:15:22Z",
- "workflowRunId": "string",
- "paddleTransactionId": "string",
- "breakdownMicroU": {
- "llm": 0,
- "compute": 0,
- "storage": 0,
- "mcp": 0,
- "runFloor": 0
}
}
], - "nextCursor": "string"
}Creates a Paddle non-catalog one-time transaction. Returns a Paddle checkout URL the
frontend renders inline (CustomCheckout). Credits are added to the ledger only
after transaction.completed webhook arrives — never before payment confirmation.
| Idempotency-Key required | string [ 8 .. 128 ] characters Caller-generated opaque key (8–128 chars; SHOULD be a UUIDv4). Replays return the original draft without re-creating it. |
| amountU required | integer [ 5000000 .. 500000000 ] Top-up amount in µU. Default bounds $5–$500; configurable in topup_config.py. |
| currency | string Default: "USD" Value: "USD" USD-only at MVP (multi-currency in P8). |
{- "amountU": 5000000,
- "currency": "USD"
}{- "paddleTransactionId": "string",
- "status": "draft"
}Once enabled, over-balance commits in the current UsagePeriod synchronously call
Paddle POST /subscriptions/{id}/charge before dispatching the workflow.
Resets at next monthly rollover; user must re-consent each period.
| enable required | boolean |
{- "enable": true
}{- "enabled": true,
- "consentedAt": "2019-08-24T14:15:22Z",
- "periodEnd": "2019-08-24T14:15:22Z"
}