{"openapi": "3.1.0", "info": {"title": "Conduit API", "version": "2026-11-01", "description": "Payments, customers, partners & commissions for every website you run. Website keys see one site; organisation keys (`sk_\u2026` with no site) see all and take `site=` where needed; restricted keys (`rk_\u2026`) carry scopes."}, "servers": [{"url": "http://localhost:8000/api/v1"}], "security": [{"bearer": []}], "tags": [{"name": "Account & keys"}, {"name": "Checkout sessions"}, {"name": "Payments"}, {"name": "Refunds"}, {"name": "Customers"}, {"name": "Partners"}, {"name": "Commissions"}, {"name": "Referral codes"}, {"name": "Payment links"}, {"name": "Websites"}, {"name": "Webhooks"}, {"name": "Events"}, {"name": "Balance & payouts"}, {"name": "Reports & exports"}, {"name": "Embedded dashboard"}, {"name": "Test helpers"}, {"name": "Browser (publishable key)"}], "components": {"securitySchemes": {"bearer": {"type": "http", "scheme": "bearer", "description": "Secret sk_live_/sk_test_ or restricted rk_live_/rk_test_ key. Scopes: sessions:read, sessions:write, payments:read, payments:write, refunds:read, refunds:write, customers:read, customers:write, partners:read, partners:write, commissions:read, commissions:write, referrals:read, referrals:write, links:read, links:write, sites:read, sites:write, webhooks:read, webhooks:write, events:read, reports:read, balance:read, embed:read, embed:write"}, "publishable": {"type": "http", "scheme": "bearer", "description": "pk_\u2026 (browser, origin-checked)"}}, "schemas": {"Error": {"type": "object", "properties": {"error": {"type": "object", "properties": {"type": {"type": "string"}, "code": {"type": "string"}, "message": {"type": "string"}, "param": {"type": "string"}, "doc_url": {"type": "string"}}}, "request_id": {"type": "string"}}}, "List": {"type": "object", "properties": {"object": {"const": "list"}, "url": {"type": "string"}, "data": {"type": "array", "items": {"type": "object"}}, "has_more": {"type": "boolean"}, "next_cursor": {"type": ["string", "null"]}, "total_count": {"type": "integer"}}}}}, "paths": {"/customers": {"post": {"operationId": "customer_create", "summary": "Create (or upsert) a customer", "tags": ["Customers"], "description": "Upsert by `reference`: an existing customer with that reference is updated and returned (200), otherwise created (201). Set `partner` to pre-register who referred them.", "parameters": [{"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"reference": {"type": "string", "description": "Your user id \u2014 the stable key"}, "name": {"type": "string"}, "email": {"type": "string"}, "phone": {"type": "string"}, "partner": {"type": "string", "description": "Lifetime referrer (ptn_\u2026 or reference)"}, "tags": {"type": "array", "items": {}}, "metadata": {"type": "object", "additionalProperties": true}}}, "example": {"reference": "user_88", "name": "Ama Mensah", "phone": "0241234567", "partner": "user_kofi"}}}}, "x-conduit": {"scope": "customers:write", "feature": "page.customers"}}, "get": {"operationId": "customer_list", "summary": "List & search customers", "tags": ["Customers"], "description": "List & search customers", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "q", "in": "query", "required": false, "schema": {"type": "string", "description": "name / email / phone / reference"}}, {"name": "partner", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "blocked", "in": "query", "required": false, "schema": {"type": "boolean"}}, {"name": "tag", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "min_ltv", "in": "query", "required": false, "schema": {"type": "number"}}, {"name": "has_paid", "in": "query", "required": false, "schema": {"type": "boolean"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "customers:read", "feature": "page.customers"}}}, "/customers/{id}": {"get": {"operationId": "customer_get", "summary": "Retrieve a customer (cus_\u2026 or your reference)", "tags": ["Customers"], "description": "Retrieve a customer (cus_\u2026 or your reference)", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "customers:read", "feature": "page.customers"}}, "post": {"operationId": "customer_update", "summary": "Update a customer", "tags": ["Customers"], "description": "Update a customer", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "email": {"type": "string"}, "phone": {"type": "string"}, "partner": {"type": "string", "description": "Lifetime referrer (ptn_\u2026 or reference)"}, "tags": {"type": "array", "items": {}}, "metadata": {"type": "object", "additionalProperties": true}}}}}}, "x-conduit": {"scope": "customers:write", "feature": "page.customers"}}, "delete": {"operationId": "customer_delete", "summary": "Delete a customer with no payments", "tags": ["Customers"], "description": "Delete a customer with no payments", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "customers:write", "feature": "page.customers"}}}, "/customers/{id}/block": {"post": {"operationId": "customer_block", "summary": "Block a customer from paying", "tags": ["Customers"], "description": "Blocked customers get a 403 `customer_blocked` at checkout on every website.", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"reason": {"type": "string"}}}}}}, "x-conduit": {"scope": "customers:write", "feature": "page.customers"}}}, "/customers/{id}/unblock": {"post": {"operationId": "customer_unblock", "summary": "Unblock a customer", "tags": ["Customers"], "description": "Unblock a customer", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "x-conduit": {"scope": "customers:write", "feature": "page.customers"}}}, "/customers/{id}/payments": {"get": {"operationId": "customer_payments", "summary": "A customer's payments", "tags": ["Customers"], "description": "A customer's payments", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "payments:read", "feature": "page.customers"}}}, "/partners": {"post": {"operationId": "partner_create", "summary": "Create (or upsert) a partner", "tags": ["Partners"], "description": "Partners are anyone who earns from payments: affiliates, agents, staff, influencers, resellers. Upserts by `reference`. Pass `code` to issue their referral code in the same call.", "parameters": [{"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"reference": {"type": "string", "description": "Their user id on your platform"}, "name": {"type": "string"}, "kind": {"type": "string", "enum": ["affiliate", "agent", "staff", "influencer", "reseller"]}, "email": {"type": "string"}, "phone": {"type": "string"}, "parent": {"type": "string", "description": "Upline partner (multi-level)"}, "rule": {"type": "string", "description": "Override commission rule (cr_\u2026)"}, "status": {"type": "string", "enum": ["active", "suspended"]}, "payout_details": {"type": "object", "additionalProperties": true}, "metadata": {"type": "object", "additionalProperties": true}, "code": {"type": "string", "description": "Also create this referral code (needs `site` with org keys)"}}, "required": ["name"]}, "example": {"reference": "user_kofi", "name": "Kofi Boateng", "kind": "agent", "parent": "user_ama", "code": "KOFI10"}}}}, "x-conduit": {"scope": "partners:write", "feature": "page.partners"}}, "get": {"operationId": "partner_list", "summary": "List partners", "tags": ["Partners"], "description": "List partners", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "kind", "in": "query", "required": false, "schema": {"type": "string", "enum": ["affiliate", "agent", "staff", "influencer", "reseller"]}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "parent", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "q", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "with_balance", "in": "query", "required": false, "schema": {"type": "boolean"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "partners:read", "feature": "page.partners"}}}, "/partners/{id}": {"get": {"operationId": "partner_get", "summary": "Retrieve a partner with balance", "tags": ["Partners"], "description": "Retrieve a partner with balance", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "partners:read", "feature": "page.partners"}}, "post": {"operationId": "partner_update", "summary": "Update a partner", "tags": ["Partners"], "description": "Update a partner", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "kind": {"type": "string", "enum": ["affiliate", "agent", "staff", "influencer", "reseller"]}, "email": {"type": "string"}, "phone": {"type": "string"}, "parent": {"type": "string", "description": "Upline partner (multi-level)"}, "rule": {"type": "string", "description": "Override commission rule (cr_\u2026)"}, "status": {"type": "string", "enum": ["active", "suspended"]}, "payout_details": {"type": "object", "additionalProperties": true}, "metadata": {"type": "object", "additionalProperties": true}}, "required": ["name"]}}}}, "x-conduit": {"scope": "partners:write", "feature": "page.partners"}}}, "/partners/{id}/balance": {"get": {"operationId": "partner_balance", "summary": "Pending / available / paid commission balance", "tags": ["Partners"], "description": "Pending / available / paid commission balance", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "commissions:read", "feature": "page.partners"}}}, "/partners/{id}/downline": {"get": {"operationId": "partner_downline", "summary": "Partner tree below this partner", "tags": ["Partners"], "description": "Partner tree below this partner", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "depth", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u20135, default 3"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "partners:read", "feature": "page.partners"}}}, "/partners/{id}/stats": {"get": {"operationId": "partner_stats", "summary": "Referred volume, customers and earnings", "tags": ["Partners"], "description": "Referred volume, customers and earnings", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "partners:read", "feature": "page.partners"}}}, "/partners/{id}/codes": {"post": {"operationId": "partner_code", "summary": "Issue a referral code for this partner", "tags": ["Partners"], "description": "Issue a referral code for this partner", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"code": {"type": "string"}, "min_amount": {"type": "number"}, "label": {"type": "string"}}, "required": ["code"]}}}}, "x-conduit": {"scope": "referrals:write", "feature": "page.partners"}}}, "/partners/{id}/payouts": {"post": {"operationId": "partner_payout", "summary": "Pay a partner's available commissions", "tags": ["Commissions"], "description": "Records that YOU paid the partner (bank, MoMo, wallet credit on your platform). Marks the lines paid and emits `commission.paid`.", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"commissions": {"type": "array", "items": {}, "description": "Specific com_ ids; default all available"}, "reference": {"type": "string"}, "method": {"type": "string"}, "note": {"type": "string"}}}}}}, "x-conduit": {"scope": "commissions:write", "feature": "page.partners"}}}, "/commission_rules": {"post": {"operationId": "rule_create", "summary": "Create a commission rule", "tags": ["Commissions"], "description": "Create a commission rule", "parameters": [{"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "applies_to": {"type": "string", "enum": ["referrer", "staff", "both"]}, "levels": {"type": "array", "items": {}, "description": "Percent per level: [10, 3, 1] = direct 10%, upline 3%, 1%"}, "flat": {"type": "number", "description": "Flat bonus to level 1"}, "trigger": {"type": "string", "enum": ["every", "first", "first_n"]}, "first_n": {"type": "integer"}, "attribution": {"type": "string", "enum": ["sticky", "payment"]}, "basis": {"type": "string", "enum": ["net", "gross"]}, "min_payment": {"type": "number"}, "cap": {"type": "number", "description": "Max per line"}, "hold_days": {"type": "integer"}, "site": {"type": "string", "description": "Only this website"}, "channels": {"type": "array", "items": {}}, "active": {"type": "boolean"}, "is_default": {"type": "boolean"}}, "required": ["name"]}, "example": {"name": "Agents 3-tier", "levels": [10, 3, 1], "trigger": "every", "hold_days": 7, "is_default": true}}}}, "x-conduit": {"scope": "commissions:write", "feature": "page.partners"}}, "get": {"operationId": "rule_list", "summary": "List commission rules", "tags": ["Commissions"], "description": "List commission rules", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "commissions:read", "feature": "page.partners"}}}, "/commission_rules/{id}": {"get": {"operationId": "rule_get", "summary": "Retrieve a rule", "tags": ["Commissions"], "description": "Retrieve a rule", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "commissions:read", "feature": "page.partners"}}, "post": {"operationId": "rule_update", "summary": "Update a rule (applies to future payments)", "tags": ["Commissions"], "description": "Update a rule (applies to future payments)", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "applies_to": {"type": "string", "enum": ["referrer", "staff", "both"]}, "levels": {"type": "array", "items": {}, "description": "Percent per level: [10, 3, 1] = direct 10%, upline 3%, 1%"}, "flat": {"type": "number", "description": "Flat bonus to level 1"}, "trigger": {"type": "string", "enum": ["every", "first", "first_n"]}, "first_n": {"type": "integer"}, "attribution": {"type": "string", "enum": ["sticky", "payment"]}, "basis": {"type": "string", "enum": ["net", "gross"]}, "min_payment": {"type": "number"}, "cap": {"type": "number", "description": "Max per line"}, "hold_days": {"type": "integer"}, "site": {"type": "string", "description": "Only this website"}, "channels": {"type": "array", "items": {}}, "active": {"type": "boolean"}, "is_default": {"type": "boolean"}}, "required": ["name"]}}}}, "x-conduit": {"scope": "commissions:write", "feature": "page.partners"}}, "delete": {"operationId": "rule_delete", "summary": "Delete a rule (ledger lines keep their history)", "tags": ["Commissions"], "description": "Delete a rule (ledger lines keep their history)", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "commissions:write", "feature": "page.partners"}}}, "/commissions/simulate": {"post": {"operationId": "commission_simulate", "summary": "Dry-run: who would earn what", "tags": ["Commissions"], "description": "Show partners their earnings before they sell, or test a rule change. Nothing is written.", "parameters": [{"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"amount": {"type": "number"}, "net": {"type": "number"}, "partner": {"type": "string", "description": "Referrer ptn_\u2026 / reference / referral code"}, "staff": {"type": "array", "items": {}}, "prior_payments": {"type": "integer", "description": "Customer's earlier successful payments (for first/first_n)"}, "channel": {"type": "string"}}, "required": ["amount"]}, "example": {"amount": 200, "partner": "user_kofi", "staff": [{"reference": "agent_7", "share": 50}, {"reference": "agent_9", "share": 50}]}}}}, "x-conduit": {"scope": "commissions:read", "feature": "page.partners"}}}, "/commissions": {"get": {"operationId": "commission_list", "summary": "Commission ledger", "tags": ["Commissions"], "description": "Commission ledger", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "partner", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "enum": ["pending", "available", "paid", "reversed", "void"]}}, {"name": "role", "in": "query", "required": false, "schema": {"type": "string", "enum": ["referrer", "staff", "adjustment"]}}, {"name": "payment", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "customer", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "include_summary", "in": "query", "required": false, "schema": {"type": "boolean"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "commissions:read", "feature": "page.partners"}}, "post": {"operationId": "commission_create", "summary": "Manual adjustment (bonus or deduction)", "tags": ["Commissions"], "description": "Manual adjustment (bonus or deduction)", "parameters": [{"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"partner": {"type": "string"}, "amount": {"type": "number", "description": "Negative for a deduction"}, "reason": {"type": "string"}, "payment": {"type": "string", "description": "Optional related payment"}, "status": {"type": "string", "enum": ["available", "pending"]}}, "required": ["partner", "amount", "reason"]}, "example": {"partner": "user_kofi", "amount": 50, "reason": "November target bonus"}}}}, "x-conduit": {"scope": "commissions:write", "feature": "page.partners"}}}, "/commissions/{id}": {"get": {"operationId": "commission_get", "summary": "Retrieve a commission line", "tags": ["Commissions"], "description": "Retrieve a commission line", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "commissions:read", "feature": "page.partners"}}}, "/commissions/{id}/approve": {"post": {"operationId": "commission_approve", "summary": "Release a held (pending) line now", "tags": ["Commissions"], "description": "Release a held (pending) line now", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "x-conduit": {"scope": "commissions:write", "feature": "page.partners"}}}, "/commissions/{id}/void": {"post": {"operationId": "commission_void", "summary": "Void an unpaid line", "tags": ["Commissions"], "description": "Void an unpaid line", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"reason": {"type": "string"}}}}}}, "x-conduit": {"scope": "commissions:write", "feature": "page.partners"}}}, "/commission_payouts": {"get": {"operationId": "commission_payout_list", "summary": "Partner payouts", "tags": ["Commissions"], "description": "Partner payouts", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "partner", "in": "query", "required": false, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "commissions:read", "feature": "page.partners"}}}, "/commission_payouts/{id}": {"get": {"operationId": "commission_payout_get", "summary": "Retrieve a partner payout with its lines", "tags": ["Commissions"], "description": "Retrieve a partner payout with its lines", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "commissions:read", "feature": "page.partners"}}}, "/embed/dashboard_sessions": {"post": {"operationId": "embed_session_create", "summary": "Mint a dashboard session for one of your staff", "tags": ["Embedded dashboard"], "description": "Call this from YOUR server each time a staff member opens your admin page, then put the returned `url` in an iframe (or use `Conduit.dashboard({url})`). Nobody needs a Conduit account. The URL is a bearer credential \u2014 never log it or send it to anyone else.", "parameters": [{"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"user": {"type": "object", "additionalProperties": true, "description": "{id, name, email} \u2014 your staff member (id is required)"}, "role": {"type": "string", "description": "Embed role id (er_\u2026) or name; default role if omitted"}, "sites": {"type": "array", "items": {}, "description": "Narrow to these websites (within the role)"}, "mode": {"type": "string", "enum": ["live", "test"]}, "expires_in": {"type": "integer", "description": "Seconds, 300 \u2013 policy max (default 3600)"}, "theme": {"type": "string", "enum": ["auto", "light", "dark"]}, "page": {"type": "string", "description": "Open on: payments, customers\u2026"}}, "required": ["user"]}, "example": {"user": {"id": "staff_42", "name": "Esi Owusu", "email": "esi@shop.example"}, "role": "Support", "expires_in": 3600}}}}, "x-conduit": {"scope": "embed:write", "feature": "feature.embed_dashboard"}}, "get": {"operationId": "embed_session_list", "summary": "List dashboard sessions", "tags": ["Embedded dashboard"], "description": "List dashboard sessions", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "active", "in": "query", "required": false, "schema": {"type": "boolean"}}, {"name": "user", "in": "query", "required": false, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "embed:read", "feature": "feature.embed_dashboard"}}}, "/embed/dashboard_sessions/{id}/revoke": {"post": {"operationId": "embed_session_revoke", "summary": "End a session now (e.g. the staff member left)", "tags": ["Embedded dashboard"], "description": "End a session now (e.g. the staff member left)", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "x-conduit": {"scope": "embed:write", "feature": "feature.embed_dashboard"}}}, "/embed/dashboard_sessions/revoke_user": {"post": {"operationId": "embed_session_revoke_user", "summary": "End every session of one staff member", "tags": ["Embedded dashboard"], "description": "End every session of one staff member", "parameters": [{"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"user": {"type": "string", "description": "Your staff member's id"}}, "required": ["user"]}}}}, "x-conduit": {"scope": "embed:write", "feature": "feature.embed_dashboard"}}}, "/embed/roles": {"get": {"operationId": "embed_roles", "summary": "Embed roles you defined", "tags": ["Embedded dashboard"], "description": "Embed roles you defined", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "embed:read", "feature": "feature.embed_dashboard"}}}, "/webhook_endpoints": {"post": {"operationId": "webhook_create", "summary": "Create a webhook endpoint", "tags": ["Webhooks"], "description": "The signing secret (`whsec_\u2026`) is returned ONCE in this response.", "parameters": [{"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"url": {"type": "string"}, "events": {"type": "array", "items": {}, "description": "Types or wildcards like payment.*; empty = all"}, "site": {"type": "string", "description": "Omit with an organisation key for an organisation-wide endpoint"}, "description": {"type": "string"}}, "required": ["url"]}, "example": {"url": "https://admin.example.com/hooks/conduit", "events": ["payment.*", "commission.*"]}}}}, "x-conduit": {"scope": "webhooks:write", "feature": "feature.webhooks"}}, "get": {"operationId": "webhook_list", "summary": "List webhook endpoints", "tags": ["Webhooks"], "description": "List webhook endpoints", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "webhooks:read"}}}, "/webhook_endpoints/{id}": {"get": {"operationId": "webhook_get", "summary": "Retrieve an endpoint", "tags": ["Webhooks"], "description": "Retrieve an endpoint", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "webhooks:read"}}, "post": {"operationId": "webhook_update", "summary": "Update an endpoint", "tags": ["Webhooks"], "description": "Update an endpoint", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"url": {"type": "string"}, "events": {"type": "array", "items": {}}, "description": {"type": "string"}, "active": {"type": "boolean"}}}}}}, "x-conduit": {"scope": "webhooks:write"}}, "delete": {"operationId": "webhook_delete", "summary": "Delete an endpoint", "tags": ["Webhooks"], "description": "Delete an endpoint", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "webhooks:write"}}}, "/webhook_endpoints/{id}/roll_secret": {"post": {"operationId": "webhook_roll", "summary": "Rotate the signing secret (returned once)", "tags": ["Webhooks"], "description": "Rotate the signing secret (returned once)", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "x-conduit": {"scope": "webhooks:write"}}}, "/webhook_endpoints/{id}/test": {"post": {"operationId": "webhook_test_one", "summary": "Send a sample event to this endpoint now", "tags": ["Webhooks"], "description": "Delivers a realistic sample (marked `\"test\": true`) synchronously and returns the result.", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"type": {"type": "string", "enum": ["conduit.ping", "payment.succeeded", "payment.failed", "refund.succeeded", "commission.created", "customer.created"]}}}}}}, "x-conduit": {"scope": "webhooks:write"}}}, "/webhooks/test": {"post": {"operationId": "webhook_test_all", "summary": "Ping every active endpoint", "tags": ["Webhooks"], "description": "Ping every active endpoint", "parameters": [{"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "x-conduit": {"scope": "webhooks:write"}}}, "/webhook_deliveries": {"get": {"operationId": "delivery_list", "summary": "Delivery log", "tags": ["Webhooks"], "description": "Delivery log", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "endpoint", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "event", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "type", "in": "query", "required": false, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "webhooks:read"}}}, "/webhook_deliveries/{id}": {"get": {"operationId": "delivery_get", "summary": "A delivery with payload and response", "tags": ["Webhooks"], "description": "A delivery with payload and response", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "webhooks:read"}}}, "/webhook_deliveries/{id}/retry": {"post": {"operationId": "delivery_retry", "summary": "Retry a delivery now", "tags": ["Webhooks"], "description": "Retry a delivery now", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "x-conduit": {"scope": "webhooks:write"}}}, "/events": {"get": {"operationId": "event_list", "summary": "Event log (catch up on missed webhooks)", "tags": ["Events"], "description": "Every event is stored for 30+ days whether or not you have endpoints. Poll with `created[gt]=<last seen>` to never miss a state change.", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "type", "in": "query", "required": false, "schema": {"type": "string", "description": "Exact type or wildcard: payment.*"}}, {"name": "types[]", "in": "query", "required": false, "schema": {"type": "string", "description": "Several types"}}, {"name": "object", "in": "query", "required": false, "schema": {"type": "string", "description": "Object id, e.g. pay_\u2026"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "events:read"}}}, "/events/{id}": {"get": {"operationId": "event_get", "summary": "Retrieve an event", "tags": ["Events"], "description": "Retrieve an event", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "events:read"}}}, "/events/{id}/redeliver": {"post": {"operationId": "event_redeliver", "summary": "Re-send an event to your endpoints", "tags": ["Events"], "description": "Re-send an event to your endpoints", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"endpoint": {"type": "string", "description": "Only this endpoint"}}}}}}, "x-conduit": {"scope": "webhooks:write"}}}, "/balance": {"get": {"operationId": "balance", "summary": "What the platform owes you (platform-collected payments)", "tags": ["Balance & payouts"], "description": "Only payments collected through the platform's gateways are settled by payroll. Payments on your own Paystack keys settle directly to you and are not included.", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "balance:read"}}}, "/payouts": {"get": {"operationId": "payout_list", "summary": "Payroll payouts to you", "tags": ["Balance & payouts"], "description": "Payroll payouts to you", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "balance:read"}}}, "/payouts/{id}": {"get": {"operationId": "payout_get", "summary": "A payout with its payments", "tags": ["Balance & payouts"], "description": "A payout with its payments", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "balance:read"}}}, "/reports/summary": {"get": {"operationId": "report_summary", "summary": "KPIs with period-over-period change", "tags": ["Reports & exports"], "description": "KPIs with period-over-period change", "parameters": [{"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "reports:read"}}}, "/reports/timeseries": {"get": {"operationId": "report_timeseries", "summary": "Volume & counts per bucket", "tags": ["Reports & exports"], "description": "Buckets are hourly/daily/weekly/monthly depending on the range; gaps are zero-filled.", "parameters": [{"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "reports:read"}}}, "/reports/breakdown": {"get": {"operationId": "report_breakdown", "summary": "Volume split by a dimension", "tags": ["Reports & exports"], "description": "Volume split by a dimension", "parameters": [{"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "by", "in": "query", "required": true, "schema": {"type": "string", "enum": ["channel", "site", "referral", "partner", "network", "status", "via"]}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "reports:read"}}}, "/reports/funnel": {"get": {"operationId": "report_funnel", "summary": "Checkout conversion funnel", "tags": ["Reports & exports"], "description": "Checkout conversion funnel", "parameters": [{"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "reports:read"}}}, "/reports/partners": {"get": {"operationId": "report_partners", "summary": "Partner leaderboard (volume referred & commission)", "tags": ["Reports & exports"], "description": "Partner leaderboard (volume referred & commission)", "parameters": [{"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer"}}, {"name": "kind", "in": "query", "required": false, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "reports:read", "feature": "page.partners"}}}, "/reports/customers": {"get": {"operationId": "report_customers", "summary": "New vs returning customers and top payers", "tags": ["Reports & exports"], "description": "New vs returning customers and top payers", "parameters": [{"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "reports:read", "feature": "page.customers"}}}, "/exports/{resource}": {"get": {"operationId": "export", "summary": "CSV export (payments, refunds, customers, commissions)", "tags": ["Reports & exports"], "description": "Up to 50,000 rows. Needs the read scope of the exported resource.", "parameters": [{"name": "resource", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/test/payments": {"post": {"operationId": "test_payment", "summary": "Simulate a full payment (test mode)", "tags": ["Test helpers"], "description": "Creates a session and drives a payment to the outcome instantly \u2014 customers, commissions and webhooks run exactly as in production. Ideal for CI.", "parameters": [{"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"amount": {"type": "number"}, "outcome": {"type": "string", "enum": ["succeeded", "failed"], "description": "Default succeeded"}, "customer": {"type": "object", "additionalProperties": true}, "referral": {"type": "string"}, "attribution": {"type": "object", "additionalProperties": true}, "external_id": {"type": "string"}, "metadata": {"type": "object", "additionalProperties": true}, "tags": {"type": "array", "items": {}}}, "required": ["amount"]}, "example": {"amount": 100, "customer": {"reference": "user_88"}, "referral": "KOFI10", "attribution": {"staff": [{"reference": "agent_7", "share": 100}]}}}}}, "x-conduit": {"scope": "payments:write", "test_only": true}}}, "/test/events": {"post": {"operationId": "test_event", "summary": "Fire a sample event to your test endpoints", "tags": ["Test helpers"], "description": "Fire a sample event to your test endpoints", "parameters": [{"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"type": {"type": "string", "enum": ["conduit.ping", "payment.succeeded", "payment.failed", "refund.succeeded", "commission.created", "customer.created"]}}, "required": ["type"]}}}}, "x-conduit": {"scope": "webhooks:write", "test_only": true}}}, "/health": {"get": {"operationId": "health", "summary": "Liveness & version", "tags": ["Account & keys"], "description": "Liveness & version", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "security": []}}, "/openapi.json": {"get": {"operationId": "openapi", "summary": "OpenAPI 3.1 spec (generated)", "tags": ["Account & keys"], "description": "OpenAPI 3.1 spec (generated)", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "security": []}}, "/postman.json": {"get": {"operationId": "postman", "summary": "Postman collection (generated)", "tags": ["Account & keys"], "description": "Postman collection (generated)", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "security": []}}, "/scopes": {"get": {"operationId": "scopes", "summary": "All scopes and what they grant", "tags": ["Account & keys"], "description": "All scopes and what they grant", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "security": []}}, "/me": {"get": {"operationId": "me", "summary": "Who am I \u2014 key, account, websites, scopes", "tags": ["Account & keys"], "description": "Use on boot to discover what a key can do: its scopes, its website (or all websites for organisation keys), mode, plan features and the API version.", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/checkout/sessions": {"post": {"operationId": "session_create", "summary": "Create a checkout session", "tags": ["Checkout sessions"], "description": "Returns a hosted `url` (redirect) \u2014 or pass the id to `Conduit.pay({session})` in the browser for the in-page modal. Use `Idempotency-Key` for safe retries.", "parameters": [{"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"amount": {"type": "number", "description": "Amount in major units (e.g. 50.00). Omit to let the customer choose within limits."}, "currency": {"type": "string", "description": "ISO code; defaults to the website currency"}, "external_id": {"type": "string", "description": "YOUR order/invoice id. Unique per website: a second call returns the same open checkout; a paid one returns 409 external_id_already_paid."}, "customer": {"type": "object", "additionalProperties": true, "description": "{reference, email, phone, name} \u2014 reference = your user id"}, "referral": {"type": "string", "description": "Referral code. Its partner is credited (and remembered on the customer)."}, "attribution": {"type": "object", "additionalProperties": true, "description": "{partner, staff:[{reference, name, share, kind}], campaign, source, medium, utm{}} \u2014 credit several people on one payment"}, "line_items": {"type": "array", "items": {}, "description": "[{name, quantity, unit_amount, sku}] \u2014 amount is computed when omitted"}, "tags": {"type": "array", "items": {}, "description": "Up to 20 short labels, filterable"}, "metadata": {"type": "object", "additionalProperties": true, "description": "Anything (\u2264 4 KB); echoed in webhooks"}, "description": {"type": "string"}, "return_url": {"type": "string"}, "cancel_url": {"type": "string"}, "channels": {"type": "array", "items": {}, "description": "Restrict to channel codes"}, "expires_in": {"type": "integer", "description": "Seconds (300 \u2013 604800)"}}}, "example": {"amount": 150, "external_id": "order_1042", "customer": {"reference": "user_88", "phone": "0241234567"}, "referral": "KOFI10", "attribution": {"staff": [{"reference": "agent_7", "share": 60}, {"reference": "agent_9", "share": 40}]}, "metadata": {"cart": "c_77"}}}}}, "x-conduit": {"scope": "sessions:write"}}, "get": {"operationId": "session_list", "summary": "List checkout sessions", "tags": ["Checkout sessions"], "description": "List checkout sessions", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "enum": ["open", "processing", "completed", "expired"]}}, {"name": "customer_reference", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "external_id", "in": "query", "required": false, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "sessions:read"}}}, "/checkout/sessions/{id}": {"get": {"operationId": "session_get", "summary": "Retrieve a session (by id or your external_id)", "tags": ["Checkout sessions"], "description": "Retrieve a session (by id or your external_id)", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "sessions:read"}}}, "/checkout/sessions/{id}/expire": {"post": {"operationId": "session_expire", "summary": "Expire an unpaid session now", "tags": ["Checkout sessions"], "description": "Expire an unpaid session now", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "x-conduit": {"scope": "sessions:write"}}}, "/payments": {"get": {"operationId": "payment_list", "summary": "List & search payments", "tags": ["Payments"], "description": "Everything your admin panel needs: filter by status, channel, customer, partner, staff, tag, timeframe. `include_summary=1` adds totals for the filtered set. For incremental sync use `sort=updated&updated[gte]=<last sync>`.", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "description": "succeeded, failed, open, pending, action_required, expired, initiated"}}, {"name": "channel", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "referral", "in": "query", "required": false, "schema": {"type": "string", "description": "Referral code"}}, {"name": "customer", "in": "query", "required": false, "schema": {"type": "string", "description": "cus_\u2026 or your customer reference"}}, {"name": "partner", "in": "query", "required": false, "schema": {"type": "string", "description": "ptn_\u2026 or partner reference \u2014 payments credited to them"}}, {"name": "staff", "in": "query", "required": false, "schema": {"type": "string", "description": "Staff reference present in attribution.staff"}}, {"name": "external_id", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "tag", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "refund_status", "in": "query", "required": false, "schema": {"type": "string", "enum": ["none", "partial", "full"]}}, {"name": "q", "in": "query", "required": false, "schema": {"type": "string", "description": "Search reference / phone / email / id"}}, {"name": "min", "in": "query", "required": false, "schema": {"type": "number"}}, {"name": "max", "in": "query", "required": false, "schema": {"type": "number"}}, {"name": "include_summary", "in": "query", "required": false, "schema": {"type": "boolean"}}, {"name": "expand[]", "in": "query", "required": false, "schema": {"type": "string", "description": "customer, partner, commissions, refunds, events, session"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/List"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "payments:read"}}}, "/payments/{id}": {"get": {"operationId": "payment_get", "summary": "Retrieve a payment (id, reference or external_id)", "tags": ["Payments"], "description": "Retrieve a payment (id, reference or external_id)", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "expand[]", "in": "query", "required": false, "schema": {"type": "string", "description": "customer, partner, commissions, refunds, events, session"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "payments:read"}}, "post": {"operationId": "payment_update", "summary": "Update a payment", "tags": ["Payments"], "description": "Update a payment", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"metadata": {"type": "object", "additionalProperties": true, "description": "Merged; a null value deletes a key"}, "tags": {"type": "array", "items": {}, "description": "Replaces tags"}, "attribution": {"type": "object", "additionalProperties": true, "description": "Only before the payment succeeds \u2014 afterwards use /attribution"}}}, "example": {"metadata": {"fulfilled": true}, "tags": ["vip", "promo-nov"]}}}}, "x-conduit": {"scope": "payments:write"}}}, "/payments/{id}/attribution": {"post": {"operationId": "payment_attribute", "summary": "Credit a settled payment after the fact", "tags": ["Payments"], "description": "For when the agent/partner was entered late. Runs the commission engine for this payment. Refused while live commissions exist \u2014 void them first.", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"partner": {"type": "string", "description": "ptn_\u2026 or partner reference"}, "staff": {"type": "array", "items": {}, "description": "[{reference, share}]"}, "sticky": {"type": "boolean", "description": "Also set as the customer's lifetime referrer (default true)"}}}}}}, "x-conduit": {"scope": "commissions:write", "feature": "page.partners"}}}, "/payments/{id}/verify": {"post": {"operationId": "payment_verify", "summary": "Re-check status with the processor now", "tags": ["Payments"], "description": "Re-check status with the processor now", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "x-conduit": {"scope": "payments:write"}}}, "/payments/{id}/events": {"get": {"operationId": "payment_events", "summary": "Payment timeline (every status change, note and check)", "tags": ["Payments"], "description": "Payment timeline (every status change, note and check)", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "payments:read"}}}, "/payments/{id}/notes": {"post": {"operationId": "payment_note", "summary": "Add an internal note (staff collaboration)", "tags": ["Payments"], "description": "Notes land on the payment timeline, visible to every staff member in the console and API.", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"note": {"type": "string"}, "author": {"type": "string", "description": "Who wrote it (your staff user)"}}, "required": ["note"]}}}}, "x-conduit": {"scope": "payments:write"}}}, "/payments/{id}/refunds": {"post": {"operationId": "payment_refund", "summary": "Refund a payment (full or partial)", "tags": ["Refunds"], "description": "Paystack refunds go through the API; bridge payments become `requires_action` (finish manually, then confirm). Commissions are clawed back proportionally.", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"amount": {"type": "number", "description": "Defaults to the full refundable amount"}, "reason": {"type": "string", "enum": ["requested_by_customer", "duplicate", "fraudulent", "service_not_provided", "other"]}, "note": {"type": "string"}, "metadata": {"type": "object", "additionalProperties": true}}}, "example": {"amount": 20, "reason": "duplicate"}}}}, "x-conduit": {"scope": "refunds:write", "feature": "feature.refunds"}}, "get": {"operationId": "payment_refund_list", "summary": "Refunds of a payment", "tags": ["Refunds"], "description": "Refunds of a payment", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "refunds:read"}}}, "/refunds": {"post": {"operationId": "refund_create", "summary": "Create a refund", "tags": ["Refunds"], "description": "Create a refund", "parameters": [{"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"payment": {"type": "string", "description": "Payment id/reference"}, "amount": {"type": "number", "description": "Defaults to the full refundable amount"}, "reason": {"type": "string", "enum": ["requested_by_customer", "duplicate", "fraudulent", "service_not_provided", "other"]}, "note": {"type": "string"}, "metadata": {"type": "object", "additionalProperties": true}}, "required": ["payment"]}}}}, "x-conduit": {"scope": "refunds:write", "feature": "feature.refunds"}}, "get": {"operationId": "refund_list", "summary": "List refunds", "tags": ["Refunds"], "description": "List refunds", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "timeframe", "in": "query", "required": false, "schema": {"type": "string", "description": "today, yesterday, 3d, 7d, 14d, 30d, 90d, this_month, last_month, this_year, 1y, all, custom"}}, {"name": "from", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "to", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds With timeframe=custom"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "payment", "in": "query", "required": false, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "refunds:read"}}}, "/refunds/{id}": {"get": {"operationId": "refund_get", "summary": "Retrieve a refund", "tags": ["Refunds"], "description": "Retrieve a refund", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "refunds:read"}}}, "/refunds/{id}/confirm": {"post": {"operationId": "refund_confirm", "summary": "Confirm a manual refund was sent", "tags": ["Refunds"], "description": "Confirm a manual refund was sent", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"gateway_reference": {"type": "string"}, "note": {"type": "string"}}}}}}, "x-conduit": {"scope": "refunds:write", "feature": "feature.refunds"}}}, "/refunds/{id}/cancel": {"post": {"operationId": "refund_cancel", "summary": "Cancel a pending refund", "tags": ["Refunds"], "description": "Cancel a pending refund", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "x-conduit": {"scope": "refunds:write"}}}, "/site": {"get": {"operationId": "site_current", "summary": "This key's website (site keys)", "tags": ["Websites"], "description": "This key's website (site keys)", "parameters": [{"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "sites:read"}}}, "/sites": {"get": {"operationId": "site_list", "summary": "List websites", "tags": ["Websites"], "description": "List websites", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "sites:read"}}}, "/sites/{id}": {"get": {"operationId": "site_get", "summary": "Retrieve a website", "tags": ["Websites"], "description": "Retrieve a website", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "sites:read"}}, "post": {"operationId": "site_update", "summary": "Pause / resume a website, tune limits", "tags": ["Websites"], "description": "Pause from your own admin (e.g. during maintenance). The customer sees your paused message.", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"status": {"type": "string", "enum": ["active", "paused"]}, "paused_reason": {"type": "string"}, "min_amount": {"type": "number"}, "max_amount": {"type": "number"}, "quick_amounts": {"type": "array", "items": {}}}}, "example": {"status": "paused", "paused_reason": "Maintenance until 14:00"}}}}, "x-conduit": {"scope": "sites:write"}}}, "/referrals": {"post": {"operationId": "referral_create", "summary": "Create a referral code", "tags": ["Referral codes"], "description": "Create a referral code", "parameters": [{"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"code": {"type": "string"}, "label": {"type": "string"}, "owner": {"type": "string"}, "partner": {"type": "string", "description": "ptn_\u2026 or partner reference \u2014 who gets credited"}, "min_amount": {"type": "number", "description": "Minimum deposit with this code"}, "max_amount": {"type": "number"}, "active": {"type": "boolean"}, "expires_at": {"type": "string", "description": "ISO-8601 or unix seconds"}}, "required": ["code"]}, "example": {"code": "KOFI10", "partner": "user_kofi", "min_amount": 20}}}}, "x-conduit": {"scope": "referrals:write", "feature": "page.referrals"}}, "get": {"operationId": "referral_list", "summary": "List referral codes", "tags": ["Referral codes"], "description": "List referral codes", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "partner", "in": "query", "required": false, "schema": {"type": "string"}}, {"name": "active", "in": "query", "required": false, "schema": {"type": "boolean"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "referrals:read", "feature": "page.referrals"}}}, "/referrals/{code}": {"get": {"operationId": "referral_get", "summary": "Retrieve a referral code", "tags": ["Referral codes"], "description": "Retrieve a referral code", "parameters": [{"name": "code", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "referrals:read", "feature": "page.referrals"}}, "post": {"operationId": "referral_update", "summary": "Update a referral code", "tags": ["Referral codes"], "description": "Update a referral code", "parameters": [{"name": "code", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"label": {"type": "string"}, "owner": {"type": "string"}, "partner": {"type": "string", "description": "ptn_\u2026 or partner reference \u2014 who gets credited"}, "min_amount": {"type": "number", "description": "Minimum deposit with this code"}, "max_amount": {"type": "number"}, "active": {"type": "boolean"}, "expires_at": {"type": "string", "description": "ISO-8601 or unix seconds"}}}}}}, "x-conduit": {"scope": "referrals:write", "feature": "page.referrals"}}}, "/links": {"post": {"operationId": "link_create", "summary": "Create a payment link", "tags": ["Payment links"], "description": "Create a payment link", "parameters": [{"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}, {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string"}, "description": "Safe retries for 24h"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "description": {"type": "string"}, "amount": {"type": "number", "description": "Fixed amount; omit for customer-chosen"}, "referral": {"type": "string", "description": "Attach a referral code"}, "max_uses": {"type": "integer"}, "expires_at": {"type": "string", "description": "ISO-8601 or unix seconds"}, "active": {"type": "boolean"}, "require_signature": {"type": "boolean"}}}}}}, "x-conduit": {"scope": "links:write"}}, "get": {"operationId": "link_list", "summary": "List payment links", "tags": ["Payment links"], "description": "List payment links", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "description": "1\u2013100, default 25"}}, {"name": "starting_after", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor: object id from the previous page's last item (next_cursor)"}}, {"name": "ending_before", "in": "query", "required": false, "schema": {"type": "string", "description": "Cursor for the previous page"}}, {"name": "created[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds ISO-8601 or unix seconds"}}, {"name": "created[lte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds"}}, {"name": "updated[gte]", "in": "query", "required": false, "schema": {"type": "string", "description": "ISO-8601 or unix seconds Incremental sync: everything changed since"}}, {"name": "sort", "in": "query", "required": false, "schema": {"type": "string", "enum": ["created", "updated"], "description": "created (default) or updated"}}, {"name": "include_total", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Add total count (slower)"}}, {"name": "site", "in": "query", "required": false, "schema": {"type": "string", "description": "Website id (site_\u2026). Required with organisation keys on site-specific calls."}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "links:read"}}}, "/links/{id}": {"get": {"operationId": "link_get", "summary": "Retrieve a payment link", "tags": ["Payment links"], "description": "Retrieve a payment link", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "x-conduit": {"scope": "links:read"}}, "post": {"operationId": "link_update", "summary": "Update a payment link", "tags": ["Payment links"], "description": "Update a payment link", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "description": {"type": "string"}, "amount": {"type": "number", "description": "Fixed amount; omit for customer-chosen"}, "referral": {"type": "string", "description": "Attach a referral code"}, "max_uses": {"type": "integer"}, "expires_at": {"type": "string", "description": "ISO-8601 or unix seconds"}, "active": {"type": "boolean"}, "require_signature": {"type": "boolean"}}}}}}, "x-conduit": {"scope": "links:write"}}}, "/links/sign": {"post": {"operationId": "link_sign", "summary": "Build a signed, pre-filled link", "tags": ["Payment links"], "description": "Pre-fill and lock amount/customer/referral. Signed links also work from emails and apps (no Referer needed).", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"link": {"type": "string", "description": "Payment link id (token)"}, "amount": {"type": "number"}, "customer_ref": {"type": "string"}, "email": {"type": "string"}, "phone": {"type": "string"}, "name": {"type": "string"}, "ref": {"type": "string", "description": "Referral code"}, "expires_in": {"type": "integer", "description": "Seconds, default 3600"}}, "required": ["link"]}}}}, "x-conduit": {"scope": "links:write"}}}, "/public/site": {"get": {"operationId": "public_site", "summary": "Website config for your UI", "tags": ["Browser (publishable key)"], "description": "Website config for your UI", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "security": [{"publishable": []}]}}, "/public/sessions": {"post": {"operationId": "public_session", "summary": "Create a hosted session from the browser", "tags": ["Browser (publishable key)"], "description": "Create a hosted session from the browser", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"amount": {"type": "number", "description": "Amount in major units (e.g. 50.00). Omit to let the customer choose within limits."}, "currency": {"type": "string", "description": "ISO code; defaults to the website currency"}, "external_id": {"type": "string", "description": "YOUR order/invoice id. Unique per website: a second call returns the same open checkout; a paid one returns 409 external_id_already_paid."}, "customer": {"type": "object", "additionalProperties": true, "description": "{reference, email, phone, name} \u2014 reference = your user id"}, "referral": {"type": "string", "description": "Referral code. Its partner is credited (and remembered on the customer)."}, "attribution": {"type": "object", "additionalProperties": true, "description": "{partner, staff:[{reference, name, share, kind}], campaign, source, medium, utm{}} \u2014 credit several people on one payment"}, "line_items": {"type": "array", "items": {}, "description": "[{name, quantity, unit_amount, sku}] \u2014 amount is computed when omitted"}, "tags": {"type": "array", "items": {}, "description": "Up to 20 short labels, filterable"}, "metadata": {"type": "object", "additionalProperties": true, "description": "Anything (\u2264 4 KB); echoed in webhooks"}, "description": {"type": "string"}, "return_url": {"type": "string"}, "cancel_url": {"type": "string"}, "channels": {"type": "array", "items": {}, "description": "Restrict to channel codes"}, "expires_in": {"type": "integer", "description": "Seconds (300 \u2013 604800)"}}}}}}, "security": [{"publishable": []}], "x-conduit": {"feature": "feature.client_amounts"}}}, "/embed/sessions": {"post": {"operationId": "embed_session", "summary": "Open the in-page modal (used by conduit.js)", "tags": ["Browser (publishable key)"], "description": "The browser SDK calls this. An amount from the browser is a prefill the customer can change unless the website allows browser-set amounts. Staff attribution is ignored from browsers \u2014 set it server-side.", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"type": "object"}}}}}, "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"amount": {"type": "number", "description": "Amount in major units (e.g. 50.00). Omit to let the customer choose within limits."}, "currency": {"type": "string", "description": "ISO code; defaults to the website currency"}, "external_id": {"type": "string", "description": "YOUR order/invoice id. Unique per website: a second call returns the same open checkout; a paid one returns 409 external_id_already_paid."}, "customer": {"type": "object", "additionalProperties": true, "description": "{reference, email, phone, name} \u2014 reference = your user id"}, "referral": {"type": "string", "description": "Referral code. Its partner is credited (and remembered on the customer)."}, "attribution": {"type": "object", "additionalProperties": true, "description": "{partner, staff:[{reference, name, share, kind}], campaign, source, medium, utm{}} \u2014 credit several people on one payment"}, "line_items": {"type": "array", "items": {}, "description": "[{name, quantity, unit_amount, sku}] \u2014 amount is computed when omitted"}, "tags": {"type": "array", "items": {}, "description": "Up to 20 short labels, filterable"}, "metadata": {"type": "object", "additionalProperties": true, "description": "Anything (\u2264 4 KB); echoed in webhooks"}, "description": {"type": "string"}, "return_url": {"type": "string"}, "cancel_url": {"type": "string"}, "channels": {"type": "array", "items": {}, "description": "Restrict to channel codes"}, "expires_in": {"type": "integer", "description": "Seconds (300 \u2013 604800)"}}}}}}, "security": [{"publishable": []}], "x-conduit": {"feature": "feature.native_embed"}}}, "/public/payments/{reference}": {"get": {"operationId": "public_payment", "summary": "Minimal payment status for the browser", "tags": ["Browser (publishable key)"], "description": "Minimal payment status for the browser", "parameters": [{"name": "reference", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "4XX": {"description": "Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "security": [{"publishable": []}]}}}}