{"openapi":"3.1.0","info":{"title":"Cirra Merchant API","version":"1.0.0","description":"Checkout Sessions, Payments, Refunds, Product Batch, Split Preview, Merchant Insights and Settlement Statements."},"servers":[{"url":"/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"cirra_sk_test_* or cirra_sk_live_*"}}},"paths":{"/checkout/sessions":{"get":{"summary":"List checkout sessions","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"List response"}}},"post":{"summary":"Create checkout session","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount_cents"],"properties":{"amount_cents":{"type":"integer","minimum":50},"currency":{"type":"string","enum":["EUR"]},"description":{"type":"string"},"success_url":{"type":"string","format":"uri"},"cancel_url":{"type":"string","format":"uri"},"metadata":{"type":"object"}}}}}},"responses":{"201":{"description":"Checkout session"}}}},"/checkout/sessions/{sessionId}":{"get":{"summary":"Retrieve checkout session","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Checkout session"},"404":{"description":"Not found"}}}},"/payments":{"get":{"summary":"List payments","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"List response"}}}},"/payments/{paymentId}":{"get":{"summary":"Retrieve payment","parameters":[{"name":"paymentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payment"},"404":{"description":"Not found"}}}},"/refunds":{"post":{"summary":"Create full refund","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payment_id"],"properties":{"payment_id":{"type":"string"}}}}}},"responses":{"201":{"description":"Refund payment"}}}},"/products/batch":{"post":{"summary":"Create or update merchant product listings in bulk","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","maxItems":250,"items":{"type":"object","required":["product_key","retail_price_cents"],"properties":{"product_key":{"type":"string"},"retail_price_cents":{"type":"integer"}}}}}}},"text/csv":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"Batch result"}}}},"/splits/preview":{"post":{"summary":"Preview advanced split quote","responses":{"200":{"description":"Split quote"}}}},"/insights/merchant":{"get":{"summary":"Get merchant sustainability, cashflow and fraud-signal insights","parameters":[{"name":"month","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}}],"responses":{"200":{"description":"Merchant insights"}}}},"/settlement-statements/monthly":{"get":{"summary":"Generate monthly settlement statement PDF","parameters":[{"name":"month","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}}],"responses":{"200":{"description":"PDF statement"}}}}}}