{"openapi":"3.1.0","info":{"title":"KibiPay Payments API","description":"KibiPay - Financial Systems Access & Orchestration Layer (FSAOL) - Northbound API","version":"0.2.0"},"paths":{"/healthz":{"get":{"tags":["health"],"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/readyz":{"get":{"tags":["health"],"summary":"Readyz","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object","title":"Response Readyz Readyz Get"}}}}}}},"/v1/payments":{"post":{"tags":["payments"],"summary":"Initiate a payment","operationId":"create_payment_v1_payments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreate"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payments/batch":{"post":{"tags":["payments"],"summary":"Initiate up to 100 payments in one signed request","description":"Batch creation surface for high-throughput partners.\n\nThe single Idempotency-Key on the outer request is treated as a\nbatch key; each individual payment uses idempotency-key + index\nso partial re-deliveries de-duplicate cleanly. Returns a results\narray in the same order as the input, with either an accepted\npayment row or an error entry per element.","operationId":"create_batch_v1_payments_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payments/{payment_id}":{"get":{"tags":["payments"],"summary":"Get Payment","operationId":"get_payment_v1_payments__payment_id__get","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Payment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payments/{payment_id}/reversal":{"post":{"tags":["payments"],"summary":"Reverse Payment","operationId":"reverse_payment_v1_payments__payment_id__reversal_post","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Payment Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Reverse Payment V1 Payments  Payment Id  Reversal Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks":{"get":{"tags":["webhooks"],"summary":"List Webhooks","operationId":"list_webhooks_v1_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WebhookResponse"},"type":"array","title":"Response List Webhooks V1 Webhooks Get"}}}}}},"post":{"tags":["webhooks"],"summary":"Create Webhook","operationId":"create_webhook_v1_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/events":{"get":{"tags":["events"],"summary":"List Events","operationId":"list_events_v1_events_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-8601 lower bound, inclusive","title":"Since"},"description":"ISO-8601 lower bound, inclusive"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Events V1 Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scheme/rails":{"get":{"tags":["scheme"],"summary":"Scheme Rails","description":"Rail metadata: which family each rail belongs to and which rails it can\nfail over to.\n\nDeliberately unauthenticated and separate from GET /v1/admin/rails. The\nadmin route carries operational state (enabled/disabled, operator notes)\nand needs the operator token; this carries only the static compatibility\nmap, which the console and the public architecture page both render. Making\nthe matrix depend on an admin fetch meant that without a token it displayed\nevery pair as incompatible — claiming nothing could fail over.","operationId":"scheme_rails_v1_scheme_rails_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response Scheme Rails V1 Scheme Rails Get"}}}}}}},"/v1/scheme/health":{"get":{"tags":["scheme"],"summary":"Scheme Health","operationId":"scheme_health_v1_scheme_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object","title":"Response Scheme Health V1 Scheme Health Get"}}}}}}}},"components":{"schemas":{"BatchCreateRequest":{"properties":{"payments":{"items":{"$ref":"#/components/schemas/PaymentCreate"},"type":"array","title":"Payments"}},"type":"object","required":["payments"],"title":"BatchCreateRequest","description":"Up to 100 payments in a single signed call."},"BatchCreateResponse":{"properties":{"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"},"accepted":{"type":"integer","title":"Accepted"},"rejected":{"type":"integer","title":"Rejected"}},"type":"object","required":["results","accepted","rejected"],"title":"BatchCreateResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Party":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"iban":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iban"},"sort_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort Code"},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Number"},"rtn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rtn"},"bic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bic"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"party_id_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Party Id Type"},"party_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Party Identifier"},"msisdn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msisdn"},"fsp_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fsp Id"},"solana_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Solana Address"},"mint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mint"},"decimals":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decimals"}},"type":"object","title":"Party","description":"One end of a payment — payer or payee."},"PaymentCreate":{"properties":{"scheme":{"$ref":"#/components/schemas/Scheme"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"currency":{"type":"string","title":"Currency","default":"GBP"},"debtor":{"$ref":"#/components/schemas/Party"},"creditor":{"$ref":"#/components/schemas/Party"},"remittance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remittance"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"}},"type":"object","required":["scheme","amount","debtor","creditor"],"title":"PaymentCreate"},"PaymentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/PaymentStatus"},"scheme":{"$ref":"#/components/schemas/Scheme"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"currency":{"type":"string","title":"Currency"},"scheme_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheme Ref"}},"type":"object","required":["id","status","scheme","amount","currency"],"title":"PaymentResponse"},"PaymentStatus":{"type":"string","enum":["CREATED","VALIDATED","PENDING_APPROVAL","PENDING_RESPONSE","SUBMITTED","ACCEPTED","SETTLED","FULFILLED","DECLINED","RETURNED","REVERSED","RECALLED","REJECTED","EXPIRED"],"title":"PaymentStatus"},"Scheme":{"type":"string","enum":["FPS","BACS_DC","BACS_DD","CHAPS","MOJALOOP","SOLANA","RTP","SCT","SCT_INST","SDD","FEDNOW","TCH_RTP","FEDWIRE","ACH","SWIFT_MT","SWIFT_MX"],"title":"Scheme"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookCreate":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["url","events"],"title":"WebhookCreate"},"WebhookResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"secret_preview":{"type":"string","title":"Secret Preview"}},"type":"object","required":["id","url","events","secret_preview"],"title":"WebhookResponse"}}}}